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
- Best collection of code for your 'functions.php' file [closed]
- How to check if user is in back end?
- How do i know the current post type when on post.php in admin?
- Pass PHP variable to javascript
- Create tabs inside Plugins Admin Page [closed]
- Changing the “Plugin Activated” Message Default
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- What are the best practices for updating?
- force enqueue script to be first in order of prominence
- How to set back-end language per user?
- WordPress 3.5 Media Manager – add a button
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- How can I make default jquery version of WordPress “async”?
- Is There a WordPress Hook to Filter the Edit Posts View?
- Changing wp login url without .htaccess
- Add section (add_settings_section) to a custom page (add_submenu_page)
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Help making my pagination plugin better
- Admin plugin, how can I output a different content-type?
- Plugin or mod for wordpress to make content publication SUPER easy
- How can I log a user out of WordPress before the page loads?
- Handling jQuery Component Collision
- How to Add jQuery Infinite Scroll to My Custom Archive Page
- How do I only load a plugin js on it’s settings pages?
- How to enable Admins to see Plugins
- How to add a help tab to all admin pages – including plugin pages
- Custom plugin settings: clicking “save changes” does not display success message
- Creating button next to “add media” that allows you to choose a single post
- jQuery plugin only in one page/post
- Is dynamic forms/entries possible in Widget?
- Bad Request (Invalid Hostname) on working server, database problem
- How to develop a community feature in the dashboard for multiauthor site
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Editor not displaying dynamically after clicking on the button
- jQuery AJAX call not executing in Plugin
- WordPress Enqueue Script Chaos (jQuery & Foundation.js)
- How to fetch serialized data from wordpress options
- Check javascript file Proper way in functions.php
- How to load plugin before the wordpress jquery?
- WordPress Plugin development Call to undefined function jQuery()
- Add jQuery to WordPress page
- Trying to add admin file upload form plugin
- WordPress Plugin Look & Feel
- Why is my ajax call refreshing the page?
- Is there an action that is called when a post is restored from the trash?
- How do I use WordPress PHP functions in my Javascript code?
- 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?
- Filter or action hook to insert content on admin pages before tag
- Is there a way to lock certain pages from being edited by anyone other then the admin?
- How to load default scripts included with WordPress correctly?
- Get image URL from media library in input
- why in my wordpress admin panel the membership option is not showing
- How to create popup same as wordpress popup feature
- How to set CORS header?
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- Ajax with jQuery UI dialog not working
- Plugin jQuery version VS Theme jQuery version: search for best practice
- How to edit/delete single row items in a table on my own menu page
- Adding a jquery script to plugin contact form 7
- jQuery function didn’t work in my plugin
- Admin Dashboard with Custom Tab for Client
- Moving WordPress from host without FTP?
- How do I remove the entire left nav bar in admin for certain level users?
- WordPress 3.5 Media Manager – add a button
- jQuery Plugin to use WordPress functions in AJAX request
- Handling jQuery Component Collision
- How do I make sure a plugin loads a script after jQuery
- how to include a simple jquery file into a wordpress plugin
- Making menu link open in new tab?
- Change wording of admin menu item?
- How to handle admin and passwords requests from plugins developers?
- Add get_option to jquery
- wordpress reusable content blocks
- Cannot access wp-admin after disabling all plugin
- Check if email address exists front end with AJAX in a plugin
- Set of plugins to control the Admin UI
- Pass a php string to a javascript variable
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- Calling JavaScript file with Custom Plugin
- How to send little data between admin pages of my plugin?
- Problem in loading javascript in footer
- JQuery not working in my plugin [closed]
- Using jquery migrate for plugins incompatible with jquery 1.10.2
- Which plugin will let me decide what users have access to on their side bar in wp-admin?
- How can I make uploaded images in the editor load with HTTPS?
- What would be the advantages/disadvantages of remote plugin installation?
- Editing admin pages in WordPress [closed]
- Hook to plugins admin settings
- Notepad sticky plugin
- scrolltop always 0, can’t trigger script
- Bootstrap Drop Down menu is not working
- Layout Plugin Admin Pages: Use BootStrap? [closed]
- Remove Duplicator plugin from admin menu if not an administrator
- Doubt using $wpbd->get_col for a single column