2018-09-22, 22:10:38
Small plugin that adds a "Update Sitemap" button to the Page management sidebar:
Save as sitemap_update.php in plugins folder, then activate.
Code:
<?php
$thisfile = basename(__FILE__, ".php");
register_plugin(
$thisfile,
'Sitemap Update',
'0.1',
'Carlos',
'#',
'...',
'pages',
'sitemap_update'
);
add_action('pages-sidebar', 'createSideMenu', array($thisfile, 'Update Sitemap'));
function sitemap_update() {
create_pagesxml(true);
generate_sitemap();
echo 'Sitemap updated.';
}
// end
Save as sitemap_update.php in plugins folder, then activate.