time() ) { return; } // Only show to users that interact with our pluign. if ( ! current_user_can( 'publish_posts' ) ) { return; } // Only show if plugin has been active for over two weeks. if ( ! aioseo()->internalOptions->internal->firstActivated ) { aioseo()->internalOptions->internal->firstActivated = time(); } $activated = aioseo()->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. * * @since 4.0.0 * * @return void */ public function showNotice() { $feedbackUrl = add_query_arg( [ 'wpf7528_24' => untrailingslashit( home_url() ), 'wpf7528_26' => aioseo()->options->has( 'general' ) && aioseo()->options->general->has( 'licenseKey' ) ? aioseo()->options->general->licenseKey : '', 'wpf7528_27' => aioseo()->pro ? 'pro' : 'lite', 'wpf7528_28' => AIOSEO_VERSION, 'utm_source' => aioseo()->pro ? 'proplugin' : 'liteplugin', 'utm_medium' => 'review-notice', 'utm_campaign' => 'feedback', 'utm_content' => AIOSEO_VERSION, ], 'https://aioseo.com/plugin-feedback/' ); // Translators: 1 - The plugin name ("All in One SEO"). $string1 = sprintf( __( 'Are you enjoying %1$s?', 'all-in-one-seo-pack' ), AIOSEO_PLUGIN_NAME ); $string2 = __( 'Yes I love it', 'all-in-one-seo-pack' ); $string3 = __( 'Not Really...', 'all-in-one-seo-pack' ); // Translators: The plugin name ("All in One SEO"). $string4 = sprintf( __( 'We\'re sorry to hear you aren\'t enjoying %1$s. We would love a chance to improve. Could you take a minute and let us know what we can do better?', 'all-in-one-seo-pack' ), AIOSEO_PLUGIN_NAME ); // phpcs:ignore Generic.Files.LineLength.MaxExceeded $string5 = __( 'Give feedback', 'all-in-one-seo-pack' ); $string6 = __( 'No thanks', 'all-in-one-seo-pack' ); $string7 = __( 'That\'s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?', 'all-in-one-seo-pack' ); // Translators: The plugin name ("All in One SEO"). $string8 = sprintf( __( 'CEO of %1$s', 'all-in-one-seo-pack' ), AIOSEO_PLUGIN_NAME ); $string9 = __( 'Ok, you deserve it', 'all-in-one-seo-pack' ); $string10 = __( 'Nope, maybe later', 'all-in-one-seo-pack' ); $string11 = __( 'I already did', 'all-in-one-seo-pack' ); ?>