Hooks
modal_kit_pro_tested_up_to
filter
Pro
PHP
Change the Modal Kit version Pro counts as tested, which decides the compatibility note under Pro on the Plugins screen.
Pro’s main file has a Modal Kit tested up to header. When the installed Modal Kit is newer, comparing major and minor versions only, the Plugins screen shows a note under Pro to users who can update plugins: “This version of Modal Kit Pro was tested with Modal Kit up to …”.
Runs when the Plugins screen lists Pro.
Parameters
Parameter
Description
$tested
string
The header’s value, such as 1.2.
Returns
string The version, cast to a string. An empty string hides the note.
Examples
After your own testing
Your agency has tested this Pro release with Modal Kit 1.4 on its client sites.
add_filter( 'modal_kit_pro_tested_up_to', function ( $tested ) {
return version_compare( $tested, '1.4', '<' ) ? '1.4' : $tested;
} );
Hide the note on a managed host
For a host that tests plugin pairs before it rolls them out.
add_filter( 'modal_kit_pro_tested_up_to', '__return_empty_string' );
Good to know
Only major and minor versions are compared, so Modal Kit 1.4.2 against a tested 1.4 shows no note.
It changes the note only. Pro loads and updates as usual.
Applied in modal-kit-pro/includes/Updates.php.
Related