Ever want to introduce custom dynamic functionality to your WordPress admin pages and otherwise harness the power of JavaScript? Any modification you may want to do with JavaScript can be facilitated via this plugin.
Using this plugin you’ll easily be able to define additional JavaScript (inline and/or by URL) to be added to all administration pages. You can define JavaScript to appear inline in the admin head, admin footer (recommended), or in the admin footer within a jQuery jQuery(document).ready(function($)) {} section, or reference JavaScript files to be linked in the page header. The referenced JavaScript files will appear in the admin head first, listed in the order defined in the plugin’s settings. Then any inline admin head JavaScript is added to the admin head. All values can be filtered for advanced customization (see Filters section).
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
The plugin exposes four filters for hooking. Typically, code making use of filters should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain). Bear in mind that most of the features controlled by these filters are configurable via the plugin’s settings page. These filters are likely only of interest to advanced users able to code.
c2c_add_admin_js_files (filter)
The ‘c2c_add_admin_js_files’ filter allows programmatic modification of the list of JavaScript files to enqueue in the admin.
Arguments:
Example:
/** * Adds a JavaScript file to be enqueued in the WP admin. * * @param array $files Array of files. * @return array */ function my_admin_js_files( $files ) { $files[] = 'http://ajax.googleapis.com/ajax/libs/yui/2.8.1/build/yuiloader/yuiloader-min.js'; return $files; } add_filter( 'c2c_add_admin_js_files', 'my_admin_js_files' );
c2c_add_admin_js_head (filter)
The ‘c2c_add_admin_js_head’ filter allows customization of the JavaScript that should be added directly to the admin page head.
Arguments:
Example:
/** * Adds JavaScript code to be added to the admin page head. * * @param string $js JavaScript code. * @return string */ function my_add_head_js( $js ) { $js .= "alert('Hello');"; return $js; } add_filter( 'c2c_add_admin_js_head', 'my_add_head_js' );
c2c_add_admin_js_footer (filter)
The ‘c2c_add_admin_js_footer’ filter allows customization of the JavaScript that should be added directly to the admin footer.
Arguments:
Example:
/** * Adds JavaScript code to be added to the admin footer. * * @param string $js JavaScript code. * @return string */ function my_add_footer_js( $js ) { $js .= "alert('Hello');"; return $js; } add_filter( 'c2c_add_admin_js_footer', 'my_add_footer_js' );
c2c_add_admin_js_jq (filter)
The ‘c2c_add_admin_js_jq’ filter allows customization of the JavaScript that should be added directly to the admin footer within a jQuery document ready function.
Arguments:
Example:
/** * Adds jQuery code to be added to the admin footer. * * @param string $jq_js jQuery code. * @return string */ function my_add_jq( $js_jq ) { $js_jq .= "$('.hide_me').hide();"; return $js_jq; } add_filter( 'c2c_add_admin_js_jq', 'my_add_jq' );
Starting from $0 per month.
Rating
Reviewers
5 reviews
Tags
Developed By
Scott Reilly
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Discover Issues, Improve User Experience & Gather Leads
Showcase YouTube Videos with a Customizable Carousel
Increase Conversions With Restaurant Menu Flip Cards
Create Engaging, Customizable Popups with Ease and Style
Convert Users With Clear, Concise & Responsive Comparison Tables
Turn Complex Data into Engaging, Interactive Infographics
Impress Users, Enhance Your Website & Increase Engagement Using an Image Gallery
Improve visibility & Increase attendance with the Events List Widget
Elevate user experience with a versatile, customizable Tabs widget
Build Trust with Customizable Payment Method Icons
Improve Navigation, Enhance User Experience & Increase Engagement
Boost Your Site's Trust and Engagement with Social Proof
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!