Within the plugin’s main PHP file:
$plugin_data = get_plugin_data( __FILE__ );
$plugin_name = $plugin_data['Name'];
Related Posts:
- Custom Post Type Templates from Plugin Folder?
- How to structure a plugin
- Add multiple plugin directories
- Best Practice for Referencing the Plugin Directory
- How MUST the directory for a plugin be structured?
- How long does it take for a new plugin to be approved?
- A way to sort WordPress themes? [closed]
- How to install WordPress Multisite with different domains under the same subdirectory?
- Hosting plugin Google Code with auto update?
- register_theme_directory somehow “fails” when folder is outside of WP-Folder
- Opendir and WordPress Path
- What is the best way to move a plugin´s subdirectory+files to wp-content/uploads-directory?
- Organising the plugins folder in wordpress
- Is it possible to group plugins into a folder?
- How to upload images to WP Panel keeping correct folder in FTP
- Solutions to repost categories into multisite blogs?
- A new translation folder overrides my usual translation from “nowhere”
- Installing plugins and using complex folder structure with child theme in WordPress
- 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?
- wp-mail attachment is not sent for no reason?
- Minimize and Uglify WordPress Plugin Files
- Should meta boxes for specific pages be save in their own plugins?
- Where should I store disabled plugins?
- Disable plugin visibility at the plugin directory
- How to write to the plugin’s directory?
- How to call php file in theme directory from plugin
- add menu page not showing Icon
- how to include my homepage and scc in to a plugin
- How can I upload and password protect Javadocs in WordPress?
- Can we rename a plugin directory for a already launched plugin?
- Custom Gallery plugin uploading to different dir, and post to page
- WordPress Overrides folder permissions in Cpanel
- Server Path Information
- Register additional wp plugin directory
- How can I get information on who is downloading my plugin? (new to this)
- Change weird Wp File structure
- What are the implications of having main plugin file name different to plugin slug?
- I changed font of wordpress dashboard but it is slow!
- wp_dequeue_script for a Plugin
- Location dependent rendering of locations? [closed]
- Creating a widget and missing jQuery
- SMTP Error: Could not authenticate [closed]
- How to add support for caching plugins for my own plugin?
- My custom php file keeps 404’ing in WordPress when I call it. What am I missing?
- Use $variable from file1.php in file2.php (different file paths)
- How to import WordPress site to new WordPress site?
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- Need to replace Currency Shortforms
- Looking for a free quiz plugin which saves the candidates answers for review [closed]
- wp_enqueue_scripts
- Why Does The `auto_update_plugin` Hook Disable Management?
- Return multiple values in a shortcode attribute
- Allowing .rfa Files In Media Upload [duplicate]
- Sanitizing file & directory form input
- What’s my optimal choice for remote access to my localhost sites?
- Some WordPress Posts are automatically becoming comments on other Posts
- List category posts displaying limited posts
- Get Every Key & Value from Array then Display All in New Line
- What are admin hooks
- disabling ftp on wordpress
- Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
- Is there a way to add custom endpoint to specific page only
- “uagb/section and uagb/columns block”
- IF condition based on wp_remote_get output
- shortcode not return any thing in Gutnburg
- Fatal error on some pages after cancelling WPSTAGING cloning process
- Always get creating a new table with foreign key
- Progmatically adding menu links to the default (Top) or Footer menu
- Add text to variable
- Where is my google maps on my page? [closed]
- standard custom page template hierarchy for plugins
- get specific value of a array | PHP
- How do I add $_SESSION[”] to my wordpress page?
- How to get specific string/value from an array? php [closed]
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- How do i show different group of images below a button when the button is clicked on the same page in wordpress? [closed]
- plugin wraps the entire content
- React error #231with Custom Blocks after upgrade to WP 5.5
- Add User Role: Pre-saved in User-Meta [SOLVED]
- There has been a critical error on your website – won’t fix no matter what
- Adding custom meta boxes to specified custom post type
- WordPress Console Application (ability to excecute a custom function via crontab only)
- Get orders of a specific customer woocommerce
- What am is missing? (API CORS)
- How to do database for download stats?
- Shortcode Attributes to Return different $_POST
- How to find out which plugin create captcha after login?
- Comment IP Plugin – Fixing onfocus=’this.select()’
- How do I make reusable content blocks for header and footer when using WordPress headless with another front-end?
- WordPress 5.4 – How to prevent to enter only certain values in custom field
- What form should the $query media query array have for an Elementor page builder function? [closed]
- Private Page View Counter
- WooCommerce: Force coupon for existing/registered customers [closed]
- Plugin Activation Error – The plugin generated 22 characters of unexpected output during activation
- Plugin Admin Menu Boiler Plate
- How can I add IP address to my post?
- REST API can’t get the response manually
- Super slow plugin page (lots of error 500)
- How to make a dynamic css class whose name changes every visit to confuse scraper