time() ) { return; } // Show once plugin has been active for 2 weeks. if ( ! aioseo404To301()->internalOptions->internal->firstActivated ) { aioseo404To301()->internalOptions->internal->firstActivated = time(); } $activated = aioseo404To301()->internalOptions->internal->firstActivated( time() ); if ( $activated > strtotime( '-2 weeks' ) ) { return; } $this->showNotice(); // Print the script to the footer. add_action( 'admin_footer', [ $this, 'printScript' ] ); } /** * Actually show the review plugin 2.0. * * NOTE: the class names use the `d404-` prefix the rest of the plugin's CSS uses, not the * `404-to-301-` one this file shipped with. A CSS identifier cannot start with a digit, so * `document.querySelector('.404-to-301-...')` and `Element.matches()` both throw a SyntaxError - * which killed every one of the notice's own dismiss handlers. * * The notice is also single-step here: only `.step-3` exists. The step-switching branches that * came with it referenced two more elements and two more classes that this markup never had. * * @since 1.2.0 * @version 4.0.4 Class names re-prefixed so they are valid CSS identifiers. * @version 4.0.4 Dropped the step-switching branches; this notice has one step. * * @return void */ public function showNotice() { $string1 = sprintf( // Translators: 1 - The plugin name ("404 to 301"). __( 'Hey, we noticed you have been using %1$s for some time - that’s awesome! Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?', '404-to-301' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded '' . esc_html( AIOSEO_404_TO_301_PLUGIN_NAME ) . '' ); // Translators: 1 - The plugin name ("404 to 301"). $string9 = __( 'Ok, you deserve it', '404-to-301' ); $string10 = __( 'Nope, maybe later', '404-to-301' ); $string11 = __( 'I already did', '404-to-301' ); ?>

 •   •