',
'',
'',
''
),
array(
'dismiss' => WSRW_Notice::DISMISS_USER,
'slug' => 'consider-upgrading',
)
);
}
/**
* Show a notice with more features at the bottom of the main page.
*
* @return void
*/
function wsrw_upsell_notice( $page_instance ) {
$view = $page_instance->view;
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( 'search_replace' !== $view && ! isset( $_GET['media_id'] ) ) {
return;
}
$html = '
' . esc_html__( 'Get Search & Replace Everything Pro and Unlock all the Powerful Features', 'search-replace-wpcode' ) . '
';
$html .= '';
$html .= '
';
$html .= '- ' . esc_html__( 'Replace any text with confidence knowing you can 1-click undo.', 'search-replace-wpcode' ) . '
';
$html .= '- ' . esc_html__( 'Save time by replacing images directly from the Gutenberg Editor.', 'search-replace-wpcode' ) . '
';
$html .= '- ' . esc_html__( 'Scan your website for unused media files and safely delete them.', 'search-replace-wpcode' ) . '
';
$html .= '
';
$html .= '
';
$html .= '- ' . esc_html__( 'Replace with precision by being able to choose which results to skip.', 'search-replace-wpcode' ) . '
';
$html .= '- ' . esc_html__( 'Track back results by viewing the full context of search results.', 'search-replace-wpcode' ) . '
';
$html .= '- ' . esc_html__( 'Replace images with different extensions across your whole website.', 'search-replace-wpcode' ) . '
';
$html .= '
';
$html .= '
';
$html .= sprintf(
'%2$s
',
wsrw_utm_url( 'https://wpcode.com/srlite/', 'upsell-notice', $view ),
esc_html__( 'Get Search & Replace Everything Pro Today and Unlock all the Powerful Features ยป', 'search-replace-wpcode' )
);
$html .= '';
$html .= sprintf(
// Translators: Placeholders make the text bold.
esc_html__( '%1$sBonus:%2$s Search & Replace Everything Lite users get %3$s$30 off regular price%4$s, automatically applied at checkout', 'search-replace-wpcode' ),
'',
'',
'',
''
);
$html .= '
';
// Add our custom notice for this page.
WSRW_Notice::info(
$html,
array(
'slug' => 'wsrw-snippets',
'dismiss' => WSRW_Notice::DISMISS_USER,
)
);
// Display notice we just added so that scripts are loaded.
wsrw_main()->notice->display();
}