Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/ajax.tar

class-yoast-dismissable-notice.php000066600000003617151120044500013276 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Ajax
 */

/**
 * This class will catch the request to dismiss the target notice (set by notice_name)
 * and will store the dismiss status as an user meta in the database.
 */
class Yoast_Dismissable_Notice_Ajax {

	/**
	 * Notice type toggle value for user notices.
	 *
	 * @var string
	 */
	const FOR_USER = 'user_meta';

	/**
	 * Notice type toggle value for network notices.
	 *
	 * @var string
	 */
	const FOR_NETWORK = 'site_option';

	/**
	 * Notice type toggle value for site notices.
	 *
	 * @var string
	 */
	const FOR_SITE = 'option';

	/**
	 * Name of the notice that will be dismissed.
	 *
	 * @var string
	 */
	private $notice_name;

	/**
	 * The type of the current notice.
	 *
	 * @var string
	 */
	private $notice_type;

	/**
	 * Initialize the hooks for the AJAX request.
	 *
	 * @param string $notice_name The name for the hook to catch the notice.
	 * @param string $notice_type The notice type.
	 */
	public function __construct( $notice_name, $notice_type = self::FOR_USER ) {
		$this->notice_name = $notice_name;
		$this->notice_type = $notice_type;

		add_action( 'wp_ajax_wpseo_dismiss_' . $notice_name, [ $this, 'dismiss_notice' ] );
	}

	/**
	 * Handles the dismiss notice request.
	 */
	public function dismiss_notice() {
		check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name );

		$this->save_dismissed();

		wp_die( 'true' );
	}

	/**
	 * Storing the dismissed value in the database. The target location is based on the set notification type.
	 */
	private function save_dismissed() {
		if ( $this->notice_type === self::FOR_SITE ) {
			update_option( 'wpseo_dismiss_' . $this->notice_name, 1 );

			return;
		}

		if ( $this->notice_type === self::FOR_NETWORK ) {
			update_site_option( 'wpseo_dismiss_' . $this->notice_name, 1 );

			return;
		}

		update_user_meta( get_current_user_id(), 'wpseo_dismiss_' . $this->notice_name, 1 );
	}
}
class-shortcode-filter.php000066600000003042151120044500011630 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Ajax
 */

/**
 * Class WPSEO_Shortcode_Filter.
 *
 * Used for parsing WP shortcodes with AJAX.
 */
class WPSEO_Shortcode_Filter {

	/**
	 * Initialize the AJAX hooks.
	 */
	public function __construct() {
		add_action( 'wp_ajax_wpseo_filter_shortcodes', [ $this, 'do_filter' ] );
	}

	/**
	 * Parse the shortcodes.
	 */
	public function do_filter() {
		check_ajax_referer( 'wpseo-filter-shortcodes', 'nonce' );

		if ( ! isset( $_POST['data'] ) || ! is_array( $_POST['data'] ) ) {
			// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: WPSEO_Utils::format_json_encode is considered safe.
			wp_die( WPSEO_Utils::format_json_encode( [] ) );
		}

		// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: $shortcodes is getting sanitized later, before it's used.
		$shortcodes        = wp_unslash( $_POST['data'] );
		$parsed_shortcodes = [];

		foreach ( $shortcodes as $shortcode ) {
			if ( $shortcode !== sanitize_text_field( $shortcode ) ) {
				// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: WPSEO_Utils::format_json_encode is considered safe.
				wp_die( WPSEO_Utils::format_json_encode( [] ) );
			}

			$parsed_shortcodes[] = [
				'shortcode' => $shortcode,
				'output'    => do_shortcode( $shortcode ),
			];
		}

		// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: WPSEO_Utils::format_json_encode is considered safe.
		wp_die( WPSEO_Utils::format_json_encode( $parsed_shortcodes ) );
	}
}
class-yoast-plugin-conflict-ajax.php000066600000005545151120044500013540 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Ajax
 */

/**
 * Class Yoast_Plugin_Conflict_Ajax.
 */
class Yoast_Plugin_Conflict_Ajax {

	/**
	 * Option identifier where dismissed conflicts are stored.
	 *
	 * @var string
	 */
	private $option_name = 'wpseo_dismissed_conflicts';

	/**
	 * List of notification identifiers that have been dismissed.
	 *
	 * @var array
	 */
	private $dismissed_conflicts = [];

	/**
	 * Initialize the hooks for the AJAX request.
	 */
	public function __construct() {
		add_action( 'wp_ajax_wpseo_dismiss_plugin_conflict', [ $this, 'dismiss_notice' ] );
	}

	/**
	 * Handles the dismiss notice request.
	 */
	public function dismiss_notice() {
		check_ajax_referer( 'dismiss-plugin-conflict' );

		$conflict_data = filter_input( INPUT_POST, 'data', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );

		$this->dismissed_conflicts = $this->get_dismissed_conflicts( $conflict_data['section'] );

		$this->compare_plugins( $conflict_data['plugins'] );

		$this->save_dismissed_conflicts( $conflict_data['section'] );

		wp_die( 'true' );
	}

	/**
	 * Getting the user option from the database.
	 *
	 * @return bool|array
	 */
	private function get_dismissed_option() {
		return get_user_meta( get_current_user_id(), $this->option_name, true );
	}

	/**
	 * Getting the dismissed conflicts from the database
	 *
	 * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap).
	 *
	 * @return array
	 */
	private function get_dismissed_conflicts( $plugin_section ) {
		$dismissed_conflicts = $this->get_dismissed_option();

		if ( is_array( $dismissed_conflicts ) && array_key_exists( $plugin_section, $dismissed_conflicts ) ) {
			return $dismissed_conflicts[ $plugin_section ];
		}

		return [];
	}

	/**
	 * Storing the conflicting plugins as an user option in the database.
	 *
	 * @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap).
	 */
	private function save_dismissed_conflicts( $plugin_section ) {
		$dismissed_conflicts = $this->get_dismissed_option();

		$dismissed_conflicts[ $plugin_section ] = $this->dismissed_conflicts;

		update_user_meta( get_current_user_id(), $this->option_name, $dismissed_conflicts );
	}

	/**
	 * Loop through the plugins to compare them with the already stored dismissed plugin conflicts.
	 *
	 * @param array $posted_plugins Plugin set to check.
	 */
	public function compare_plugins( array $posted_plugins ) {
		foreach ( $posted_plugins as $posted_plugin ) {
			$this->compare_plugin( $posted_plugin );
		}
	}

	/**
	 * Check if plugin is already dismissed, if not store it in the array that will be saved later.
	 *
	 * @param string $posted_plugin Plugin to check against dismissed conflicts.
	 */
	private function compare_plugin( $posted_plugin ) {
		if ( ! in_array( $posted_plugin, $this->dismissed_conflicts, true ) ) {
			$this->dismissed_conflicts[] = $posted_plugin;
		}
	}
}
class-yoast-onpage-ajax.php000066600000001414151130207060011706 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Ajax
 */

// Mark this file as deprecated.
_deprecated_file( __FILE__, 'WPSEO 13.2' );

/**
 * Class Yoast_OnPage_Ajax.
 *
 * This class will catch the request to dismiss the Ryte notice and will store
 * the dismiss status as an user meta in the database.
 *
 * @deprecated 13.2
 * @codeCoverageIgnore
 */
class Yoast_OnPage_Ajax {

	/**
	 * Initialize the hooks for the AJAX request.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}

	/**
	 * Handles the dismiss notice request.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function dismiss_notice() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}
}
class-recalculate-scores-ajax.php000066600000002072151130207060013061 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Ajax
 */

/**
 * Class WPSEO_Recalculate_Scores.
 *
 * This class handles the SEO score recalculation for all posts with a filled focus keyword.
 *
 * @deprecated  14.4
 * @codeCoverageIgnore
 */
class WPSEO_Recalculate_Scores_Ajax {

	/**
	 * Initialize the AJAX hooks.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}

	/**
	 * Get the totals for the posts and the terms.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 */
	public function get_total() {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		wp_die();
	}

	/**
	 * Start recalculation.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 */
	public function recalculate_scores() {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		wp_die();
	}

	/**
	 * Saves the new linkdex score for given post.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 */
	public function save_score() {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		wp_die();
	}
}
.htaccess000066600000000424151145652200006347 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>