This is the solution from Peter Baylies (Plugin Author)
add_filter( 'option_aioseop_options', 'itdge_sitemap_addl_pages' );
function itdge_sitemap_addl_pages( $option ) {
if ( !empty( $option )
&& !empty( $option['modules'] )
&& !empty( $option['modules']['aiosp_sitemap_options'])
) {
$my_sitemap_entries = Array(
'/test1' => Array( 'prio' => '0.1', 'freq' => 'daily', 'mod' => '2014-04-01' ),
'/test2' => Array( 'prio' => '0.3', 'freq' => 'weekly', 'mod' => '2014-03-02' )
);
if ( empty( $option['modules']['aiosp_sitemap_options']['aiosp_sitemap_addl_pages'] ) ) {
$option['modules']['aiosp_sitemap_options']['aiosp_sitemap_addl_pages'] = Array();
}
foreach( $my_sitemap_entries as $k => $v ) {
$option['modules']['aiosp_sitemap_options']['aiosp_sitemap_addl_pages'][$k] = $v;
}
}
return $option;
}
Related Posts:
- How can I see all the actions attached to an “add_action” hook?
- How to include code only on specific pages?
- Changing the “Plugin Activated” Message Default
- Schedule WordPress Auto-Updates to only run during business hours
- Remove action from plugin on other plugin
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Is there any debug toolbar that shows whick hooks are called for the current page in WordPress?
- When can you get current page ID and initialize hooks right after?
- What is the ‘admin_action_’ . $_REQUEST[‘action’] hook used for?
- Filter out results from REST API
- WordPress admin notice in plugin function
- Using the ‘draft_to_publish’ hook (post status transition)
- Filter Hook on plugin update
- WordPress Hook that will run when media file deleted
- Disallow a user to post in certain categories
- Intercepting a add_action
- Generic plugin (de)activation hook?
- disable active plugins for specific theme
- Adding a form at the end of the content
- Find out if request is for custom post type archive before query runs
- Use external link in the add sub menu
- Failed to invoke other hook from the init hook
- How can I add a custom meta value on file upload?
- How can I filter blog name?
- Is it possible to remove this action? (as it’s added just before it’s called)
- Woocommerce Shipping module available only for type of products [closed]
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- Determine plugin name from within plugin_action_links filter
- Placement of Code in Plugin for hooking `save_post`
- publish_post plugin hook doesn’t always pass $post->post_content
- How to initialize something in unit test before the init hook being called?
- ‘wp_login’ action hook not working with wp-login.php file
- Prevent a plugin from being automatically activated
- Where (or when) should I register a new taxonomy?
- How get a value from a plugin into another plugin through action/filter
- Hook (or other way) to find out when another plugin is activated / installed
- Any hook for pre-plugin-update -either bulk or single plugin update
- Inserting above the comment template
- Insert new user with form submit ‘init’ hook
- How do I display only the latest post on my home page, while maintaining proper plugin hooks?
- Modifying the comments section through a plugin regardless of theme
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- wp_get_post_terms is difference obj model than the one in rest api response
- Get Time Taken By Each Action Hook in WordPress
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Best place for short bio,image and button [closed]
- password_reset hook is not working
- Hook into existing tinyMCE button
- How to get post ID with hooks publish_post, new_to_publish, etc
- edit_user_profile and show_user_profile are not firing inside a class
- Template filter for custom taxonomy terms
- What exactly happens to function argument availability when using a filter?
- Combining several CSS files into one for optimization
- the_post hook is not firing for me
- Create a post builder skin in a plugin
- Plugin Development – Functions or Hooks?
- How do I add some javascript validation to the admin interface form’s onsubmit?
- Can my hooked uninstall class function access a global var declared in main plugin file?
- Hook for page Request?
- How to remove js ui library added by default by wordpress
- Add item to the woocommerce dashboard menu from a plugin
- How to use the pre_option filter before a plugin loads?
- How do I add $_SESSION[”] to my wordpress page?
- WordPress: Add custom add_filter for custom functions
- How to remove a class function from a plugin by using remove_action()?
- profile_update hook doesn’t works inside a class
- Plugin: Hooking up classes that have their own hooks
- Hook for altering the content of all wp mails
- What hook can I use to modify custom post data before it is displayed on the page?
- How to deactivate my plugin upon deactivation of NextGen
- Hook for plugin to insert into entry-meta
- Why does “updated_post_meta” did not fire when uploading media other than image?
- Build a must-use plugin that tracks when other plugins are activated or deactivated
- Change Dashboard URL from wp-admin to wp-admin/index.php
- Activation flow of a plugin in a multisite environment
- Callback hooked to post_updated firing on new posts as well
- Randomize post (and page) IDs on generation
- My plugin runs on every single WordPress page, but I want it to run only on activation
- The function called on the wp head hook becomes null
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Replace plugin HTML to single text using hooks
- Customize plugin templates
- Hook on widget context plugin to add custom context for widget
- wp_login_form() ignoring login_form action hook
- Admin page and admin menu. Permissions plugin
- How should I use a plugin function as a hook?
- change output location of plugin function using a custom hook
- How to change value of $menu_class in ep_nav_menu?
- How to create and use Custom hooks
- Variable scope in plugin outside loop [closed]
- Checking url from plugin [duplicate]
- How to display a link in the footer section
- User register hook can’t access form request
- How to Add Extra Text In WordPress Title Before Post Publish
- Why is my activator class adding the files/running the actions I add?
- Change social icon in twenty twenty three theme
- Customize WP Filter Hook
- Remove H1 title in admin post edit screen
- What is the best way to override functions of thirdparty plugins?
- Remove 3rd party plugin notices from within own plugin