There’s a filter:
function wpse15368_update_menu_item_type( $args )
{
return $args['menu-item-type'] = 'page';
}
add_action( 'wp_update_nav_menu_item', 'wpse15368_update_menu_item_type' );
Related Posts:
- Objective Best Practices for Plugin Development? [closed]
- How can I add an option to the Page Template list from a Plugin?
- template_include (overriding default plugin templates via current theme)
- Using composer for dependency management in plugindevelopment
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- wp_mail is undefined
- What is the correct way for plugins to create tables with special charset/collation considerations?
- Cancel post save
- How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
- What is the best way to do unit tests for your plugin in 2018 [closed]
- permalinks with get variables
- How to add a link to WordPress Plugin install Listing
- How to ensure “the_content” filter runs only for the main displayed content?
- Get file headers in custom file
- Hourly WP schedule, do I need at least 1 visitor hourly?
- wp_query (and post_id) is empty in admin_init
- I should hide the API Key in a plugin?
- Utilize TinyMCE hyperlink chooser outside of TinyMCE
- Settings API – Undefined Index when unchecking checkbox
- Can’t echo get_delete_post_link
- Why is my shortcode not working
- Creating option to allow user to select the page my plugin content will display on
- What is the difference between these two methods of writing $ instead of jQuery in WordPress [closed]
- WordPress plugin options and jQuery
- Inserting JS snippet in the footer if there is no wp_footer?
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- Use php libarary in wordpress plugins
- Can’t get JS code to work with shortcode
- How do I add a javascript file to all admin pages via a plugin?
- unable to stop loop when using wp_insert_post with publish_post hook
- How to add a secondary button to a settings page with a custom action?
- Plugin options page – form with two different submit buttons
- Show Parent category and Subcategory
- Frontend Ajax call not working using wp_ajax, wp_enqueue_script and wp_localize_script
- How can I gracefully escape an error condition?
- best practice for query string values – get_query_var always empty for my value supplied in query string
- update post meta for checkbox in the admin when inserted in the front-end
- Gutenberg Block showing invalid content on edit
- Register a sidebar in a WordPress plugin
- Plugin development: can’t update settings with multiple settings sections
- How to implement filesystem cache in WordPress
- Check for template part, else filter content
- How can I add a custom “Text” widget to Appearance manager from functions.php?
- How to stop your plugin from executing on certain pages?
- what are the checksums surrounding keywords in the SQL generated by WP_Query and do I need to use them too?
- Search the product by tag or category not working
- Is it possible to make sure that only my plugins output is shown to the enduser?
- How to do POST request with WP REST API v2 to custom table?
- Plugin generated virtual pages
- add javascript files only when plugin is called?
- wp_dropdown_roles() to replace option value = code
- WordPress function get_the_terms() returns ‘Invalid taxonomy’ error
- Codex Version Focus on Production or Nightly?
- Make a plugin page out of influence of the theme’s style
- plugin_dir_path wrong url
- 400 Bad Request, in wordpress theme development, wp_ajax
- Fatal error: Uncaught Error: Call to undefined function convert_to_screen()
- Return Value of load_plugin_textdomain
- Special Formatting for WordPress Plugin Description?
- Multiple array for post_content on plugin activation
- Using AND and bracket grouping in SQL not working
- Taxonomy archive page listing terms instead of posts
- Check if the current user is author of first comment
- custom wp_editor does not save the content in plugin settings
- How do I force a download in the admin area?
- add_action wp_ajax_ not loading in plugin file WP Network
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- How Can I Add Code To A Preexisting Function Without Editing it
- Change the behaviour of a button
- Login page too many redirects
- Configuring Xdebug with docker compose
- escape html in jQuery for WordPress
- Progress bar in plugin within admin
- Jquery php request is returning a weird result
- WordPress admin panel not working
- Redirection from a specific page for users logged in but not with membership
- Load script on frontend from widget plugin
- Can’t get wpColorPicker to work in a widget
- Get the current post/page URL with plain permalinks
- Using the same class across multiple functions
- ajax multiple Values
- Change Label of custom post type
- admin-ajax.php returns “No Script Kiddies!” sometimes
- Ajax functionality not being called under wordpress plugin
- Widget won’t be activated
- Plugin outputs content of posts unbidden!
- Add a description/hint field in the admin page of a plugin
- Client Profiles
- Saving multiple fields as array
- Serialized Data
- Can’t add images in wordpress to my page – button isn’t clickable
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Gutenberg text field validation
- I don’t understand how symlinks in plugin work
- Undo operation not working in Rich text [Gutenberg]
- Update custom settings field in plugin
- URL rewrite parameter lost (add_rewrite_rule)
- PHPUnit Ajax Serialization of ‘Closure’ is not allowed
- Is it smart to require_once wp-admin/includes/plugin.php when you need only one function from it
- multiple record insert creating many duplicate records