I am not sure about this specific example but in general plugins_url()
is fitting function for this.
Example from Codex:
plugins_url('/images/wordpress.png', __FILE__);
Related Posts:
- Post meta vs separate database tables
- How to add a javascript snippet to the footer that requires jQuery
- Enhance Media Manager for Gallery
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- How to create an API for my plugin?
- Plugins in symlinked directories?
- How to use PanelColorSettings in custom Gutenberg block?
- Is there a way for a plug-in to get it’s own version number?
- How to add tab which is visible only in admin side of product in woocommerce? [closed]
- How do I print a notice only on certain admin pages?
- Hook the Keydown Event in the TinyMCE Post Editor
- Create a clickable name in WP_List_Table for Plugin Admin
- Plugin development without Theme adjustments?
- How to Make a Category Always Selected?
- Unable to write test cases for a WordPress plugin using PHPUnit and WP-CLI
- ERROR: Options page not found – saving settings page with tabs
- What is the difference between current_page_parent and current_page_ancestor?
- Can I leave out `if ( ! defined …)` when defining plugin constants?
- Using the component outside the editor. select(‘core’) is null
- Gutenberg is there a way to know if the current block is reusable?
- Any ideas how to make unit test read the theme functions.php?
- WordPress Ajax callback function from plugin – OOP
- Is there any way to have Featured Text, as opposed to Featured Image?
- StackExchange clone using WordPress?
- Custom url for a plugin page add_rewrite_rule WordPress
- Is there a way to ensure plugin script loads before another script?
- Custom attribute type not displaying terms in edit product – WooCommerce
- How do I add a prefix when a user registers
- Verify if user is wordpress logged in from another app since wordpress 4.0
- Short code not working in boostrap modal dont no why?
- how to get link of added document with a post
- Doubts about the use of metadata and how this can affect performance on WordPress
- How can I replace content in the WP Admin area before an admin page is rendered?
- update_post_meta not working in a loop
- When is the proper time to minify css and js with git workflow?
- Get draggable widgets on Edit Post page
- Plugin that saves form data
- how to invoke wordpress API from other existing PHP system
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- update your existing plugin’s WordPress compatibility
- How dynamic action login_form_{action} is working
- How to get the post excerpt using post object?
- jquery & ajax sending data to php
- How to import the css in the plugin admin area?
- What’s the impact on WordPress’ performance regarding the amount of classes/files in a plugin?
- Using add_sub_menu to put into Appearance Section
- Can I use %category% like Templates in my Plugin?
- How to get the url of logo image?
- Plugin path comes wrongly
- jquery in wordpress plugin with depdendency
- Replace first occurence of a word with link [closed]
- Converting core modification to a plugin
- wordpress automatic update does not run
- Ajax +wordpress onClick link redirect to new page and create html content
- Adding filter to the title without affecting the menu title
- Script to replace default blogroll with links to my social media URLs
- How to show multiple instances of the WP125 Widget?
- How can the_excerpt (or equivalent) be called on a category description?
- Plugin Creation: Overriding upload_max_size and post_max_size
- Problems with wierd characters and my plugin
- How to call a function from a shortcode function in an oop plugin
- How to access index file in Block Themes?
- wp_new_user_notifications to notify user and admin about new user registration
- Posts form with AJAX request – Plugin development
- Multiple TinyMCE on button click is initialized and appended but why only last one is writeable?
- How to create a custom post-new.php page for plugin , no wp menu
- How to create a custom WordPress page with my plugin?
- Want to know how to reveal a WordPress theme, considering the theme name is hidden?
- Where to add functions and code snippets in wordpress
- How to re-render inspector controls?
- Why User_login key doesn’t work with wp_update_user()
- Sanitize WordPress Array Input?
- WC REST API Error Handling
- Shortcode content is not showing. Only the [shortcode-tag] is showing
- How to remove the WooCommerce Product->Category thumbnail from admin [closed]
- Is it possible to replace MySQL with JSON files for WordPress
- Creating a virtual page without exit
- Plugin Development – Call to undefined function comment_exists()
- Replace “content-area” of themes 404 page with plugin?
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- WordPress doesn’t create table on plugin activation
- Create Customization panel for Plugins not for theme
- How is construct function working even when variable is assigned null value?
- Allow user to change homepage
- Custom signature appears twice on page
- Declaring a new woo commerce product type i get this error
- wp_mail links are dead
- List Available Templates for Current Theme in a Plugin
- Adding Third Post Box Column: postbox-container-3
- Get custom wp_query search results to appear on search.php
- Is it safe to use PUT and DELETE requests
- WooCommerce custom payment gateway
- Multi-part form and wp_redirect()
- Sharing changes to a post (preview changes) with another user
- What’s wrong in the WordPress Meta Box Generator code?
- add category id to option name when adding an option on edit_category
- esc_url, esc_url_raw or sanitize_url?
- React Plugin Settings Page Localization
- Is it within WordPress guidelines to update another plugin’s database fields from my own plugin? [closed]
- Block Development: hamburger module throwing error in save function