It should work (and does when I test on a new WP install) with __FILE__
, though it’s not recommended because it exposes the server path and is just generally an ugly URL. You can replace it with a unique identifier like ‘sb-generator-options’ or whatever really, as long as it’s unique. the important part is the last param that tells it what function to use to render the page.
Are you maybe moving add_submenu_page
out of the plugin file, or are you just editing it in place?
Related Posts:
- Alter how often WordPress Auto-Updates Plugins
- How can I find plugins’ slug?
- How do I exclude plugins from getting automatically updated?
- If I rename a plugin (in its main php file) do I still get update notifications?
- My custom made plugin has “a new version available” which links to unrelated plugin
- Link to Download Latest WordPress PLUGIN Version
- Can I change ownership of my plugin?
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Plugin update error message
- How can I modify what is being output in wp_head, whether by a theme or WordPress in general?
- How exactly does Bad Behavior plugin work?
- Automatically Import Image into Posts from URLs on the Web?
- Disable text tab on WordPress text-editor
- Set a User as Author of all ‘New Posts’ posted
- How to fetch serialized data from wordpress options
- Multiple Password Portal Page BEFORE User Account Set Up
- How to get the custom page get_permalink?
- Advanced Custom Fields into functions.php
- register_activation_hook in mu-plugin not triggering
- How WordPress autosave can save plugin fields?
- nonces in custom oop plugin
- Set a category for a page
- How to redirect a Custom Google Search to a wordpress page/template?
- Wp die causing 500 Internal Server Error?
- Preventing BFA in WordPress without using a plugin
- How to get post URL in the_content filter?
- Multisite installation but do plugins always have to be multisite compatible?
- Manually add order item with fixed product_id in WooCommerce
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- How to update WordPress plugins to latest using SVN
- Reduce Drop down Menu Width in WordPress
- WordPress get_option and update_option returned entered on the textbox field
- AddToAny shortcode in the loop
- How can I perform high-level database merging for WordPress within continues delivery?
- How to display (plugin?) output on a single page (not a widget, probably not a short code) – template, plugin, combination?
- Include live chat plugin into page content
- Self-serve ad system like Reddit’s for WordPress? [closed]
- How to password protect a category page / not posts?
- WordPress plugin updates / set file as immutable to prevent certain files from changing?
- AJAX search as you type? [duplicate]
- Custom setup of wordpress comments that are displayed
- Overriding post’s font-family
- How to keep variable `$post` to using in another file
- Why am I unable to load scripts in head in plugin?
- Best portfolio/gallery/carousel slideshow plugin with thickbox? [closed]
- Add SideBar/Widgets Just Below the Post
- How to use the CSS of the WordPress core in the development of my administration page?
- how to make dynamic subdomain for each user registering?
- Call Ajax URL in Plugin
- using add_action without having custom plugin or theme
- Am I allowed to enqueue scripts like this to control what pages they are on?
- Is there existing plugins to “Click-to-Launch” embedded Flash / SWF content?
- Using Microsift Word/Outlook for content publishing to WordPress
- How can I add user profile fields to my mailpress mailout
- How can I create a page as a draft from my plugin?
- Engadget Like most commented plugins
- Website Captcha Error: The reCAPTCHA wasn’t entered correctly
- How do I send the contents of a form to deliver to the already existing custom field in the wordpress theme
- WordPress Multisite Profile Picture Sync Error with Nextend Social Login Plugin
- WordPress plugins – “Update” in backend vs replacing all files with never version
- How to hide featured images of all posts falling under the same category in wordpress?
- How can I change a translation for a string in a plugin?
- New posts are not showing up on my front page
- Multisite – Cloning CPT pages + content (including ACF Flexible Content) from site to site
- Can’t Edit Row Layout on SiteOrigin Plugin
- Applying module CSS to page
- How can I recreate my HTML page with custom grid layout (blocks spanning rows and columns) in WordPress?
- Cannot view Custom Post Type no matter what I try
- Nested Actions and Filters
- WordPress products authentication
- Saving data only when payment is successful
- Creating a plugin to show a pop-up banner on every page
- How to use information from the database in the front-end?
- Plugin doesn’t update it’s version and code on WordPress.org
- Get value from an input field and pass into update_meta_data as $meta_value
- Method for creating many-to-one Relationships between custom posts and a single user?
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to delete posts older than one year with post meta, post attachments and files?
- Resetting AUTO_INCREMENT primary key
- Hide some shortcodes on posts from back-end
- Show a table from data submitted by a form from a user
- custom template only for content
- I keep getting fake users registrations
- Trouble implementing python on WordPress
- WordPress Search return wrong results
- WordPress audio player add class randomly using Audio Album plugin
- WordPress how to create grouping like category
- How to add multiple versions of the same featured image for SEO reasons?
- How can I process all requests for a given directory in a URL with my plugin?
- E-commerce-like solution [closed]
- Run WP inside a other Site without using frames
- Save post to category with gravity forms (post_data) [closed]
- WordPress Customer Reviews Error: Line 239?
- How do I edit a plugin’s core properly?
- Change Woothemes admin url
- wordpress illegal string offset ‘parameter’ error
- I want to set a different banner for each product in the woocommerce plugin on my wordpress site
- Remove embed url for internal links
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to override plugin function in code snippets WordPress