Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fix for https://wordpress.org/plugins/301-redirects/
- // Issue: Plugin CSS and JS files are enqueued on every admin page, not just the plugin settings page
- // Edit from line 43 of 301-redirects.php:
- function load_301_redirect_assets($hook) {
- if ( $hook === 'settings_page_301-redirects' ) {
- wp_enqueue_style( 'redirect_301_bootstrap_css', plugin_dir_url( __FILE__ ) . 'lib/bootstrap-3.3.4.css', false, '1.0.0' );
- wp_enqueue_style( 'redirect_301_custom_css', plugin_dir_url( __FILE__ ) . 'style.css', false, '1.0.0' );
- wp_enqueue_script( 'bootstrap', plugin_dir_url( __FILE__ ) . 'lib/bootstrap-3.3.4.js', array(), '1.0.0', true );
- } else return;
- }
Add Comment
Please, Sign In to add comment