function test(){
wp_enqueue_script('myscript', plugin_dir_url(__FILE__). 'js/test.js',array('jquery'));
}
add_action('admin_print_scripts','test');
add_action('wp_head','test');
Related Posts:
- What’s the point of using WordPress’s built in admin-ajax.php?
- Ajax request sends url rather than data
- Adding a jQuery modal dialog to the admin area
- Create tabs inside Plugins Admin Page [closed]
- Changing the “Plugin Activated” Message Default
- What are the best practices for updating?
- How to set back-end language per user?
- Is There a WordPress Hook to Filter the Edit Posts View?
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Custom plugin settings: clicking “save changes” does not display success message
- How to fetch serialized data from wordpress options
- How to load plugin before the wordpress jquery?
- Trying to add admin file upload form plugin
- WordPress Plugin Look & Feel
- Why is my ajax call refreshing the page?
- Disable wordpress from including jQuery in the head section
- Admin-ajax.php is dying “0” without processing function
- How can I get a list of plugins and which blogs are using them?
- Is there a way to lock certain pages from being edited by anyone other then the admin?
- How to set CORS header?
- Plugin jQuery version VS Theme jQuery version: search for best practice
- Adding a jquery script to plugin contact form 7
- jQuery function didn’t work in my plugin
- How do I remove the entire left nav bar in admin for certain level users?
- Making menu link open in new tab?
- How to handle admin and passwords requests from plugins developers?
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- JQuery not working in my plugin [closed]
- How can I make uploaded images in the editor load with HTTPS?
- Notepad sticky plugin
- Loading jQuery UI in the head
- See which user installed a plugin?
- Form isn’t inserting data into database with ajax plugin
- All Users > User List > Update User Meta Field Inline
- custom changes removed after plugin update
- Error with Image Slide plug-in/ s3slider in WP
- Need to change url paramenter of share product pintrest [closed]
- How to tie dark mode with prefers-color-scheme webkit? [closed]
- Plugin dependencies: show notice like theme plugins dependencies
- jQuery for custom plugin not working with Divi theme
- Sync User to cPanel webmail?
- Adding CSS to custom post type admin page causes error
- Create shortcode to echo javascript
- how to insert data in wordpress table usnig jquery ajax
- Display Custom Field Value on Admin Page Column
- How to remove/hide Yoast’s “SEO” tab in admin panel?
- this jQuery function works perfect in static html page but not on wordpress
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- How does one include the JQuery UI plugin to wordpress and enque it correctly in a plugin form?
- Move plugin-settings to ‘Settings’-menu in the admin
- How do I add some javascript validation to the admin interface form’s onsubmit?
- remove all submenus from plugin
- Create WordPress posts from JSON array using plugin in admin
- Plugin getting Cannot modify header information errors
- creating a plug in that would tap into save/update action of posts [closed]
- Is there a function to list all uploaded images? How can I add one?
- How to remove js ui library added by default by wordpress
- How to see which sites use my installed plugins (wordpress multisite)
- Creating a widget and missing jQuery
- How to use the CSS of the WordPress core in the development of my administration page?
- Stop wordpress from requesting external jquery from googleapi
- WordPress permissions error with admin account
- getting notifications about updates only in the “core” page
- Api external with wordpress
- JQuery needs to be defined in , but Gravity Forms is defining it in the
- Why do I get jQuery reference error / undefined when changing name of plugin file?
- Problem after updating plugins
- How to prevent tabs from opening all at once
- problem with register_activation_hook in plugin
- Separate jQuery for Individual Comments?
- How to hide plugin options for editors via functions.php
- How to add captcha to publish widget
- jQuery slider widget similar to cnet.com
- Problems with jQuery and is_admin()
- Get the link title attribute and send it google analytics as custom label via google tag manager using beehive pro for WordPress
- Can I create a separate admin section for my plugin?
- Mixed content error after adding SSL certificate
- Hide button after form submit and save state to localstorage
- myStickymenu hide on scroll up to certain Y values
- How to solve Blocked a frame with origin from accessing a cross origin frame error in wordpress?
- jquery plugin won’t fire when hamburger class element clicked
- Disable plugin for administrator
- Storing Array of values into wordpress options
- jQuery to show icon after .hide
- Get content and send to 3rd party
- Wordress admin page is fetching error You do not have sufficient permissions to access this page.
- Admin page and admin menu. Permissions plugin
- Not getting result using ajax on wordpress
- Theme Load Error
- Getting 404 page not found error while trying to access add new plugin / themes
- Create a blank admin page from plugin
- WordPress plugin ajax post parameter
- WordPress plugins not showing after switching servers
- How do I output user_registered time in my correct timezone?
- Ajax in Plugins: returns the whole page
- Adding hero images to blog posts
- Shortcode return is printing a 1 afterward
- FacetWP: Plugin breaks button/modal functionality inside searchable content area
- Need help with restricted page for users