File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/Review.php.tar
var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/optinmonster/OMAPI/Review.php 0000644 00000002712 15154142534 0026060 0 ustar 00 <?php
/**
* Review class.
*
* @since 1.1.4.5
*
* @package OMAPI
* @author Devin Vinson
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Review class.
*
* @since 1.1.4.5
*/
class OMAPI_Review {
/**
* Determine if review message should be shown
* based on backend rules.
*
* @since 2.6.1
*
* @return bool If it should show the review bar
*/
public function should_show_review() {
$review = get_option( 'omapi_review' );
if ( ! is_user_logged_in() || ! OMAPI::get_instance()->can_access( 'review' ) ) {
return false;
}
// If already dismissed...
if ( ! empty( $review['dismissed'] ) ) {
if ( empty( $review['later'] ) ) {
// Dismissed and no later, so do not show.
return false;
}
$delayed_less_than_month_ago = ! empty( $review['later'] ) && $review['time'] + ( 30 * DAY_IN_SECONDS ) > time();
if ( $delayed_less_than_month_ago ) {
// Delayed less than a month ago, so do not show.
return false;
}
}
return true;
}
/**
* Dismiss the review bar
*
* @param bool $later If delay the review for later.
*
* @since 1.1.6.1
* @since 2.6.1 Avoid using any request variables and receive later as parameter
*/
public function dismiss_review( $later = false ) {
$option = array(
'time' => time(),
'dismissed' => true,
'later' => ! empty( $later ),
);
$option['updated'] = update_option( 'omapi_review', $option );
return $option;
}
}
uyarreklam.com.tr/httpdocs/wp-content/plugins/broken-link-checker-seo/app/Admin/Notices/Review.php 0000644 00000016405 15154765310 0032217 0 ustar 00 var/www/vhosts <?php
namespace AIOSEO\BrokenLinkChecker\Admin\Notices;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Review plugin notice.
*
* @since 1.2.0
*/
class Review {
/**
* Class constructor.
*
* @since 1.2.0
*/
public function __construct() {
add_action( 'wp_ajax_aioseo-blc-dismiss-review-plugin-cta', [ $this, 'dismissNotice' ] );
}
/**
* Go through all the checks to see if we should show the notice.
*
* @since 1.2.0
*
* @return void
*/
public function maybeShowNotice() {
// Don't show to users that cannot interact with the plugin.
if ( ! current_user_can( 'edit_posts' ) ) {
return;
}
if ( aioseoBrokenLinkChecker()->admin->isBlcScreen() ) {
return;
}
// Make sure the user has connected/is licensed.
if ( ! aioseoBrokenLinkChecker()->license->isActive() ) {
return;
}
$dismissed = get_user_meta( get_current_user_id(), '_aioseo_blc_plugin_review_dismissed', true );
if ( '3' === $dismissed || '4' === $dismissed ) {
return;
}
if ( ! empty( $dismissed ) && $dismissed > time() ) {
return;
}
// Show once plugin has been active for 2 weeks.
if ( ! aioseoBrokenLinkChecker()->internalOptions->internal->firstActivated ) {
aioseoBrokenLinkChecker()->internalOptions->internal->firstActivated = time();
}
$activated = aioseoBrokenLinkChecker()->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.
*
* @since 1.2.0
*
* @return void
*/
public function showNotice() {
$string1 = sprintf(
// Translators: 1 - The plugin name ("Broken Link Checker").
__( '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?', 'aioseo-broken-link-checker' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded
'<strong>' . esc_html( AIOSEO_BROKEN_LINK_CHECKER_PLUGIN_NAME ) . '</strong>'
);
// Translators: 1 - The plugin name ("Broken Link Checker").
$string9 = __( 'Ok, you deserve it', 'aioseo-broken-link-checker' );
$string10 = __( 'Nope, maybe later', 'aioseo-broken-link-checker' );
$string11 = __( 'I already did', 'aioseo-broken-link-checker' );
?>
<div class="notice notice-info aioseo-blc-review-plugin-cta is-dismissible">
<div class="step-3">
<p><?php echo $string1; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<p>
<?php // phpcs:ignore Generic.Files.LineLength.MaxExceeded ?>
<a href="https://wordpress.org/support/plugin/broken-link-checker-seo/reviews/?filter=5#new-post" class="aioseo-blc-dismiss-review-notice" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string9 ); ?>
</a> •
<a href="#" class="aioseo-blc-dismiss-review-notice-delay" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string10 ); ?>
</a> •
<a href="#" class="aioseo-blc-dismiss-review-notice" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string11 ); ?>
</a>
</p>
</div>
</div>
<?php
}
/**
* Print the script for dismissing the notice.
*
* @since 1.2.0
*
* @return void
*/
public function printScript() {
// Create a nonce.
$nonce = wp_create_nonce( 'aioseo-blc-dismiss-review' );
?>
<style>
@keyframes dismissBtnVisible {
from { opacity: 0.99; }
to { opacity: 1; }
}
.aioseo-blc-review-plugin-cta button.notice-dismiss {
animation-duration: 0.001s;
animation-name: dismissBtnVisible;
}
</style>
<script>
window.addEventListener('load', function () {
var aioseoBlcSetupButton,
dismissBtn,
interval
aioseoBlcSetupButton = function (dismissBtn) {
var notice = document.querySelector('.notice.aioseo-blc-review-plugin-cta'),
delay = false,
relay = true,
stepOne = notice.querySelector('.step-1'),
stepTwo = notice.querySelector('.step-2'),
stepThree = notice.querySelector('.step-3')
// Add an event listener to the dismiss button.
dismissBtn.addEventListener('click', function (event) {
var httpRequest = new XMLHttpRequest(),
postData = ''
// Build the data to send in our request.
postData += '&delay=' + delay
postData += '&relay=' + relay
postData += '&action=aioseo-blc-dismiss-review-plugin-cta'
postData += '&nonce=<?php echo esc_html( $nonce ); ?>'
httpRequest.open('POST', '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>')
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
httpRequest.send(postData)
})
notice.addEventListener('click', function (event) {
if (event.target.matches('.aioseo-blc-review-switch-step-3')) {
event.preventDefault()
stepOne.style.display = 'none'
stepTwo.style.display = 'none'
stepThree.style.display = 'block'
}
if (event.target.matches('.aioseo-blc-review-switch-step-2')) {
event.preventDefault()
stepOne.style.display = 'none'
stepThree.style.display = 'none'
stepTwo.style.display = 'block'
}
if (event.target.matches('.aioseo-blc-dismiss-review-notice-delay')) {
event.preventDefault()
delay = true
relay = false
dismissBtn.click()
}
if (event.target.matches('.aioseo-blc-dismiss-review-notice')) {
if ('#' === event.target.getAttribute('href')) {
event.preventDefault()
}
relay = false
dismissBtn.click()
}
})
}
dismissBtn = document.querySelector('.aioseo-blc-review-plugin-cta .notice-dismiss')
if (!dismissBtn) {
document.addEventListener('animationstart', function (event) {
if (event.animationName == 'dismissBtnVisible') {
dismissBtn = document.querySelector('.aioseo-blc-review-plugin-cta .notice-dismiss')
if (dismissBtn) {
aioseoBlcSetupButton(dismissBtn)
}
}
}, false)
} else {
aioseoBlcSetupButton(dismissBtn)
}
});
</script>
<?php
}
/**
* Dismiss the review plugin CTA.
*
* @since 1.2.0
*
* @return void
*/
public function dismissNotice() {
// Early exit if we're not on a aioseo-blc-dismiss-review-plugin-cta action.
if ( ! isset( $_POST['action'] ) || 'aioseo-blc-dismiss-review-plugin-cta' !== $_POST['action'] ) {
return;
}
check_ajax_referer( 'aioseo-blc-dismiss-review', 'nonce' );
$delay = isset( $_POST['delay'] ) ? 'true' === wp_unslash( $_POST['delay'] ) : false; // phpcs:ignore HM.Security.ValidatedSanitizedInput.InputNotSanitized
$relay = isset( $_POST['relay'] ) ? 'true' === wp_unslash( $_POST['relay'] ) : false; // phpcs:ignore HM.Security.ValidatedSanitizedInput.InputNotSanitized
if ( ! $delay ) {
update_user_meta( get_current_user_id(), '_aioseo_blc_plugin_review_dismissed', $relay ? '4' : '3' );
wp_send_json_success();
return;
}
update_user_meta( get_current_user_id(), '_aioseo_blc_plugin_review_dismissed', strtotime( '+1 week' ) );
wp_send_json_success();
}
} httpdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Admin/Notices/Review.php 0000644 00000024427 15155214614 0032501 0 ustar 00 var/www/vhosts/uyarreklam.com.tr <?php
namespace AIOSEO\Plugin\Common\Admin\Notices;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Review Plugin Notice.
*
* @since 4.0.0
*/
class Review {
/**
* Class Constructor.
*
* @since 4.0.0
*/
public function __construct() {
add_action( 'wp_ajax_aioseo-dismiss-review-plugin-cta', [ $this, 'dismissNotice' ] );
}
/**
* Go through all the checks to see if we should show the notice.
*
* @since 4.0.0
*
* @return void
*/
public function maybeShowNotice() {
$dismissed = get_user_meta( get_current_user_id(), '_aioseo_plugin_review_dismissed', true );
if ( '3' === $dismissed || '4' === $dismissed ) {
return;
}
if ( ! empty( $dismissed ) && $dismissed > 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 10 days.
if ( ! aioseo()->internalOptions->internal->firstActivated ) {
aioseo()->internalOptions->internal->firstActivated = time();
}
$activated = aioseo()->internalOptions->internal->firstActivated( time() );
if ( $activated > strtotime( '-10 days' ) ) {
return;
}
if ( get_option( 'aioseop_options' ) || get_option( 'aioseo_options_v3' ) ) {
$this->showNotice();
} else {
$this->showNotice2();
}
// 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/'
);
$string1 = sprintf(
// Translators: 1 - The plugin short name ("AIOSEO").
__( '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' );
$string4 = sprintf(
// Translators: 1 - The plugin name ("All in One SEO").
__( '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 us 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: 1 - The plugin name ("All in One SEO").
$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' );
?>
<div class="notice notice-info aioseo-review-plugin-cta is-dismissible">
<div class="step-1">
<p><?php echo esc_html( $string1 ); ?></p>
<p>
<a href="#" class="aioseo-review-switch-step-3" data-step="3"><?php echo esc_html( $string2 ); ?></a> đŸ™‚ |
<a href="#" class="aioseo-review-switch-step-2" data-step="2"><?php echo esc_html( $string3 ); ?></a>
</p>
</div>
<div class="step-2" style="display:none;">
<p><?php echo esc_html( $string4 ); ?></p>
<p>
<a href="<?php echo esc_url( $feedbackUrl ); ?>" class="aioseo-dismiss-review-notice" target="_blank" rel="noopener noreferrer"><?php echo esc_html( $string5 ); ?></a>
<a href="#" class="aioseo-dismiss-review-notice" target="_blank" rel="noopener noreferrer"><?php echo esc_html( $string6 ); ?></a>
</p>
</div>
<div class="step-3" style="display:none;">
<p><?php echo esc_html( $string7 ); ?></p>
<p>
<a href="https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/?filter=5#new-post" class="aioseo-dismiss-review-notice" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string9 ); ?>
</a> •
<a href="#" class="aioseo-dismiss-review-notice-delay" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string10 ); ?>
</a> •
<a href="#" class="aioseo-dismiss-review-notice" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string11 ); ?>
</a>
</p>
</div>
</div>
<?php
}
/**
* Actually show the review plugin 2.0.
*
* @since 4.2.2
*
* @return void
*/
public function showNotice2() {
$string1 = sprintf(
// Translators: 1 - The plugin name ("All in One SEO").
__( '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?', 'all-in-one-seo-pack' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded
'<strong>' . esc_html( AIOSEO_PLUGIN_NAME ) . '</strong>'
);
// Translators: 1 - The plugin name ("All in One SEO").
$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' );
?>
<div class="notice notice-info aioseo-review-plugin-cta is-dismissible">
<div class="step-3">
<p><?php echo $string1; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<p>
<a href="https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/?filter=5#new-post" class="aioseo-dismiss-review-notice" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string9 ); ?>
</a> •
<a href="#" class="aioseo-dismiss-review-notice-delay" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string10 ); ?>
</a> •
<a href="#" class="aioseo-dismiss-review-notice" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $string11 ); ?>
</a>
</p>
</div>
</div>
<?php
}
/**
* Print the script for dismissing the notice.
*
* @since 4.0.13
*
* @return void
*/
public function printScript() {
// Create a nonce.
$nonce = wp_create_nonce( 'aioseo-dismiss-review' );
?>
<style>
.aioseop-notice-review_plugin_cta .aioseo-action-buttons {
display: none;
}
@keyframes dismissBtnVisible {
from { opacity: 0.99; }
to { opacity: 1; }
}
.aioseo-review-plugin-cta button.notice-dismiss {
animation-duration: 0.001s;
animation-name: dismissBtnVisible;
}
</style>
<script>
window.addEventListener('load', function () {
var aioseoSetupButton,
dismissBtn
aioseoSetupButton = function (dismissBtn) {
var notice = document.querySelector('.notice.aioseo-review-plugin-cta'),
delay = false,
relay = true,
stepOne = notice.querySelector('.step-1'),
stepTwo = notice.querySelector('.step-2'),
stepThree = notice.querySelector('.step-3')
// Add an event listener to the dismiss button.
dismissBtn.addEventListener('click', function (event) {
var httpRequest = new XMLHttpRequest(),
postData = ''
// Build the data to send in our request.
postData += '&delay=' + delay
postData += '&relay=' + relay
postData += '&action=aioseo-dismiss-review-plugin-cta'
postData += '&nonce=<?php echo esc_html( $nonce ); ?>'
httpRequest.open('POST', '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>')
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
httpRequest.send(postData)
})
notice.addEventListener('click', function (event) {
if (event.target.matches('.aioseo-review-switch-step-3')) {
event.preventDefault()
stepOne.style.display = 'none'
stepTwo.style.display = 'none'
stepThree.style.display = 'block'
}
if (event.target.matches('.aioseo-review-switch-step-2')) {
event.preventDefault()
stepOne.style.display = 'none'
stepThree.style.display = 'none'
stepTwo.style.display = 'block'
}
if (event.target.matches('.aioseo-dismiss-review-notice-delay')) {
event.preventDefault()
delay = true
relay = false
dismissBtn.click()
}
if (event.target.matches('.aioseo-dismiss-review-notice')) {
if ('#' === event.target.getAttribute('href')) {
event.preventDefault()
}
relay = false
dismissBtn.click()
}
})
}
dismissBtn = document.querySelector('.aioseo-review-plugin-cta .notice-dismiss')
if (!dismissBtn) {
document.addEventListener('animationstart', function (event) {
if (event.animationName == 'dismissBtnVisible') {
dismissBtn = document.querySelector('.aioseo-review-plugin-cta .notice-dismiss')
if (dismissBtn) {
aioseoSetupButton(dismissBtn)
}
}
}, false)
} else {
aioseoSetupButton(dismissBtn)
}
});
</script>
<?php
}
/**
* Dismiss the review plugin CTA.
*
* @since 4.0.0
*
* @return string The successful response.
*/
public function dismissNotice() {
// Early exit if we're not on a aioseo-dismiss-review-plugin-cta action.
if ( ! isset( $_POST['action'] ) || 'aioseo-dismiss-review-plugin-cta' !== $_POST['action'] ) {
return;
}
check_ajax_referer( 'aioseo-dismiss-review', 'nonce' );
$delay = isset( $_POST['delay'] ) ? 'true' === sanitize_text_field( wp_unslash( $_POST['delay'] ) ) : false;
$relay = isset( $_POST['relay'] ) ? 'true' === sanitize_text_field( wp_unslash( $_POST['relay'] ) ) : false;
if ( ! $delay ) {
update_user_meta( get_current_user_id(), '_aioseo_plugin_review_dismissed', $relay ? '4' : '3' );
return wp_send_json_success();
}
update_user_meta( get_current_user_id(), '_aioseo_plugin_review_dismissed', strtotime( '+1 week' ) );
return wp_send_json_success();
}
}