Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wp-smush.../core/external/plugin-n...
File: README.md
# Usage Examples
[0] Fix | Delete
## Minimum requirement
[1] Fix | Delete
```
[2] Fix | Delete
<?php
[3] Fix | Delete
require_once 'recommended-plugins-notice/notice.php';
[4] Fix | Delete
[5] Fix | Delete
do_action(
[6] Fix | Delete
'wpmudev-recommended-plugins-register-notice',
[7] Fix | Delete
plugin_basename(__FILE__), // Plugin basename
[8] Fix | Delete
'My Plugin Name', // Plugin Name
[9] Fix | Delete
array(
[10] Fix | Delete
'top_level_page_screen_id' // Screen IDs
[11] Fix | Delete
),
[12] Fix | Delete
);
[13] Fix | Delete
```
[14] Fix | Delete
[15] Fix | Delete
# Development Mode
[16] Fix | Delete
## Always ON
[17] Fix | Delete
This code below will always show the notice on every page.
[18] Fix | Delete
```
[19] Fix | Delete
<?php
[20] Fix | Delete
require_once 'recommended-plugins-notice/notice.php';
[21] Fix | Delete
[22] Fix | Delete
add_filter( 'wpmudev-recommended-plugins-is-displayable', '__return_true' );
[23] Fix | Delete
add_filter(
[24] Fix | Delete
'wpmudev-recommended-plugin-active-registered',
[25] Fix | Delete
function () {
[26] Fix | Delete
$active = new WPMUDEV_Recommended_Plugins_Notice_Registered_Plugin( 'basename' );
[27] Fix | Delete
$active->selector = array( 'after', '.sui-wrap .sui-header' );
[28] Fix | Delete
$active->name = 'Sample';
[29] Fix | Delete
[30] Fix | Delete
return $active;
[31] Fix | Delete
}
[32] Fix | Delete
);
[33] Fix | Delete
```
[34] Fix | Delete
## Custom time trigger
[35] Fix | Delete
Default of notice to be displayed in plugin page(s) is **14** days after its registered.
[36] Fix | Delete
You can decrease or even increase this because why not.
[37] Fix | Delete
```
[38] Fix | Delete
<?php
[39] Fix | Delete
add_filter(
[40] Fix | Delete
'wpmudev-recommended-plugins-notice-display-seconds-after-registered',
[41] Fix | Delete
function ( $time_trigger ) {
[42] Fix | Delete
// 1 minute trigger
[43] Fix | Delete
$time_trigger = 1 * MINUTE_IN_SECONDS;
[44] Fix | Delete
[45] Fix | Delete
return $time_trigger;
[46] Fix | Delete
}
[47] Fix | Delete
);
[48] Fix | Delete
```
[49] Fix | Delete
## Un-dismiss
[50] Fix | Delete
Accidentally or purposed-ly dismiss the notice for whatever reason ? this below code can undo that.
[51] Fix | Delete
```
[52] Fix | Delete
<?php
[53] Fix | Delete
add_action(
[54] Fix | Delete
'wpmudev-recommended-plugins-before-display',
[55] Fix | Delete
function () {
[56] Fix | Delete
WPMUDEV_Recommended_Plugins_Notice::get_instance()->un_dismiss();
[57] Fix | Delete
}
[58] Fix | Delete
);
[59] Fix | Delete
```
[60] Fix | Delete
[61] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function