It’s only a good pratice to adopt this naming convention. As long as you have in the header of your main file the meta (at last Plugin name: Name of Your Plugin
, WordPress will automatically recognize this file for being the main one.
Be aware that at the top of this file you should write at least :
/*
* Plugin Name: YOUR PLUGIN NAME
*/
In the plugin handbook, WordPress it is written :
Create a new PHP file (it’s also good to name this file after your
plugin, e.g. plugin-name.php).[…] Only one file in the plugin’s folder should have the header comment —
if the plugin has multiple PHP files, only one of those files should
have the header comment.
As you can see, it’s only a naming convention. It is not mandatory.
Related Posts:
- How to structure a plugin
- Add multiple plugin directories
- Best Practice for Referencing the Plugin Directory
- How long does it take for a new plugin to be approved?
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- How to get path or root of plugin folder, not file or dir?
- Minimize and Uglify WordPress Plugin Files
- Disable plugin visibility at the plugin directory
- Can we rename a plugin directory for a already launched plugin?
- Register additional wp plugin directory
- Change weird Wp File structure
- Pass PHP variable to javascript
- Namespaces in WordPress – How do I initiate the main class?
- wordpress get meta value by meta key
- What areas to Unit test while building a plugin?
- How to get the current plugin name?
- Registration Form Validation in wordpress
- Errors while using ajax from external wordpress page
- Pass A Value From Outside To A Plugin Variable
- Dequeue / Deregister script and replace it with a new plugin
- How to handle autoloading with composer by keeping the WordPress naming conventions?
- Hide Theme options and Customize Admin menu
- Current user in plugin returns NULL
- How can I implement a notification system in wordpress?
- Minimum PHP Required for WordPress
- Building an email signup form. Where should the information be saved in the DB?
- Custom form action to handle data inside a plugin
- WP Post Template – Templates in own folder
- Create entire wordpress as a github repositery?
- custom payment gateway in woocommerce failed to connect to remote api server
- Plugin options page with live preview?
- Ajax call returning 0
- How to update post’s content on post publish?
- Conditional attributes and logic per product category
- WordPress plugin admin html being shown in Customizer iframe
- Displaying Custom Sidebar Without Modifying Theme’s Core File?
- Ordering taxonomies by rank
- Plugin Options not being output
- Can I create a table on my DB without creating a plugin?
- Submit Form data to another page via Ajax (WordPress Way)
- WordPress checkbox and Illegal string offset
- Is it fair to use MIT licensed code in WordPress plugins? [closed]
- How to add an element right after the article using jQuery?
- How to reset wordpress but not plugins and settings
- add_submenu_page returns null
- get_option / wp_localize_script Not Working in OOP Plug In
- Switch from wp-cron to a server cron job
- How to Show Author image and url in WordPress plugin directory? [closed]
- Plugin generating unexpected output – on WP mysql dump import
- Remember the Meta Value With Radio Buttons
- jQuery code didn’t run on my plugin
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- How to embed a new string in url?
- Custom characters of tinymce editor are saved as question mark
- Custom Module, Extending WP with a Plugin?
- How do I profit from a Plugin?
- best way to run a php script away from the template?
- Themes conflicts and overrides my WordPress Support widget Plugin styles
- Disable Author Archive just for certain roles in bulk
- Seperate plugin and theme files
- Add hook after content without formatting
- User loggedin as Subscriber form not sending
- wc_get_template_part doesnt display the content [duplicate]
- How to properly use wp_mail() in my own plugin?
- admin_post hook not firing function inside class
- Thumbnail image doesn’t show up in Shortcode output
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- list of custom post by custom field in frontend
- How to implement color picker from WordPress in my boilerplate plugin?
- custom post type plugin error [closed]
- how to auto random increment for post view
- Fatal error: require_once(): Failed opening required
- How to properly enqueue jQuery knob on WordPress without conflict?
- Admin menu hilighting wrong item for CPT
- How to save the option’s new values plus old value without overwrite old one
- Not displaying Woocommerce product page in lightbox
- ajax voting for custom post type
- Can we validate data from jquery
- WordPress environment not loading properly
- Delete postmeta when uninstall/delete plugin
- how can i get records from wp_postmeta table using particular meta_key in database?
- Inactive Plugin Files
- Saving an array to get_options
- Getting error “The package could not be installed. PCLZIP_ERR_BAD_FORMAT ”
- show Visual form builder in the front end
- Plugin – including external javascript calling google maps
- Help me with my first very basic plugin
- wordpress plugin | short code issue
- HTML link within my plugin settings page
- How to create post comparison in wordpress
- How can I create a navigation menu in the sidebar that can also act like a slider?
- How to create a sharing marketplace with wordpress for bicycles?
- Displaying Category Feature image on loop
- How to check record is exist or not in WordPress CRUD Operation with $wpdb
- How to add a simple design in classic editor plugin creating post page through another Wp plugin
- How to disable pagination in WordPress’ API results?
- Why is my Gutenberg block not saving and rendering the chessboard?
- Is it possible to use Classes between WordPress plugins with separate namespaces?
- 403 forbidden error in the admin panel as well as on the admin-ajax.php file
- Custom Search Function in WordPress Returns No Results