New answers tagged

1

Just a little test here. I peeked into jquery-migrate.js and noticed this part: // Set to true to prevent console output; migrateWarnings still maintained // jQuery.migrateMute = false; so I tested the following with the newly wp_add_inline_script(), introduced in version 4.5: add_action( 'wp_enqueue_scripts', function() { wp_add_inline_script( ...


3

You could change the log message text to blank in jquery-migrate.min.js but this will not be preserved on core update. The alternative is to add passthrough/filter function copy of console.log to just before the migrate script is loaded, and tell it to ignore logging messages that contain 'Migrate is installed'. Doing it this way will preserve other Migrate ...


8

WordPress uses the jQuery migrate script to ensure backwards compatibility for any plugins or themes you might be using which use functionality removed from newer versions of jQuery. With the release of WordPress 4.5, it appears they have upgraded the version of jQuery migrate from v1.2.1 to v1.4.0 - Having a quick scan through the code reveals that v1.4.0 ...


1

I think a better implementation would be a "message" class e.g.: class WPSE_224485_Message { private $_message; function __construct( $message ) { $this->_message = $message; add_action( 'admin_notices', array( $this, 'render' ) ); } function render() { printf( '<div class="updated">%s</div>', ...


0

Not sure what you're looking for here, but it sounds like you don't want to use classes and this has to be supported by PHP 5.2. Another approach, within these restrictions, might be to apply a custom filter within your admin_notices callback, e.g. $value = apply_filters( 'wpse_notice_value', 'some default value' ); where you would hook into the ...


2

If you're sure you don't need those plugins and if TGM is not tied up with any required licenses for your plugins, just pull TGM Plugin Activation right out. It's a three step process. One: find and delete the plugin registration function. <?php /** * Required and Recommended Plugins */ function prefix_register_plugins() { /** * Array of ...



Top 50 recent answers are included