Choose one file to be the main file of the plugin.
From it, use
require_once( plugin_dir_path( __FILE__ ) . 'another-file.php' );
for each of the other files you want to include.
This means the rest of the files no longer need the plugin comment header, just the actual code that does whatever you need it to.
Related Posts:
- What is difference between get_bloginfo(‘url’) and get_site_url()?
- How can I make it so the Add New Post page has Visibility set to Private by default?
- How does WordPress handle MySQL row lock errors?
- Page Templates from plugin not working after upgrading WP to 4.7 or upper version
- How to add option box in “Edit Post” plugin API?
- Sync my svn repositories
- Override plugin localization
- When do I need to use esc_attr when using WordPress internal functions
- Avoiding plugin name collisions with WP updater
- Using standard backend elements in Plugin
- Plugin development: how to create a form and get custom data?
- Security error WP 4.0 + WP phpBB Bridge [closed]
- How to list the Hooks and order of execution in current loading page? [duplicate]
- How to make my plugin theme-independent?
- Execute a function using ajax
- Updating post meta for custom post types
- How to bulk send emails
- How to handle the Plugin Version on Update using Tortoise SVN and the worpdress.org Plugin Repository?
- Custom Shipping method not showing in checkout
- REST-API: extend media-endpoint
- How to get the permalink of a page when loading my plugin
- How can I create a simple interface for my WP plugin?
- Where to put my global functions?
- Ajax gives 400 error
- The Point of Using apply_filters()
- Where does WordPress register default scripts like jQuery?
- Adding Attachment Display Settings in custom media frame
- Is it possible to enqueue CSS files from plugin before theme’s CSS files?
- Serialize data for wp options
- Determine Registered Admin Menus
- React JSX in WordPress Plugin Development
- My plugin wants to update another plugin
- Help With MySQL to WPDB Query Conversion
- code is working properly in Core PHP but writing coding in WordPress
- Using SVN to upload plugin created with gutenberg blocks
- Force quit running background job
- Custom plugin init action causing general slowness
- Check if plugin exists/active “class_exists()” does not work on plugin territory
- How to get the permanent link in a plugin?
- Duplicate results are displayed in a custom plugin [closed]
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- breadcrumb need to show all pages and subpages
- Widget’s container?
- custom uploader in the admin area
- Best/Correct way to add an option to a category
- Basic question about accessing scripts in my plugin
- I receive taxonomy id
- Loop in elementor custom widget not working
- WordPress SVN UTF-8 issue
- Error with get_price (and others) in self-written plugin to show price
- How to access OOP plugin function inside themes or other plugin
- change or add css to theme from plugin
- WordPress Widget Not Saving Instance
- Issue with wp_handle_upload
- Different registration form for different roles
- Custom Fields for Page Edits
- My plugin does not install correctly if a previous version is still installed
- How do I remove all traces of a plugin?
- Is it possible/advisable to set last stable version to previous version?
- How to make sure settings are not lost when plugin is updated?
- How to solve conflict with scripts?
- wp_insert_post not inserting post from XML
- How can replace this url
- Access “wp site health info” data from plugin
- WordPress Frontend Page using Plugin
- How to overwrite a plugin?
- How can I translate something in my class constructor of my plugin in WordPress?
- Define global variable in theme file and call that variable in plugin file
- SimpleXML is not working with xml response from external api
- Custom Plugin Update
- Change Woo Custom Endpoint Titles from a Plugin
- Custom wp_list_tables redirect on specfic page
- Hook to display element as product on category page
- Missing files in enqueue actions causes WordPress to reload
- I can’t use WP_Query
- Adding/ Removing actions for plugins
- Get input form data posted by users
- WP Plugin: Print javascript in header
- wp_verify_nonce fails always
- Custom Plugin: Point to `template_directory`
- Adding list of Indexes in wordpress document
- API Functions to Register and Show WordPress List Tables
- How to save default values into an option and delete those upon actvation and deactivation in wordpress?
- How to Add Jquery FullCalendar in wp plugin in admin
- Validating values using Settings API?
- How to use a Must-Use plugin to hide a regular one and to hide itself?
- WordPress plugin not eching popular posts
- My first plugin doesn’t save the data in options
- Breadcrumb is not generating the correct post page url
- Check if MemberPress exists before add_action call
- SOLVED – $wp_admin_bar and AJAX calls
- Integrating WordPress Content into a jQuery Slider
- Outputting custom field query from a plugin to the website header
- How to set meta-data for my plugin
- WordPress isn’t sending welcome email with the password reset
- A splash page on landing page
- Inline AJAX script passing variables to PHP
- How to trigger plugin migration code when plugin updates?
- How to Save Category and Delete Category in same Function
- claim a permalink and all sublinks in plugin