Plugin info

Total downloads: 37,257
Active installs: 2,000
Total reviews: 5
Average rating: 4.8
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 2
Last updated: 5/8/2021 (1698 days ago)
Added to WordPress: 12/5/2011 (14 years old)
Minimum WordPress version: 4.9
Tested up to WordPress version: 5.7.12
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 1698 days ago • 5 reviews

22/100

Is Add Admin JavaScript abandoned?

Possibly abandoned (last update 1698 days ago).

Compatibility

Requires WordPress: 4.9
Tested up to: 5.7.12
Requires PHP: f

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Add Admin CSS
Rating 4.9/5 (35 reviews)Active installs 10,000
UiPress lite | Effortless custom dashboards, admin themes and pages
Rating 4.1/5 (21 reviews)Active installs 10,000
Slate Admin Theme
Rating 4.7/5 (44 reviews)Active installs 6,000
Aquila Admin Theme
Rating 4.4/5 (35 reviews)Active installs 4,000
Kodeo Admin UI
Rating 4.7/5 (23 reviews)Active installs 2,000
Fancy Admin UI
Rating 4.4/5 (14 reviews)Active installs 2,000

Description

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

Hooks

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:

  • $files (array): Array of JavaScript files.

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:

  • $js (string): JavaScript code (without