It doesn’t make a lot of sense, to me, to say “these should not be used directly by plugins”. I tend to think you should use an available function over the constant – if an available function exists – which, in your case, does not. I would go ahead and use the WP_PLUGIN_DIR constant.
Related Posts:
- How to include class from addon after to be sure one class exists in the main plugin?
- include wp-blog-header not working on MAMP
- get_option() not returning expected value from plugin
- include php file if page_id matches
- Include file in plugin file
- can’t access some WordPress function from my plugin
- I’m including a html file in my plugin, but it can’t find its css or js files
- Including content into an add_shortcode() function
- How to include files in the loop via ajax
- dbDelta not creating tables
- How to fork a plugin?
- Default table collation on plugin activation?
- How to implement color picker from wordpress in my plugin?
- Nonces can be reused multiple times? Bug / Security issue?
- Single Responsibility Principle and WP Classes
- How to auto-upgrade my plugin?
- Category listing with thumbnail and description on home page
- How to Add a .js file Only in one specific Page Dynamically to Head
- Displaying search results in the widget itself?
- Missing “category_children” option when dynamically creating categories via a plugin
- Developing a plug-in to charge for
- How to exclude content (and other returned values) from WP_query()?
- What is better way to use Bootstrap inside admin panel?
- Looking for callback function after Gutenberg is rendered?
- How to duplicate a curl XML request using HTTP API?
- 404 errors after plugin options update and category base change
- How to determine, from plugin script, if active theme has The Post Title
- Widget Admin – Form Submit Event?
- How to add pages to custom menus on the fly [duplicate]
- add_filter : Passing an array instead of the callback function?
- WordPress security issue to output data from user input from theme option form
- How to add settings subpage from a plugin to a settings page created in theme?
- Using wp_parse_args to set up Plugin Default Settings
- how to add Jquery script to one page?
- how do you prevent showing a particular category on the admin dashboard for specific user roles?
- how query string in wordpress receive the value other than post and page [duplicate]
- get_posts() not working when accessing with a custom user role
- Is there no admin ui guide for 4.x?
- Is there an event or an other method that tells me the preview is loaded?
- Admin Plugin POST to another file within the plugin
- Do I have to worry about useState causing a re-render?
- Plugin sub-menu pages recommended structure and links
- Widget Dropdown doesn’t working
- mysql_real_escape_string() vs. esc_sql() in WordPress
- Display list of uploaded images, filtered by user under a specific user group
- pagination in a custom list created with get_pages function
- Bug: Post needs to be updated twice when adding action for save_post hook
- my own SVN for a plugin/theme
- How to enqueue scripts in right way in a plugin?
- Plugin AJAX Save to Custom Table
- How can I add function calls to my plugin’s options.php default submit routine?
- How To Update WordPress Custom Plugin For Customer? [closed]
- Secruity Questions on a timer
- Add location tag to wordpress posts
- Open tab on current day problem jQuery and WordPress
- get_shipping_methods() return empty rate
- Plugin working on my local installation but Cannot be activated online
- How to insert HTML/CSS/JS into my iframe plugin?
- Is there a WordPress plugin to design WebGL? [closed]
- WordPress Page Reload Takes forever during theme development
- How to close tinymce inline popup
- Why doesn’t update_post_meta work for certain strings?
- How to add some basic inline CSS using existing plugin or theme?
- Font size of HTML content
- How to write a shopping queue line plugin with a queue button?
- New jquery and bootstrap breaks plugin
- WooCommerce maintaince mode by using php
- Rerender core Templates with with ToggleControl but it doesnt recognize block type
- How do I add filter with woocommerce categories?
- Where do I hook to have the server do something in PHP on block attribute change?
- Some difficulties in implementing markdown editor
- WordPress shortcode with a switch
- How to get access the ID of all posts of custom post type in Gutenberg editor
- Share functions between admin and frontend
- Editor Plugin – Breaks when toggling between Visual to Text
- Woocommerce Single Product Tabs Got Duplicate
- Can i prevent the effect of the_title filter on the dashboard’s posts/pages titles?
- How to embed or integrated a custom WordPress Widget into the theme?
- Making adding info to an overlay bio easy for average user?
- Moving the “share” button
- Confusing $tag specification for apply_filters call, in core options.php code
- Delete Query executing regardless of WHERE Clause condition
- How to change the wording of front-end `next article` for custom type registered in a plug-in?
- Get (eventual) permalink from post within Edit Post in Admin panel
- Ajax not working to insert, query and result data
- WordPress User Management Departmental Managers
- Why is ‘register_activation_hook’ undefined?
- Redirections the right way inside a plugin directory
- Link to a admin submenu item using a custom link
- loop and in admin header problem
- Remove image in post when it’s removed in media library
- How to view plugin ratings?
- get_categories exclusion issues
- Facebook share button help
- How to Implement SAM Broadcaster with WordPress? [closed]
- Getting Plugin directory and url
- how do I find out if a placed order was deleted or trashed? [closed]
- How can I interact with a third party service that sends POST requests to me in response to the order information that I send them?
- Rest Api WordPress
- Images stored from external API not loading