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/deprecated.tar

index.php000066600000000046151130633500006365 0ustar00<?php
/**
 * Nothing to see here.
 */
admin/extensions.php000066600000003004151130633500010542 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.

/**
 * Represents the class that contains the list of possible extensions for Yoast SEO.
 *
 * @deprecated 15.4
 * @codeCoverageIgnore
 */
class WPSEO_Extensions {

	/**
	 * Checks if the plugin has been installed.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param string $extension The name of the plugin to check.
	 *
	 * @return bool Returns true when installed.
	 */
	public function is_installed( $extension ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return false;
	}

	/**
	 * Invalidates the extension by removing its option.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param string $extension The extension to invalidate.
	 */
	public function invalidate( $extension ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );
	}

	/**
	 * Checks if the extension is valid.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param string $extension The extension to get the name for.
	 *
	 * @return bool Returns true when valid.
	 */
	public function is_valid( $extension ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return false;
	}

	/**
	 * Returns the set extensions.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return array All the extension names.
	 */
	public function get() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return [];
	}
}
// phpcs:enable
admin/metabox/class-metabox-section-inclusive-language.php000066600000003420151130633500017770 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

use Yoast\WP\SEO\Presenters\Admin\Beta_Badge_Presenter;

/**
 * Generates and displays the React root element for a metabox section.
 *
 * @deprecated 19.6.1
 * @codeCoverageIgnore
 */
class WPSEO_Metabox_Section_Inclusive_Language implements WPSEO_Metabox_Section {

	/**
	 * Name of the section, used as an identifier in the HTML.
	 *
	 * @deprecated 19.6.1
	 *
	 * @var string
	 */
	public $name = 'inclusive-language';

	/**
	 * Initialize the inclusive language analysis metabox section.
	 *
	 * @deprecated 19.6.1
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 19.6.1' );
	}

	/**
	 * Outputs the section link.
	 *
	 * @deprecated 19.6.1
	 * @codeCoverageIgnore
	 */
	public function display_link() {
		_deprecated_function( __METHOD__, '19.6.1' );
		printf(
			'<li role="presentation"><a role="tab" href="#wpseo-meta-section-%1$s" id="wpseo-meta-tab-%1$s" aria-controls="wpseo-meta-section-%1$s" class="wpseo-meta-section-link">
				<div class="wpseo-score-icon-container" id="wpseo-inclusive-language-score-icon"></div><span>%2$s</span>&nbsp;%3$s</a></li>',
			esc_attr( $this->name ),
			esc_html__( 'Inclusive language', 'wordpress-seo' ),
			new Beta_Badge_Presenter( 'inclusive-language-beta-badge' )
		);
	}

	/**
	 * Outputs the section content.
	 *
	 * @deprecated 19.6.1
	 * @codeCoverageIgnore
	 */
	public function display_content() {
		_deprecated_function( __METHOD__, '19.6.1' );
		printf(
			'<div role="tabpanel" id="wpseo-meta-section-%1$s" aria-labelledby="wpseo-meta-tab-%1$s" tabindex="0" class="wpseo-meta-section">',
			esc_attr( $this->name )
		);
		echo '<div id="wpseo-metabox-inclusive-language-root" class="wpseo-metabox-root"></div>', '</div>';
	}
}
admin/metabox/class-metabox-analysis-inclusive-language.php000066600000004337151130633500020157 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Metabox
 */

/**
 * Represents the inclusive language analysis.
 *
 * @deprecated 19.6.1
 * @codeCoverageIgnore
 */
class WPSEO_Metabox_Analysis_Inclusive_Language implements WPSEO_Metabox_Analysis {

	/**
	 * Initialize the inclusive language analysis metabox.
	 *
	 * @deprecated 19.6.1
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 19.6.1' );
	}

	/**
	 * Whether this analysis is enabled.
	 *
	 * @deprecated 19.6.1
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether or not this analysis is enabled.
	 */
	public function is_enabled() {
		_deprecated_function( __METHOD__, 'WPSEO 19.6.1' );
		return $this->is_globally_enabled() && $this->is_user_enabled() && $this->is_current_version_supported()
				&& YoastSEO()->helpers->product->is_premium()
				&& YoastSEO()->helpers->language->has_inclusive_language_support( \WPSEO_Language_Utils::get_language( \get_locale() ) );
	}

	/**
	 * Whether or not this analysis is enabled by the user.
	 *
	 * @deprecated 19.6.1
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether or not this analysis is enabled by the user.
	 */
	public function is_user_enabled() {
		_deprecated_function( __METHOD__, 'WPSEO 19.6.1' );
		return ! get_the_author_meta( 'wpseo_inclusive_language_analysis_disable', get_current_user_id() );
	}

	/**
	 * Whether or not this analysis is enabled globally.
	 *
	 * @return bool Whether or not this analysis is enabled globally.
	 */
	public function is_globally_enabled() {
		_deprecated_function( __METHOD__, 'WPSEO 19.6.1' );
		return WPSEO_Options::get( 'inclusive_language_analysis_active', false );
	}

	/**
	 * Whether or not a certain premium version support inclusive language feature.
	 *
	 * @deprecated 19.6.1
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether or not a certain premium version support inclusive language feature.
	 */
	private function is_current_version_supported() {
		_deprecated_function( __METHOD__, 'WPSEO 19.6.1' );
		$is_premium      = YoastSEO()->helpers->product->is_premium();
		$premium_version = YoastSEO()->helpers->product->get_premium_version();

		return $is_premium && \version_compare( $premium_version, '19.2-RC1', '>=' );
	}
}
admin/add-keyword-modal.php000066600000005161151130633500011655 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.

/**
 * Class to print out the translatable strings for the Add Keyword modal.
 *
 * @deprecated 15.5
 */
class WPSEO_Add_Keyword_Modal {

	/**
	 * Returns the translations for the Add Keyword modal.
	 *
	 * These strings are not escaped because they're meant to be used with React
	 * which already takes care of that. If used in PHP, they should be escaped.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return array Translated text strings for the Add Keyword modal.
	 */
	public function get_translations() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		return [
			'title'                    => __( 'Would you like to add more than one keyphrase?', 'wordpress-seo' ),
			'intro'                    => sprintf(
				/* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */
				__( 'Great news: you can, with %s!', 'wordpress-seo' ),
				'{{link}}Yoast SEO Premium{{/link}}'
			),
			'link'                     => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ),
			'other'                    => sprintf(
				/* translators: %s expands to 'Yoast SEO Premium'. */
				__( 'Other benefits of %s for you:', 'wordpress-seo' ),
				'Yoast SEO Premium'
			),
			'buylink'                  => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ),
			'buy'                      => sprintf(
				/* translators: %s expands to 'Yoast SEO Premium'. */
				__( 'Get %s', 'wordpress-seo' ),
				'Yoast SEO Premium'
			),
			'small'                    => __( '1 year free support and updates included!', 'wordpress-seo' ),
			'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
		];
	}

	/**
	 * Passes translations to JS for the Add Keyword modal component.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return array Translated text strings for the Add Keyword modal component.
	 */
	public function get_translations_for_js() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		$translations = $this->get_translations();
		return [
			'locale' => get_user_locale(),
			'intl'   => $translations,
		];
	}

	/**
	 * Prints the localized Add Keyword modal translations for JS.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 */
	public function enqueue_translations() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastAddKeywordModalL10n', $this->get_translations_for_js() );
	}
}
admin/endpoints/class-endpoint-ryte.php000066600000002441151130633500014256 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\OnPage
 */

/**
 * Represents an implementation of the WPSEO_Endpoint interface to register one or multiple endpoints.
 *
 * @deprecated 13.2
 * @codeCoverageIgnore
 */
class WPSEO_Endpoint_Ryte implements WPSEO_Endpoint {

	/**
	 * The namespace of the REST route.
	 *
	 * @var string
	 */
	const REST_NAMESPACE = 'yoast/v1';

	/**
	 * The route of the ryte endpoint.
	 *
	 * @var string
	 */
	const ENDPOINT_RETRIEVE = 'ryte';

	/**
	 * The name of the capability needed to retrieve data using the endpoints.
	 *
	 * @var string
	 */
	const CAPABILITY_RETRIEVE = 'manage_options';

	/**
	 * Constructs the WPSEO_Endpoint_Ryte class and sets the service to use.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}

	/**
	 * Registers the REST routes that are available on the endpoint.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function register() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}

	/**
	 * Determines whether or not data can be retrieved for the registered endpoints.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function can_retrieve_data() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}
}
admin/links/class-link-table-accessible-notifier.php000066600000001617151130633500016530 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Links
 */

/**
 * Represents the notice when the table is not accessible.
 */
class WPSEO_Link_Table_Accessible_Notifier {

	/**
	 * Adds the notification to the notification center.
	 *
	 * @deprecated 14.1
	 *
	 * @codeCoverageIgnore
	 */
	public function add_notification() {
		_deprecated_function( __METHOD__, 'WPSEO 14.1' );
	}

	/**
	 * Removes the notification from the notification center.
	 *
	 * @deprecated 14.1
	 *
	 * @codeCoverageIgnore
	 */
	public function remove_notification() {
		_deprecated_function( __METHOD__, 'WPSEO 14.1' );
	}

	/**
	 * Returns the notification when the table is not accessible.
	 *
	 * @deprecated 14.1
	 *
	 * @codeCoverageIgnore
	 *
	 * @return Yoast_Notification|null The notification.
	 */
	protected function get_notification() {
		_deprecated_function( __METHOD__, 'WPSEO 14.1' );

		return null;
	}
}
admin/links/class-link-compatibility-notifier.php000066600000001603151130633500016212 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Links
 */

/**
 * Represents compatibility with php version 5.3.
 */
class WPSEO_Link_Compatibility_Notifier {

	/**
	 * Adds the notification to the notification center.
	 *
	 * @deprecated 13.1
	 *
	 * @codeCoverageIgnore
	 */
	public function add_notification() {
		_deprecated_function( __METHOD__, 'WPSEO 13.1' );
	}

	/**
	 * Removes the notification from the notification center.
	 *
	 * @deprecated 13.1
	 *
	 * @codeCoverageIgnore
	 */
	public function remove_notification() {
		_deprecated_function( __METHOD__, 'WPSEO 13.1' );
	}

	/**
	 * Returns the notification when the version is incompatible.
	 *
	 * @deprecated 13.1
	 *
	 * @codeCoverageIgnore
	 *
	 * @return Yoast_Notification|null The notification.
	 */
	protected function get_notification() {
		_deprecated_function( __METHOD__, 'WPSEO 13.1' );

		return null;
	}
}
admin/multiple-keywords-modal.php000066600000005261151130633500013144 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.

/**
 * Class to print out the translatable strings for the Multiple Keywords modal.
 *
 * @deprecated 15.5
 */
class WPSEO_Multiple_Keywords_Modal {

	/**
	 * Returns the translations for the Multiple Keywords modal.
	 *
	 * These strings are not escaped because they're meant to be used with React
	 * which already takes care of that. If used in PHP, they should be escaped.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return array Translated text strings for the Multiple Keywords modal.
	 */
	public function get_translations() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		return [
			'title'                    => __( 'Would you like to add another keyphrase?', 'wordpress-seo' ),
			'intro'                    => sprintf(
				/* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */
				__( 'Great news: you can, with %s!', 'wordpress-seo' ),
				'{{link}}Yoast SEO Premium{{/link}}'
			),
			'link'                     => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ),
			'other'                    => sprintf(
				/* translators: %s expands to 'Yoast SEO Premium'. */
				__( 'Other benefits of %s for you:', 'wordpress-seo' ),
				'Yoast SEO Premium'
			),
			'buylink'                  => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ),
			'buy'                      => sprintf(
				/* translators: %s expands to 'Yoast SEO Premium'. */
				__( 'Get %s', 'wordpress-seo' ),
				'Yoast SEO Premium'
			),
			'small'                    => __( '1 year free support and updates included!', 'wordpress-seo' ),
			'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
		];
	}

	/**
	 * Passes translations to JS for the Multiple Keywords modal component.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return array Translated text strings for the Multiple Keywords modal component.
	 */
	public function get_translations_for_js() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		$translations = $this->get_translations();

		return [
			'locale' => get_user_locale(),
			'intl'   => $translations,
		];
	}

	/**
	 * Prints the localized Multiple Keywords modal translations for JS.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function enqueue_translations() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastMultipleKeywordsModalL10n', $this->get_translations_for_js() );
	}
}
admin/onpage/class-ryte-service.php000066600000001263151130633500013345 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\OnPage
 */

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

/**
 * Represents the service to be used by the WPSEO_Endpoint_Ryte endpoint.
 *
 * @deprecated 13.2
 * @codeCoverageIgnore
 */
class WPSEO_Ryte_Service {

	/**
	 * Constructs the WPSEO_Ryte_Service class.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}

	/**
	 * Fetches statistics via REST request.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function get_statistics() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}
}
admin/onpage/class-onpage.php000066600000001352151130633500012174 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

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

/**
 * Handles the request for getting the Ryte status.
 *
 * @deprecated 13.2
 * @codeCoverageIgnore
 */
class WPSEO_OnPage extends WPSEO_Ryte implements WPSEO_WordPress_Integration {

	/**
	 * Constructs the object.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2', WPSEO_Ryte::class );
	}

	/**
	 * Shows a notice when the website is not indexable.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function show_notice() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2' );
	}
}
admin/onpage/class-onpage-option.php000066600000001236151130633500013503 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

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

/**
 * This class handles the data for the option where the Ryte data is stored.
 *
 * @deprecated 13.2
 * @codeCoverageIgnore
 */
class WPSEO_OnPage_Option extends WPSEO_Ryte_Option {

	/**
	 * Setting the object by setting the properties.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		// phpcs:ignore WordPress.Security.EscapeOutput -- The WPSEO_Ryte_option::class value does not need to be escaped.
		_deprecated_function( __METHOD__, 'WPSEO 13.2', WPSEO_Ryte_Option::class );
	}
}
admin/onpage/class-onpage-request.php000066600000001211151130633500013654 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

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

/**
 * This class will fetch a new status from Ryte and if it's necessary it will
 * notify the site admin by email and remove the current meta value to hide the
 * notice for all admin users.
 *
 * @deprecated 13.2
 * @codeCoverageIgnore
 */
class WPSEO_OnPage_Request extends WPSEO_Ryte_Request {

	/**
	 * Setting the request object.
	 *
	 * @deprecated 13.2
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 13.2', WPSEO_Ryte_Option::class );
	}
}
admin/ryte/class-ryte-request.php000066600000001412151130633500013103 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class will fetch a new status from Ryte and if it's necessary it will
 * notify the site admin by email and remove the current meta value to hide the
 * notice for all admin users.
 *
 * @deprecated 19.6
 * @codeCoverageIgnore
 */
class WPSEO_Ryte_Request {

	/**
	 * Sends a request to the Ryte API to check whether a URL is indexable.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param string $target_url The URL to check indexability for.
	 * @param array  $parameters Array of extra parameters to send to the Ryte API.
	 *
	 * @return array
	 */
	public function do_request( $target_url, $parameters = [] ) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}
}
admin/ryte/class-ryte.php000066600000014113151130633500011417 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * Handles the request for getting the Ryte status.
 *
 * @deprecated 18.5
 */
class WPSEO_Ryte implements WPSEO_WordPress_Integration {

	/**
	 * Is the request started by pressing the fetch button.
	 *
	 * @var bool
	 */
	private $is_manual_request = false;

	/**
	 * Holds the Ryte API response.
	 *
	 * @var array
	 */
	private $ryte_response = null;

	/**
	 * Constructs the object.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		$this->maybe_add_weekly_schedule();
	}

	/**
	 * Sets up the hooks.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function register_hooks() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		if ( ! self::is_active() ) {
			return;
		}

		// Sets the action for the Ryte fetch cron job.
		add_action( 'wpseo_ryte_fetch', [ $this, 'fetch_from_ryte' ] );
	}

	/**
	 * Determines if we can use the functionality.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return bool True if this functionality can be used.
	 */
	public static function is_active() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		if ( wp_doing_ajax() ) {
			return false;
		}

		if ( ! WPSEO_Options::get( 'ryte_indexability' ) ) {
			return false;
		}

		return true;
	}

	/**
	 * Hooks to run on plugin activation.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 */
	public function activate_hooks() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		if ( $this->get_option()->is_enabled() ) {
			$this->schedule_cron();

			return;
		}

		$this->unschedule_cron();
	}

	/**
	 * Determines whether to add a custom cron weekly schedule.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function maybe_add_weekly_schedule() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		// If there's no default cron weekly schedule, add a custom one.
		add_filter( 'cron_schedules', [ $this, 'add_weekly_schedule' ] );
	}

	/**
	 * Adds a custom weekly cron schedule.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @param array $schedules The existing custom cron schedules.
	 *
	 * @return array Enriched list of custom cron schedules.
	 */
	public function add_weekly_schedule( $schedules ) {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		if ( ! is_array( $schedules ) ) {
			$schedules = [];
		}

		/*
		 * Starting with version 5.4, WordPress does have a default weekly cron
		 * schedule. See https://core.trac.wordpress.org/changeset/47062.
		 * We need to add a custom one only if the default one doesn't exist.
		 */
		if ( isset( $schedules['weekly'] ) ) {
			return $schedules;
		}

		$schedules['weekly'] = [
			'interval' => WEEK_IN_SECONDS,
			'display'  => __( 'Once Weekly', 'wordpress-seo' ),
		];

		return $schedules;
	}

	/**
	 * Fetches the data from Ryte.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return bool|null Whether the request ran.
	 */
	public function fetch_from_ryte() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		// Don't do anything when the WordPress environment type isn't "production".
		if ( wp_get_environment_type() !== 'production' ) {
			return;
		}

		$ryte_option = $this->get_option();
		if ( ! $ryte_option->should_be_fetched() ) {
			return false;
		}

		$new_status = $this->request_indexability();

		// Updates the timestamp in the option.
		$ryte_option->set_last_fetch( time() );

		$ryte_option->set_status( $new_status );
		$ryte_option->save_option();

		return true;
	}

	/**
	 * Retrieves the option to use.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return WPSEO_Ryte_Option The option.
	 */
	protected function get_option() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		return new WPSEO_Ryte_Option();
	}

	/**
	 * Sends a request to Ryte to get the indexability status.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return int The indexability status value.
	 */
	protected function request_indexability() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		$parameters = [];
		if ( $this->wordfence_protection_enabled() ) {
			$parameters['wf_strict'] = 1;
		}

		$request  = new WPSEO_Ryte_Request();
		$response = $request->do_request( get_option( 'home' ), $parameters );

		// Populate the ryte_response property.
		$this->ryte_response = $response;

		// It's a valid Ryte response because the array contains an `is_indexable` element.
		if ( isset( $response['is_indexable'] ) ) {
			return (int) $response['is_indexable'];
		}

		// It's not a valid Ryte response.
		return WPSEO_Ryte_Option::CANNOT_FETCH;
	}

	/**
	 * Schedules the cronjob to get the new indexability status.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	private function schedule_cron() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		if ( wp_next_scheduled( 'wpseo_ryte_fetch' ) ) {
			return;
		}

		wp_schedule_event( time(), 'weekly', 'wpseo_ryte_fetch' );
	}

	/**
	 * Unschedules the cronjob to get the new indexability status.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	private function unschedule_cron() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		if ( ! wp_next_scheduled( 'wpseo_ryte_fetch' ) ) {
			return;
		}

		wp_clear_scheduled_hook( 'wpseo_ryte_fetch' );
	}

	/**
	 * Checks if WordFence protects the site against 'fake' Google crawlers.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return bool True if WordFence protects the site.
	 */
	private function wordfence_protection_enabled() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		if ( ! class_exists( 'wfConfig' ) ) {
			return false;
		}

		if ( ! method_exists( 'wfConfig', 'get' ) ) {
			return false;
		}

		return (bool) wfConfig::get( 'blockFakeBots' );
	}

	/**
	 * Retrieves the Ryte API response property.
	 *
	 * @deprecated 18.5
	 * @codeCoverageIgnore
	 *
	 * @return array|WP_Error The response or WP_Error on failure.
	 */
	public function get_response() {
		_deprecated_function( __METHOD__, 'WPSEO 18.5' );
		return $this->ryte_response;
	}
}
admin/ryte/class-ryte-option.php000066600000006113151130633500012726 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class handles the data for the option where the Ryte data is stored.
 *
 * @deprecated 19.6
 * @codeCoverageIgnore
 */
class WPSEO_Ryte_Option {

	/**
	 * Indicates the data is not fetched.
	 *
	 * @deprecated 19.6
	 * @var int
	 */
	const NOT_FETCHED = 0;

	/**
	 * Indicates the option is indexable.
	 *
	 * @deprecated 19.6
	 * @var int
	 */
	const IS_INDEXABLE = 0;

	/**
	 * Indicates the option is not indexable.
	 *
	 * @deprecated 19.6
	 * @var int
	 */
	const IS_NOT_INDEXABLE = 0;

	/**
	 * Indicates the data could not be fetched.
	 *
	 * @deprecated 19.6
	 * @var int
	 */
	const CANNOT_FETCH = -1;

	/**
	 * The name of the option where data will be stored.
	 *
	 * @deprecated 19.6
	 * @var string
	 */
	const OPTION_NAME = '';

	/**
	 * The key of the status in the option.
	 *
	 * @deprecated 19.6
	 * @var string
	 */
	const STATUS = '';

	/**
	 * The key of the last fetch date in the option.
	 *
	 * @deprecated 19.6
	 * @var string
	 */
	const LAST_FETCH = '';

	/**
	 * The limit for fetching the status manually.
	 *
	 * @deprecated 19.6
	 * @var int
	 */
	const FETCH_LIMIT = 0;

	/**
	 * Setting the object by setting the properties.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Getting the status from the option.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return int|string
	 */
	public function get_status() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return -1;
	}

	/**
	 * Saving the status to the options.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param string $status The status to save.
	 */
	public function set_status( $status ) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Saving the last fetch timestamp to the options.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param int $timestamp Timestamp with the new value.
	 */
	public function set_last_fetch( $timestamp ) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Determines whether the indexability status should be fetched.
	 *
	 * If LAST_FETCH isn't set, we assume the indexability status hasn't been fetched
	 * yet and return true. Then, we check whether the last fetch is within the
	 * FETCH_LIMIT time interval (15 seconds) to avoid too many consecutive API calls.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether the indexability status should be fetched.
	 */
	public function should_be_fetched() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return false;
	}

	/**
	 * Saving the option with the current data.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 */
	public function save_option() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Returns the value of the onpage_enabled status.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool
	 */
	public function is_enabled() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return false;
	}
}
admin/ajax/class-yoast-onpage-ajax.php000066600000001414151130633500013723 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' );
	}
}
admin/ajax/class-recalculate-scores-ajax.php000066600000002072151130633500015076 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();
	}
}
admin/taxonomy/class-taxonomy-content-fields.php000066600000000755151130633500016130 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class parses all the values for the general tab in the Yoast SEO settings metabox.
 */
class WPSEO_Taxonomy_Content_Fields {

	/**
	 * Returns array with the fields for the general tab.
	 *
	 * @deprecated 14.9
	 * @return array
	 */
	public function get() {
		_deprecated_function( __METHOD__, '14.9', 'WPSEO_Taxonomy_Fields::get' );

		$fields = new WPSEO_Taxonomy_Fields();
		return $fields->get( 'social' );
	}
}
admin/taxonomy/class-taxonomy-social-fields.php000066600000000747151130633500015731 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class parses all the values for the social tab in the Yoast SEO settings metabox.
 */
class WPSEO_Taxonomy_Social_Fields {

	/**
	 * Returning the fields for the social media tab.
	 *
	 * @deprecated 14.9
	 * @return array
	 */
	public function get() {
		_deprecated_function( __METHOD__, '14.9', 'WPSEO_Taxonomy_Fields::get' );

		$fields = new WPSEO_Taxonomy_Fields();
		return $fields->get( 'social' );
	}
}
admin/taxonomy/class-taxonomy-settings-fields.php000066600000001024151130633500016304 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class parses all the values for the general tab in the Yoast SEO settings metabox.
 */
class WPSEO_Taxonomy_Settings_Fields {

	/**
	 * Returns array with the fields for the General tab.
	 *
	 * @deprecated 14.9
	 * @return array Fields to be used on the General tab.
	 */
	public function get() {
		_deprecated_function( __METHOD__, '14.9', 'WPSEO_Taxonomy_Fields::get' );

		$fields = new WPSEO_Taxonomy_Fields();
		return $fields->get( 'social' );
	}
}
admin/class-recalculate-scores.php000066600000001576151130633500013242 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * 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 {

	/**
	 * Constructing the object by modalbox, the localization and the totals.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}

	/**
	 * Run the localize script.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 */
	public function recalculate_assets() {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}

	/**
	 * Initialize the modal box to be displayed when needed.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 */
	public function modal_box() {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}
}
admin/keyword-synonyms-modal.php000066600000005256151130633500013031 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.

/**
 * Class to print out the translatable strings for the Keyword Synonyms modal.
 *
 * @deprecated 15.5
 */
class WPSEO_Keyword_Synonyms_Modal {

	/**
	 * Returns the translations for the Keyword Synonyms modal.
	 *
	 * These strings are not escaped because they're meant to be used with React
	 * which already takes care of that. If used in PHP, they should be escaped.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return array Translated text strings for the Keyword Synonyms modal.
	 */
	public function get_translations() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		return [
			'title'                    => __( 'Would you like to add keyphrase synonyms?', 'wordpress-seo' ),
			'intro'                    => sprintf(
				/* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */
				__( 'Great news: you can, with %s!', 'wordpress-seo' ),
				'{{link}}Yoast SEO Premium{{/link}}'
			),
			'link'                     => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ),
			'other'                    => sprintf(
				/* translators: %s expands to 'Yoast SEO Premium'. */
				__( 'Other benefits of %s for you:', 'wordpress-seo' ),
				'Yoast SEO Premium'
			),
			'buylink'                  => WPSEO_Shortlinker::get( 'https://yoa.st/keyword-synonyms-popup' ),
			'buy'                      => sprintf(
				/* translators: %s expands to 'Yoast SEO Premium'. */
				__( 'Get %s', 'wordpress-seo' ),
				'Yoast SEO Premium'
			),
			'small'                    => __( '1 year free support and updates included!', 'wordpress-seo' ),
			'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
		];
	}

	/**
	 * Passes translations to JS for the Keyword Synonyms modal component.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return array Translated text strings for the Keyword Synonyms modal component.
	 */
	public function get_translations_for_js() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		$translations = $this->get_translations();

		return [
			'locale' => get_user_locale(),
			'intl'   => $translations,
		];
	}

	/**
	 * Prints the localized Keyword Synonyms modal translations for JS.
	 *
	 * @deprecated 15.5
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function enqueue_translations() {
		_deprecated_function( __METHOD__, 'WPSEO 15.5' );

		wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastKeywordSynonymsModalL10n', $this->get_translations_for_js() );
	}
}
admin/notifiers/class-post-type-archive-notification-handler.php000066600000001514151130633500021136 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Notifiers
 */

/**
 * Represents the logic for showing the post type archive notification.
 *
 * @deprecated 14.1
 */
class WPSEO_Post_Type_Archive_Notification_Handler extends WPSEO_Dismissible_Notification {

	/**
	 * Defaults for the title option.
	 *
	 * @var array
	 */
	protected $option_defaults = [];

	/**
	 * Sets the notification identifier.
	 *
	 * @deprecated 14.1
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 14.1' );
	}

	/**
	 * Returns the notification.
	 *
	 * @deprecated 14.1
	 * @codeCoverageIgnore
	 *
	 * @return Yoast_Notification|null The notification for the notification center.
	 */
	protected function get_notification() {
		_deprecated_function( __METHOD__, 'WPSEO 14.1' );

		return null;
	}
}
admin/class-social-admin.php000066600000004241151130633500012012 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class adds the Social tab to the Yoast SEO metabox and makes sure the settings are saved.
 *
 * @deprecated 14.6
 *
 * @codeCoverageIgnore
 */
class WPSEO_Social_Admin extends WPSEO_Metabox {

	/**
	 * Class constructor.
	 *
	 * @deprecated 14.6
	 *
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 14.6' );
	}

	/**
	 * Translate text strings for use in the meta box.
	 *
	 * IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to
	 * the main meta box definition array in the class WPSEO_Meta() as well!!!!
	 *
	 * @deprecated 14.6
	 *
	 * @codeCoverageIgnore
	 */
	public static function translate_meta_boxes() {
		_deprecated_function( __METHOD__, 'WPSEO 14.6' );
	}

	/**
	 * Returns the metabox section for the social settings.
	 *
	 * @deprecated 14.6
	 *
	 * @codeCoverageIgnore
	 *
	 * @return WPSEO_Metabox_Collapsibles_Sections|null
	 */
	public function get_meta_section() {
		_deprecated_function( __METHOD__, 'WPSEO 14.6' );

		return null;
	}

	/**
	 * Returns the Upgrade to Premium notice.
	 *
	 * @deprecated 14.6
	 *
	 * @codeCoverageIgnore
	 *
	 * @param string $network The social network.
	 *
	 * @return string The notice HTML on the free version, empty string on premium.
	 */
	public function get_premium_notice( $network ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.6' );

		return 'class_social_admin';
	}

	/**
	 * Filter over the meta boxes to save, this function adds the Social meta boxes.
	 *
	 * @deprecated 14.6
	 *
	 * @codeCoverageIgnore
	 *
	 * @param array $field_defs Array of metaboxes to save.
	 *
	 * @return array
	 */
	public function save_meta_boxes( $field_defs ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.6' );

		return [];
	}

	/**
	 * This method will compare opengraph fields with the posted values.
	 *
	 * When fields are changed, the facebook cache will be purged.
	 *
	 * @deprecated 14.6
	 *
	 * @codeCoverageIgnore
	 *
	 * @param WP_Post $post Post instance.
	 */
	public function og_data_compare( $post ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.6' );
	}
}
admin/recalculate/class-recalculate-posts.php000066600000002502151130633500015366 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class handles the calculation of the SEO score for all posts with a filled focus keyword.
 *
 * @deprecated 14.4
 * @codeCoverageIgnore
 */
class WPSEO_Recalculate_Posts extends WPSEO_Recalculate {

	/**
	 * Save the scores.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param array $scores The scores for the posts.
	 */
	public function save_scores( array $scores ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}

	/**
	 * Save the score.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param array $score The score to save.
	 */
	protected function save_score( array $score ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}

	/**
	 * Get the posts from the database by doing a WP_Query.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param int $paged The page.
	 *
	 * @return array
	 */
	protected function get_items( $paged ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		return [];
	}

	/**
	 * Map the posts to a response array.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param WP_Post $item The post for which to build the analyzer data.
	 *
	 * @return array
	 */
	protected function item_to_response( $item ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		return [];
	}
}
admin/recalculate/class-recalculate.php000066600000002313151130633500014220 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * Abstract class to force methods in recalculate classes.
 *
 * @deprecated 14.4
 * @codeCoverageIgnore
 */
abstract class WPSEO_Recalculate {

	/**
	 * Gets the items to recalculate.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param int $paged The current page number.
	 *
	 * @return array Items that can be recalculated.
	 */
	public function get_items_to_recalculate( $paged ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		return [];
	}

	/**
	 * Parse the posts|terms with the value we need.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param array $items The items to parse.
	 *
	 * @return array
	 */
	protected function parse_items( array $items ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		return [];
	}

	/**
	 * Get default from the options for given field.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param string $field  The field for which to get the default options.
	 * @param string $suffix The post type.
	 *
	 * @return bool|string
	 */
	protected function default_from_options( $field, $suffix ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		return false;
	}
}
admin/recalculate/class-recalculate-terms.php000066600000002454151130633500015356 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * This class handles the calculation of the SEO score for all terms.
 *
 * @deprecated 14.4
 * @codeCoverageIgnore
 */
class WPSEO_Recalculate_Terms extends WPSEO_Recalculate {

	/**
	 * Save the scores.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param array $scores The scores to save.
	 */
	public function save_scores( array $scores ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}

	/**
	 * Save the score.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param array $score The score to save.
	 */
	protected function save_score( array $score ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );
	}

	/**
	 * Get the terms from the database by doing a WP_Query.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param int $paged The page.
	 *
	 * @return array
	 */
	protected function get_items( $paged ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		return [];
	}

	/**
	 * Convert the given term into a analyzable object.
	 *
	 * @deprecated 14.4
	 * @codeCoverageIgnore
	 *
	 * @param mixed $item The term for which to build the analyzer data.
	 *
	 * @return array
	 */
	protected function item_to_response( $item ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.4' );

		return [];
	}
}
admin/extension.php000066600000005276151130633500010374 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.

/**
 * Represents the values for a single Yoast Premium extension plugin.
 *
 * @deprecated 15.4
 */
class WPSEO_Extension {

	/**
	 * Holds the extension config.
	 *
	 * @var array
	 */
	protected $config = [];

	/**
	 * WPSEO_Extension constructor.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param array $config The config to use.
	 */
	public function __construct( array $config ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		$this->config = $config;
	}

	/**
	 * Returns the product title.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return string The set title.
	 */
	public function get_title() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return $this->config['title'];
	}

	/**
	 * Returns the product title to display.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return string The title to display on the license page.
	 */
	public function get_display_title() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return empty( $this->config['display_title'] ) ? $this->config['title'] : $this->config['display_title'];
	}

	/**
	 * Returns URL to the page where the product can be bought.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return string The buy url.
	 */
	public function get_buy_url() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return $this->config['buyUrl'];
	}

	/**
	 * Returns URL to the page with more info.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return string The url to the info page.
	 */
	public function get_info_url() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return $this->config['infoUrl'];
	}

	/**
	 * Returns the image.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return string The image.
	 */
	public function get_image() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return $this->config['image'];
	}

	/**
	 * Returns the buy button value if set, otherwise fallback to the title.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return string The buy button.
	 */
	public function get_buy_button() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		if ( isset( $this->config['buy_button'] ) ) {
			return $this->config['buy_button'];
		}

		return $this->config['title'];
	}

	/**
	 * Returns the benefits.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return array The array with benefits.
	 */
	public function get_benefits() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return $this->config['benefits'];
	}
}
// phpcs:enable
admin/license-page-manager.php000066600000003452151130633500012316 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.

/**
 * Represents the values for a single Yoast Premium extension plugin.
 */
class WPSEO_License_Page_Manager implements WPSEO_WordPress_Integration {

	/**
	 * Version number for License Page Manager.
	 *
	 * @var string
	 */
	const VERSION_BACKWARDS_COMPATIBILITY = '2';

	/**
	 * Registers all hooks to WordPress.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 */
	public function register_hooks() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );
	}

	/**
	 * Removes the faulty set notifications.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 */
	public function remove_faulty_notifications() {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );
	}

	/**
	 * Handles the response.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param array  $response          HTTP response.
	 * @param array  $request_arguments HTTP request arguments. Unused.
	 * @param string $url               The request URL.
	 *
	 * @return array The response array.
	 */
	public function handle_response( array $response, $request_arguments, $url ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.4' );

		return $response;
	}

	/**
	 * Returns the license page to use based on the version number.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return string The page to use.
	 */
	public function get_license_page() {
		_deprecated_function( __METHOD__, '15.4' );

		return 'licenses';
	}

	/**
	 * Validates the extensions and show a notice for the invalid extensions.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 */
	public function validate_extensions() {
		_deprecated_function( __METHOD__, '15.4' );
	}
}
// phpcs:enable
admin/extension-manager.php000066600000003764151130633500012004 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.

/**
 * Represents the class that contains the available extensions for Yoast SEO.
 *
 * @deprecated 15.4
 * @codeCoverageIgnore
 */
class WPSEO_Extension_Manager {

	/**
	 * Adds an extension to the manager.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param string               $extension_name The extension name.
	 * @param WPSEO_Extension|null $extension      The extension value object.
	 *
	 * @return void
	 */
	public function add( $extension_name, WPSEO_Extension $extension = null ) {
		_deprecated_function( __METHOD__, '15.4' );
	}

	/**
	 * Removes an extension from the manager.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param string $extension_name The name of the extension to remove.
	 *
	 * @return void
	 */
	public function remove( $extension_name ) {
		_deprecated_function( __METHOD__, '15.4' );
	}

	/**
	 * Returns the extension for the given extension name.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param string $extension_name The name of the extension to get.
	 *
	 * @return WPSEO_Extension|null The extension object or null when it doesn't exist.
	 */
	public function get( $extension_name ) {
		_deprecated_function( __METHOD__, '15.4' );

		return null;
	}

	/**
	 * Returns all set extension.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @return WPSEO_Extension[] Array with the extensions.
	 */
	public function get_all() {
		_deprecated_function( __METHOD__, '15.4' );

		return [];
	}

	/**
	 * Checks if the plugin is activated within My Yoast.
	 *
	 * @deprecated 15.4
	 * @codeCoverageIgnore
	 *
	 * @param string $extension_name The extension name to check.
	 *
	 * @return bool True when the plugin is activated.
	 */
	public function is_activated( $extension_name ) {
		_deprecated_function( __METHOD__, '15.4' );

		return false;
	}
}
// phpcs:enable
frontend/class-frontend-page-type.php000066600000003436151130633500013716 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Deprecated\Frontend
 */

/**
 * Represents the classifier for determine the type of the currently opened page.
 *
 * @deprecated 14.9
 * @codeCoverageIgnore
 */
class WPSEO_Frontend_Page_Type {

	/**
	 * Checks if the currently opened page is a simple page.
	 *
	 * @deprecated 14.9
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether the currently opened page is a simple page.
	 */
	public static function is_simple_page() {
		_deprecated_function( __METHOD__, 'WPSEO 14.9' );

		return false;
	}

	/**
	 * Returns the id of the currently opened page.
	 *
	 * @deprecated 14.9
	 * @codeCoverageIgnore
	 *
	 * @return int The id of the currently opened page.
	 */
	public static function get_simple_page_id() {
		_deprecated_function( __METHOD__, 'WPSEO 14.9' );

		return 0;
	}

	/**
	 * Determine whether this is the homepage and shows posts.
	 *
	 * @deprecated 14.9
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether or not the current page is the homepage that displays posts.
	 */
	public static function is_home_posts_page() {
		_deprecated_function( __METHOD__, 'WPSEO 14.9' );

		return false;
	}

	/**
	 * Determine whether this is the static frontpage.
	 *
	 * @deprecated 14.9
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether or not the current page is a static frontpage.
	 */
	public static function is_home_static_page() {
		_deprecated_function( __METHOD__, 'WPSEO 14.9' );

		return false;
	}

	/**
	 * Determine whether this is the statically set posts page, when it's not the frontpage.
	 *
	 * @deprecated 14.9
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether or not it's a non-frontpage, statically set posts page.
	 */
	public static function is_posts_page() {
		_deprecated_function( __METHOD__, 'WPSEO 14.9' );

		return false;
	}
}
frontend/class-handle-404.php000066600000001376151130633500011747 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend
 */

/**
 * Class WPSEO_Handle_404
 *
 * Handles intercepting requests.
 *
 * @deprecated 14.0
 *
 * @since 9.4
 */
class WPSEO_Handle_404 implements WPSEO_WordPress_Integration {

	/**
	 * Registers all hooks to WordPress.
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 *
	 * @return void
	 */
	public function register_hooks() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * Handle the 404 status code.
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 *
	 * @param bool $handled Whether we've handled the request.
	 *
	 * @return bool True if it's 404.
	 */
	public function handle_404( $handled ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return $handled;
	}
}
frontend/class-opengraph-oembed.php000066600000002146151130633500013417 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend
 */

/**
 * Class WPSEO_OpenGraph_OEmbed.
 *
 * @deprecated 14.0
 */
class WPSEO_OpenGraph_OEmbed implements WPSEO_WordPress_Integration {

	/**
	 * {@inheritDoc}
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 */
	public function register_hooks() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * Callback function to pass to the oEmbed's response data that will enable
	 * support for using the image and title set by the WordPress SEO plugin's fields. This
	 * address the concern where some social channels/subscribed use oEmebed data over OpenGraph data
	 * if both are present.
	 *
	 * @link https://developer.wordpress.org/reference/hooks/oembed_response_data/ for hook info.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array   $data The oEmbed data.
	 * @param WP_Post $post The current Post object.
	 *
	 * @return array An array of oEmbed data with modified values where appropriate.
	 */
	public function set_oembed_data( $data, $post ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return $data;
	}
}
frontend/abstract-class-deprecated-schema-piece.php000066600000004363151130633500016430 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Context\Meta_Tags_Context;
use Yoast\WP\SEO\Generators\Schema\Abstract_Schema_Piece;
use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
use Yoast\WP\SEO\Surfaces\Helpers_Surface;

/**
 * Returns schema Article data.
 *
 * @deprecated 14.0
 *
 * @since 10.2
 */
abstract class WPSEO_Deprecated_Graph_Piece implements WPSEO_Graph_Piece {

	/**
	 * The meta tags context.
	 *
	 * @var Meta_Tags_Context
	 */
	private $context;

	/**
	 * The helpers surface.
	 *
	 * @var Helpers_Surface
	 */
	public $helpers;

	/**
	 * The date helper.
	 *
	 * @var WPSEO_Date_Helper
	 */
	protected $date;

	/**
	 * The new stable piece.
	 *
	 * @var Abstract_Schema_Piece
	 */
	protected $stable;

	/**
	 * The stable class name.
	 *
	 * @var string
	 */
	protected $stable_class_name;

	/**
	 * WPSEO_Schema_Article constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param string $class_name The class name.
	 */
	public function __construct( $class_name ) {
		$this->stable_class_name = $class_name;
		$this->stable            = new $class_name();

		_deprecated_function( __METHOD__, 'WPSEO 14.0', $this->stable_class_name );

		$memoizer = YoastSEO()->classes->get( Meta_Tags_Context_Memoizer::class );

		// We cannot extend the stable graph piece because a property was made public on it that was previously private.
		// So instead, we instantiate a stable graph piece and delegate to it.
		$this->context         = $memoizer->for_current_page();
		$this->stable->context = $this->context;
		$this->helpers         = YoastSEO()->helpers;
		$this->stable->helpers = $this->helpers;
	}

	/**
	 * Determines whether or not a piece should be added to the graph.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return bool
	 */
	public function is_needed() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', $this->stable_class_name . '::is_needed' );

		return $this->stable->is_needed();
	}

	/**
	 * Returns Article data.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return array Article data.
	 */
	public function generate() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', $this->stable_class_name . '::generate' );

		return $this->stable->generate();
	}
}
frontend/class-twitter.php000066600000002033151130633500011700 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend
 */

/**
 * This class handles the Twitter card functionality.
 *
 * @deprecated 14.0
 *
 * @link https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards
 */
class WPSEO_Twitter {

	/**
	 * Instance of this class.
	 *
	 * @var WPSEO_Twitter
	 */
	public static $instance;

	/**
	 * Images.
	 *
	 * @var array
	 */
	public $shown_images = [];

	/**
	 * Class constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 */
	public function __construct() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * Outputs the Twitter Card code on singular pages.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 */
	public function twitter() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * Get the singleton instance of this class.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return object|null
	 */
	public static function get_instance() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return null;
	}
}
frontend/class-woocommerce-shop-page.php000066600000002576151130633500014412 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Deprecated\Frontend
 */

use Yoast\WP\SEO\Helpers\Woocommerce_Helper;

/**
 * Represents the logic to determine if the current page is a WooCommerce shop page.
 *
 * @deprecated 14.9
 * @codeCoverageIgnore
 */
class WPSEO_WooCommerce_Shop_Page {

	/**
	 * Checks if the current page is the shop page.
	 *
	 * @deprecated 14.9
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether the current page is the WooCommerce shop page.
	 */
	public function is_shop_page() {
		_deprecated_function( __METHOD__, 'WPSEO 14.9', Woocommerce_Helper::class . '::is_shop_page' );

		return YoastSEO()->helpers->woocommerce->is_shop_page();
	}

	/**
	 * Returns the id of the set WooCommerce shop page.
	 *
	 * @deprecated 14.9
	 * @codeCoverageIgnore
	 *
	 * @return int The ID of the set page.
	 */
	public function get_shop_page_id() {
		_deprecated_function( __METHOD__, 'WPSEO 14.9', Woocommerce_Helper::class . '::get_shop_page_id' );

		return YoastSEO()->helpers->woocommerce->get_shop_page_id();
	}

	/**
	 * Returns the ID of the WooCommerce shop page when the currently opened page is the shop page.
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 *
	 * @param int $page_id The page id.
	 *
	 * @return int The Page ID of the shop.
	 */
	public function get_page_id( $page_id ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return $page_id;
	}
}
frontend/frontend.php000066600000016716151130633500010727 0ustar00<?php
/**
 * Backwards compatibility class for WPSEO_Frontend.
 *
 * @package Yoast\YoastSEO\Backwards_Compatibility
 */

use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
use Yoast\WP\SEO\Presenters\Canonical_Presenter;
use Yoast\WP\SEO\Presenters\Meta_Description_Presenter;
use Yoast\WP\SEO\Presenters\Rel_Next_Presenter;
use Yoast\WP\SEO\Presenters\Rel_Prev_Presenter;
use Yoast\WP\SEO\Presenters\Robots_Presenter;
use Yoast\WP\SEO\Surfaces\Helpers_Surface;

/**
 * Class WPSEO_Frontend
 *
 * @codeCoverageIgnore Because of deprecation.
 */
class WPSEO_Frontend {

	/**
	 * Instance of this class.
	 *
	 * @var WPSEO_Frontend
	 */
	public static $instance;

	/**
	 * The memoizer for the meta tags context.
	 *
	 * @var Meta_Tags_Context_Memoizer
	 */
	private $context_memoizer;

	/**
	 * The WPSEO Replace Vars object.
	 *
	 * @var WPSEO_Replace_Vars
	 */
	private $replace_vars;

	/**
	 * The helpers surface.
	 *
	 * @var Helpers_Surface
	 */
	private $helpers;

	/**
	 * WPSEO_Frontend constructor.
	 */
	public function __construct() {
		$this->context_memoizer = YoastSEO()->classes->get( Meta_Tags_Context_Memoizer::class );
		$this->replace_vars     = YoastSEO()->classes->get( WPSEO_Replace_Vars::class );
		$this->helpers          = YoastSEO()->classes->get( Helpers_Surface::class );
	}

	/**
	 * Catches call to methods that don't exist and might deprecated.
	 *
	 * @param string $method    The called method.
	 * @param array  $arguments The given arguments.
	 *
	 * @return mixed
	 */
	public function __call( $method, $arguments ) {
		_deprecated_function( $method, 'WPSEO 14.0' );

		$title_methods = [
			'title',
			'fix_woo_title',
			'get_content_title',
			'get_seo_title',
			'get_taxonomy_title',
			'get_author_title',
			'get_title_from_options',
			'get_default_title',
			'force_wp_title',
		];
		if ( in_array( $method, $title_methods, true ) ) {
			return $this->get_title();
		}

		return null;
	}

	/**
	 * Retrieves an instance of the class.
	 *
	 * @return static The instance.
	 */
	public static function get_instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
		}

		return self::$instance;
	}

	/**
	 * Outputs the canonical value.
	 *
	 * @param bool $echo        Whether or not to output the canonical element.
	 * @param bool $un_paged    Whether or not to return the canonical with or without pagination added to the URL.
	 * @param bool $no_override Whether or not to return a manually overridden canonical.
	 *
	 * @return string|void
	 */
	public function canonical( $echo = true, $un_paged = false, $no_override = false ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		$presentation = $this->get_current_page_presentation();
		$presenter    = new Canonical_Presenter();
		/** This filter is documented in src/integrations/front-end-integration.php */
		$presenter->presentation = $presentation;
		$presenter->helpers      = $this->helpers;
		$presenter->replace_vars = $this->replace_vars;

		if ( ! $echo ) {
			return $presenter->get();
		}

		echo $presenter->present();
	}

	/**
	 * Retrieves the meta robots value.
	 *
	 * @return string
	 */
	public function get_robots() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		$presentation = $this->get_current_page_presentation();
		return $presentation->robots;
	}

	/**
	 * Outputs the meta robots value.
	 */
	public function robots() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		$presentation            = $this->get_current_page_presentation();
		$presenter               = new Robots_Presenter();
		$presenter->presentation = $presentation;
		$presenter->helpers      = $this->helpers;
		$presenter->replace_vars = $this->replace_vars;
		echo $presenter->present();
	}

	/**
	 * Determine $robots values for a single post.
	 *
	 * @param array $robots  Robots data array.
	 * @param int   $post_id The post ID for which to determine the $robots values, defaults to current post.
	 *
	 * @return array
	 */
	public function robots_for_single_post( $robots, $post_id = 0 ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		$presentation = $this->get_current_page_presentation();

		return $presentation->robots;
	}

	/**
	 * Used for static home and posts pages as well as singular titles.
	 *
	 * @param object|null $object If filled, object to get the title for.
	 *
	 * @return string The content title.
	 */
	private function get_title( $object = null ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		$presentation = $this->get_current_page_presentation();
		$title        = $presentation->title;

		return $this->replace_vars->replace( $title, $presentation->source );
	}

	/**
	 * This function adds paging details to the title.
	 *
	 * @param string $sep         Separator used in the title.
	 * @param string $seplocation Whether the separator should be left or right.
	 * @param string $title       The title to append the paging info to.
	 *
	 * @return string
	 */
	public function add_paging_to_title( $sep, $seplocation, $title ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return $title;
	}

	/**
	 * Add part to title, while ensuring that the $seplocation variable is respected.
	 *
	 * @param string $sep         Separator used in the title.
	 * @param string $seplocation Whether the separator should be left or right.
	 * @param string $title       The title to append the title_part to.
	 * @param string $title_part  The part to append to the title.
	 *
	 * @return string
	 */
	public function add_to_title( $sep, $seplocation, $title, $title_part ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		if ( $seplocation === 'right' ) {
			return $title . $sep . $title_part;
		}

		return $title_part . $sep . $title;
	}

	/**
	 * Adds 'prev' and 'next' links to archives.
	 *
	 * @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html
	 */
	public function adjacent_rel_links() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		$presentation = $this->get_current_page_presentation();

		$rel_prev_presenter               = new Rel_Prev_Presenter();
		$rel_prev_presenter->presentation = $presentation;
		$rel_prev_presenter->helpers      = $this->helpers;
		$rel_prev_presenter->replace_vars = $this->replace_vars;
		echo $rel_prev_presenter->present();

		$rel_next_presenter               = new Rel_Next_Presenter();
		$rel_next_presenter->presentation = $presentation;
		$rel_next_presenter->helpers      = $this->helpers;
		$rel_next_presenter->replace_vars = $this->replace_vars;
		echo $rel_next_presenter->present();
	}

	/**
	 * Outputs the meta description element or returns the description text.
	 *
	 * @param bool $echo Echo or return output flag.
	 *
	 * @return string
	 */
	public function metadesc( $echo = true ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		$presentation            = $this->get_current_page_presentation();
		$presenter               = new Meta_Description_Presenter();
		$presenter->presentation = $presentation;
		$presenter->helpers      = $this->helpers;
		$presenter->replace_vars = $this->replace_vars;

		if ( ! $echo ) {
			return $presenter->get();
		}
		$presenter->present();
	}

	/**
	 * Returns the current page presentation.
	 *
	 * @return Indexable_Presentation The current page presentation.
	 */
	private function get_current_page_presentation() {
		$context = $this->context_memoizer->for_current_page();
		/** This filter is documented in src/integrations/front-end-integration.php */
		return apply_filters( 'wpseo_frontend_presentation', $context->presentation, $context );
	}
}
frontend/breadcrumbs.php000066600000006310151130633500011366 0ustar00<?php
/**
 * Backwards compatibility class for breadcrumbs.
 *
 * @package Yoast\YoastSEO\Backwards_Compatibility
 */

use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
use Yoast\WP\SEO\Presenters\Breadcrumbs_Presenter;
use Yoast\WP\SEO\Surfaces\Helpers_Surface;

/**
 * Class WPSEO_Breadcrumbs
 *
 * @codeCoverageIgnore Because of deprecation.
 */
class WPSEO_Breadcrumbs {

	/**
	 * Instance of this class.
	 *
	 * @var WPSEO_Breadcrumbs
	 */
	public static $instance;

	/**
	 * Last used 'before' string.
	 *
	 * @var string
	 */
	public static $before = '';

	/**
	 * Last used 'after' string.
	 *
	 * @var string
	 */
	public static $after = '';

	/**
	 * The memoizer for the meta tags context.
	 *
	 * @var Meta_Tags_Context_Memoizer
	 */
	protected $context_memoizer;

	/**
	 * The helpers surface.
	 *
	 * @var Helpers_Surface
	 */
	protected $helpers;

	/**
	 * The replace vars helper
	 *
	 * @var WPSEO_Replace_Vars
	 */
	protected $replace_vars;

	/**
	 * WPSEO_Breadcrumbs constructor.
	 */
	public function __construct() {
		$this->context_memoizer = YoastSEO()->classes->get( Meta_Tags_Context_Memoizer::class );
		$this->helpers          = YoastSEO()->classes->get( Helpers_Surface::class );
		$this->replace_vars     = YoastSEO()->classes->get( WPSEO_Replace_Vars::class );
	}

	/**
	 * Get breadcrumb string using the singleton instance of this class.
	 *
	 * @param string $before  Optional string to prepend.
	 * @param string $after   Optional string to append.
	 * @param bool   $display Echo or return flag.
	 *
	 * @return string Returns the breadcrumbs as a string.
	 */
	public static function breadcrumb( $before = '', $after = '', $display = true ) {
		// Remember the last used before/after for use in case the object goes __toString().
		self::$before = $before;
		self::$after  = $after;
		$output       = $before . self::get_instance()->render() . $after;

		if ( $display === true ) {
			echo $output;

			return '';
		}

		return $output;
	}

	/**
	 * Magic method to use in case the class would be send to string.
	 *
	 * @return string The rendered breadcrumbs.
	 */
	public function __toString() {
		return self::$before . $this->render() . self::$after;
	}

	/**
	 * Retrieves an instance of the class.
	 *
	 * @return static The instance.
	 */
	public static function get_instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
		}

		return self::$instance;
	}

	/**
	 * Returns the collected links for the breadcrumbs.
	 *
	 * @return array The collected links.
	 */
	public function get_links() {
		$context = $this->context_memoizer->for_current_page();

		return $context->presentation->breadcrumbs;
	}

	/**
	 * Renders the breadcrumbs.
	 *
	 * @return string The rendered breadcrumbs.
	 */
	private function render() {
		$presenter = new Breadcrumbs_Presenter();
		$context   = $this->context_memoizer->for_current_page();
		/** This filter is documented in src/integrations/front-end-integration.php */
		$presentation            = apply_filters( 'wpseo_frontend_presentation', $context->presentation, $context );
		$presenter->presentation = $presentation;
		$presenter->replace_vars = $this->replace_vars;
		$presenter->helpers      = $this->helpers;

		return $presenter->present();
	}
}
frontend/schema/class-schema-breadcrumb.php000066600000001052151130633500015002 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Generators\Schema\Breadcrumb;

/**
 * Returns schema Breadcrumb data.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_Breadcrumb extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * WPSEO_Schema_Breadcrumb constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( Breadcrumb::class );
	}
}
frontend/schema/class-schema-main-image.php000066600000004031151130633500014700 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Generators\Schema\Main_Image;

/**
 * Returns ImageObject schema data.
 *
 * @since      11.5
 * @deprecated 14.0
 * @codeCoverageIgnore
 */
class WPSEO_Schema_MainImage extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * WPSEO_Schema_WebPage constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( Main_Image::class );
	}

	/**
	 * Gets the post's first usable content image. Null if none is available.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param int $post_id The post id.
	 *
	 * @return string|null The image URL or null if there is no image.
	 */
	protected function get_first_usable_content_image_for_post( $post_id ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return WPSEO_Image_Utils::get_first_usable_content_image_for_post( $post_id );
	}

	/**
	 * Generates image schema from the attachment id.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param string $image_id The image schema id.
	 *
	 * @return array Schema ImageObject array.
	 */
	protected function generate_image_schema_from_attachment_id( $image_id ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_attachment_id' );

		return $this->helpers->schema->image->generate_from_attachment_id( $image_id, get_post_thumbnail_id() );
	}

	/**
	 * Generates image schema from the url.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param string $image_id  The image schema id.
	 * @param string $image_url The image URL.
	 *
	 * @return array Schema ImageObject array.
	 */
	protected function generate_image_schema_from_url( $image_id, $image_url ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_url' );

		return $this->helpers->schema->image->generate_from_url( $image_id, $image_url );
	}
}
frontend/schema/class-schema-website.php000066600000001033151130633500014335 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Generators\Schema\Website;

/**
 * Returns schema Website data.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_Website extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * WPSEO_Schema_Website constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( Website::class );
	}
}
frontend/schema/class-schema-faq-questions.php000066600000002724151130633500015502 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

/**
 * Returns a question object for each question in an FAQ block.
 *
 * @since      11.1
 * @deprecated 14.0
 */
class WPSEO_Schema_FAQ_Questions {

	/**
	 * A value object with context variables.
	 * This property is public, because originally it was dynamically declared.
	 *
	 * @var WPSEO_Schema_Context
	 */
	public $context;

	/**
	 * WPSEO_Schema_FAQ_Questions constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array                 $data    Our schema graph.
	 * @param WP_Block_Parser_Block $block   The FAQ block of this type.
	 * @param WPSEO_Schema_Context  $context A value object with context variables.
	 */
	public function __construct( $data, $block, $context ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
		$this->context = $context;
	}

	/**
	 * Find an image based on its URL and generate a Schema object for it.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return array The Schema with Questions added.
	 */
	public function generate() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return [];
	}

	/**
	 * Generate a Question piece.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array $question The question to generate schema for.
	 *
	 * @return array Schema.org Question piece.
	 */
	protected function generate_question_block( $question ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return [];
	}
}
frontend/schema/class-schema-faq.php000066600000003476151130633500013457 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Generators\Schema\FAQ;

/**
 * Returns schema FAQ data.
 *
 * @since      11.3
 * @deprecated 14.0
 */
class WPSEO_Schema_FAQ extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * WPSEO_Schema_FAQ constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( FAQ::class );
	}

	/**
	 * If this fires, we know there's an FAQ block ont he page, so filter the page type.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array $blocks The blocks of this type on the current page.
	 */
	public function prepare_schema( $blocks ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * Change the page type to an array if it isn't one, include FAQPage.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array|string $page_type The page type.
	 *
	 * @return array The page type that's now an array.
	 */
	public function change_schema_page_type( $page_type ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		if ( ! is_array( $page_type ) ) {
			$page_type = [ $page_type ];
		}
		$page_type[] = 'FAQPage';

		return $page_type;
	}

	/**
	 * Add the Questions in our FAQ blocks as separate pieces to the graph.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array                 $graph   Schema data for the current page.
	 * @param WP_Block_Parser_Block $block   The block data array.
	 * @param WPSEO_Schema_Context  $context A value object with context variables.
	 *
	 * @return array Our Schema graph.
	 */
	public function render_schema_questions( $graph, $block, $context ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return [];
	}
}
frontend/schema/class-schema.php000066600000001646151130633500012707 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

/**
 * Class WPSEO_Schema
 *
 * Outputs schema code specific for Google's JSON LD stuff.
 *
 * @since      1.8
 * @deprecated 14.0
 */
class WPSEO_Schema implements WPSEO_WordPress_Integration {

	/**
	 * Registers the hooks.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 */
	public function register_hooks() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * JSON LD output function that the functions for specific code can hook into.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @since 1.8
	 */
	public function json_ld() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * Outputs the JSON LD code in a valid JSON+LD wrapper.
	 *
	 * @since      10.2
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function generate() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}
}
frontend/schema/class-schema-organization.php000066600000001064151130633500015403 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Generators\Schema\Organization;

/**
 * Returns schema Organization data.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_Organization extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * WPSEO_Schema_Organization constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( Organization::class );
	}
}
frontend/schema/class-schema-utils.php000066600000003607151130633500014044 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

/**
 * Schema utility functions.
 *
 * @since      11.6
 * @deprecated 14.0
 */
class WPSEO_Schema_Utils {

	/**
	 * Retrieves a user's Schema ID.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param int                  $user_id The ID of the User you need a Schema ID for.
	 * @param WPSEO_Schema_Context $context A value object with context variables.
	 *
	 * @return string The user's schema ID.
	 */
	public static function get_user_schema_id( $user_id, $context ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->id->get_user_schema_id' );
		return YoastSEO()->helpers->schema->id->get_user_schema_id( $user_id, $context );
	}

	/**
	 * Retrieves the post title with fallback to `No title`.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param int $post_id Optional. Post ID.
	 *
	 * @return string The post title with fallback to `No title`.
	 */
	public static function get_post_title_with_fallback( $post_id = 0 ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', ' YoastSEO()->helpers->post->get_post_title_with_fallback' );
		return YoastSEO()->helpers->post->get_post_title_with_fallback( $post_id );
	}

	/**
	 * Adds the `inLanguage` property to a Schema piece.
	 *
	 * Must use one of the language codes from the IETF BCP 47 standard. The
	 * language tag syntax is made of one or more subtags separated by a hyphen
	 * e.g. "en", "en-US", "zh-Hant-CN".
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array $data The Schema piece data.
	 *
	 * @return array The Schema piece data with added language property.
	 */
	public static function add_piece_language( $data ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->language->add_piece_language' );
		return YoastSEO()->helpers->schema->language->add_piece_language( $data );
	}
}
frontend/schema/class-schema-howto.php000066600000013754151130633500014050 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Config\Schema_IDs;
use Yoast\WP\SEO\Generators\Schema\HowTo;

/**
 * Returns schema FAQ data.
 *
 * @since      11.5
 * @deprecated 14.0
 */
class WPSEO_Schema_HowTo extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * The HowTo blocks count on the current page.
	 *
	 * @var int
	 */
	private $counter = 0;

	/**
	 * WPSEO_Schema_FAQ constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( HowTo::class );
	}

	/**
	 * Renders the How-To block into our graph.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array $graph Our Schema data.
	 * @param array $block The How-To block content.
	 *
	 * @return mixed
	 */
	public function render( $graph, $block ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\HowTo::add_how_to' );

		++$this->counter;
		$this->add_how_to( $graph, $block, $this->counter );

		return $graph;
	}

	/**
	 * Generates the HowTo schema for a block.
	 *
	 * @param array $graph Our Schema data.
	 * @param array $block The How-To block content.
	 * @param int   $index The index of the current block.
	 */
	protected function add_how_to( &$graph, $block, $index ) {
		$data = [
			'@type'            => 'HowTo',
			'@id'              => $this->stable->context->canonical . '#howto-' . ( $index + 1 ),
			'name'             => $this->helpers->schema->html->smart_strip_tags( $this->helpers->post->get_post_title_with_fallback( $this->stable->context->id ) ),
			'mainEntityOfPage' => [ '@id' => $this->stable->context->main_schema_id ],
			'description'      => '',
		];

		if ( $this->stable->context->has_article ) {
			$data['mainEntityOfPage'] = [ '@id' => $this->stable->context->main_schema_id . Schema_IDs::ARTICLE_HASH ];
		}

		if ( isset( $block['attrs']['jsonDescription'] ) ) {
			$data['description'] = $this->helpers->schema->html->sanitize( $block['attrs']['jsonDescription'] );
		}

		$this->add_duration( $data, $block['attrs'] );
		$this->add_steps( $data, $block['attrs']['steps'] );

		$data = $this->helpers->schema->language->add_piece_language( $data );

		$graph[] = $data;
	}

	/**
	 * Adds the steps to our How-To output.
	 *
	 * @param array $data  Our How-To schema data.
	 * @param array $steps Our How-To block's steps.
	 */
	private function add_steps( &$data, $steps ) {
		foreach ( $steps as $step ) {
			$schema_id   = $this->stable->context->canonical . '#' . esc_attr( $step['id'] );
			$schema_step = [
				'@type' => 'HowToStep',
				'url'   => $schema_id,
			];

			if ( isset( $step['jsonText'] ) ) {
				$json_text = $this->helpers->schema->html->sanitize( $step['jsonText'] );
			}

			if ( isset( $step['jsonName'] ) ) {
				$json_name = $this->helpers->schema->html->smart_strip_tags( $step['jsonName'] );
			}

			if ( empty( $json_name ) ) {
				if ( empty( $step['text'] ) ) {
					continue;
				}

				$schema_step['text'] = '';

				$this->add_step_image( $schema_step, $step );

				// If there is no text and no image, don't output the step.
				if ( empty( $json_text ) && empty( $schema_step['image'] ) ) {
					continue;
				}

				if ( ! empty( $json_text ) ) {
					$schema_step['text'] = $json_text;
				}
			}

			elseif ( empty( $json_text ) ) {
				$schema_step['text'] = $json_name;
			}
			else {
				$schema_step['name'] = $json_name;

				$schema_step['itemListElement'] = [
					[
						'@type' => 'HowToDirection',
						'text'  => $json_text,
					],
				];

				$this->add_step_description( $schema_step, $json_text );
				$this->add_step_image( $schema_step, $step );
			}

			$data['step'][] = $schema_step;
		}
	}

	/**
	 * Adds the duration of the task to the Schema.
	 *
	 * @param array $data       Our How-To schema data.
	 * @param array $attributes The block data attributes.
	 */
	private function add_duration( &$data, $attributes ) {
		if ( empty( $attributes['hasDuration'] ) ) {
			return;
		}

		$days    = empty( $attributes['days'] ) ? 0 : $attributes['days'];
		$hours   = empty( $attributes['hours'] ) ? 0 : $attributes['hours'];
		$minutes = empty( $attributes['minutes'] ) ? 0 : $attributes['minutes'];

		if ( ( $days + $hours + $minutes ) > 0 ) {
			$data['totalTime'] = esc_attr( 'P' . $days . 'DT' . $hours . 'H' . $minutes . 'M' );
		}
	}

	/**
	 * Determines whether we're part of an article or a webpage.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return string A reference URL.
	 */
	protected function get_main_schema_id() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return $this->stable->context->main_schema_id;
	}

	/**
	 * Checks if we have a step description, if we do, add it.
	 *
	 * @param array  $schema_step Our Schema output for the Step.
	 * @param string $json_text   The step text.
	 */
	private function add_step_description( &$schema_step, $json_text ) {
		$schema_step['itemListElement'] = [
			[
				'@type' => 'HowToDirection',
				'text'  => $json_text,
			],
		];
	}

	/**
	 * Checks if we have a step image, if we do, add it.
	 *
	 * @param array $schema_step Our Schema output for the Step.
	 * @param array $step        The step block data.
	 */
	private function add_step_image( &$schema_step, $step ) {
		foreach ( $step['text'] as $line ) {
			if ( is_array( $line ) && isset( $line['type'] ) && $line['type'] === 'img' ) {
				$schema_step['image'] = $this->get_image_schema( esc_url( $line['props']['src'] ) );
			}
		}
	}

	/**
	 * Generates the image schema from the attachment $url.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param string $url Attachment url.
	 *
	 * @return array Image schema.
	 */
	protected function get_image_schema( $url ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\HowTo::get_image_schema' );

		$schema_id = $this->stable->context->canonical . '#schema-image-' . md5( $url );

		return $this->helpers->schema->image->generate_from_url( $schema_id, $url );
	}
}
frontend/schema/class-schema-faq-question-list.php000066600000001613151130633500016264 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

/**
 * Returns a question object for each question in an FAQ block.
 *
 * @since 11.1
 *
 * @deprecated 14.0
 */
class WPSEO_Schema_FAQ_Question_List {

	/**
	 * WPSEO_Schema_FAQ_Question_List constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param WP_Block_Parser_Block[] $blocks  An array of the FAQ blocks on this page.
	 * @param WPSEO_Schema_Context    $context A value object with context variables.
	 */
	public function __construct( $blocks, $context ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}

	/**
	 * Find an image based on its URL and generate a Schema object for it.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return array The Schema with a question list added.
	 */
	public function generate() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return [];
	}
}
frontend/schema/class-schema-image.php000066600000005106151130633500013762 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

/**
 * Returns schema image data.
 *
 * @since 11.1
 *
 * @deprecated 14.0
 *
 * @property string $schema_id      The `@id` to use for the returned image.
 * @property array  $data           The ImageObject Schema array.
 * @property int    $attachment_id  The ID of the attachment used to generate the object.
 */
class WPSEO_Schema_Image {

	/**
	 * Value to use as the image id.
	 *
	 * @var string
	 */
	private $schema_id;

	/**
	 * WPSEO_Schema_Image constructor.
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 *
	 * @param string $schema_id The string to use in an image's `@id`.
	 */
	public function __construct( $schema_id ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image' );
		$this->schema_id = $schema_id;
	}

	/**
	 * Find an image based on its URL and generate a Schema object for it.
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 *
	 * @param string $url     The image URL to base our object on.
	 * @param string $caption An optional caption.
	 *
	 * @return array Schema ImageObject array.
	 */
	public function generate_from_url( $url, $caption = '' ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_url' );
		return YoastSEO()->helpers->schema->image->generate_from_url( $this->schema_id, $url, $caption );
	}

	/**
	 * Retrieve data about an image from the database and use it to generate a Schema object.
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 *
	 * @param int    $attachment_id The attachment to retrieve data from.
	 * @param string $caption       The caption string, if there is one.
	 *
	 * @return array Schema ImageObject array.
	 */
	public function generate_from_attachment_id( $attachment_id, $caption = '' ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_attachment_id' );
		return YoastSEO()->helpers->schema->image->generate_from_attachment_id( $this->schema_id, $attachment_id, $caption );
	}

	/**
	 * If we can't find $url in our database, we output a simple ImageObject.
	 *
	 * @codeCoverageIgnore
	 * @deprecated 14.0
	 *
	 * @param string $url     The image URL.
	 * @param string $caption A caption, if set.
	 *
	 * @return array Schema ImageObject array.
	 */
	public function simple_image_object( $url, $caption = '' ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->simple_image_object' );
		return YoastSEO()->helpers->schema->image->simple_image_object( $this->schema_id, $url, $caption );
	}
}
frontend/schema/class-schema-webpage.php000066600000002755151130633500014321 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Generators\Schema\WebPage;

/**
 * Returns schema WebPage data.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_WebPage extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * The date helper.
	 *
	 * @var WPSEO_Date_Helper
	 */
	protected $date;

	/**
	 * WPSEO_Schema_WebPage constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( WebPage::class );

		$this->date = new WPSEO_Date_Helper();
	}

	/**
	 * Adds an author property to the $data if the WebPage is not represented.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array   $data The WebPage schema.
	 * @param WP_Post $post The post the context is representing.
	 *
	 * @return array The WebPage schema.
	 */
	public function add_author( $data, $post ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\WebPage::add_author' );

		return $this->stable->add_author( $data, $post );
	}

	/**
	 * If we have an image, make it the primary image of the page.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array $data WebPage schema data.
	 */
	public function add_image( &$data ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\WebPage::add_image' );

		$this->stable->add_image( $data );
	}
}
frontend/schema/class-schema-person.php000066600000010125151130633500014203 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Config\Schema_IDs;
use Yoast\WP\SEO\Generators\Schema\Person;

/**
 * Returns schema Person data.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_Person extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * The hash used for images.
	 *
	 * @var string
	 */
	protected $image_hash = Schema_IDs::PERSON_LOGO_HASH;

	/**
	 * Array of the social profiles we display for a Person.
	 *
	 * @var string[]
	 */
	private $social_profiles = [
		'facebook',
		'instagram',
		'linkedin',
		'pinterest',
		'twitter',
		'myspace',
		'youtube',
		'soundcloud',
		'tumblr',
		'wikipedia',
	];

	/**
	 * WPSEO_Schema_Person constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( Person::class );
	}

	/**
	 * Determines a User ID for the Person data.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return bool|int User ID or false upon return.
	 */
	protected function determine_user_id() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::determine_user_id' );

		return $this->stable->determine_user_id();
	}

	/**
	 * Retrieve a list of social profile URLs for Person.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param int $user_id User ID.
	 *
	 * @return string[] A list of social profiles.
	 */
	protected function get_social_profiles( $user_id ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::get_social_profiles' );

		/**
		 * Filter: 'wpseo_schema_person_social_profiles' - Allows filtering of social profiles per user.
		 *
		 * @param int $user_id The current user we're grabbing social profiles for.
		 *
		 * @api string[] $social_profiles The array of social profiles to retrieve. Each should be a user meta field
		 *                                key. As they are retrieved using the WordPress function `get_the_author_meta`.
		 */
		$social_profiles = apply_filters( 'wpseo_schema_person_social_profiles', $this->social_profiles, $user_id );
		$output          = [];

		// We can only handle an array.
		if ( ! is_array( $social_profiles ) ) {
			return $output;
		}

		foreach ( $social_profiles as $profile ) {
			// Skip non-string values.
			if ( ! is_string( $profile ) ) {
				continue;
			}

			$social_url = $this->url_social_site( $profile, $user_id );
			if ( $social_url ) {
				$output[] = $social_url;
			}
		}

		return $output;
	}

	/**
	 * Builds our array of Schema Person data for a given user ID.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param int $user_id The user ID to use.
	 *
	 * @return array An array of Schema Person data.
	 */
	protected function build_person_data( $user_id ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::build_person_data' );

		return $this->stable->build_person_data( $user_id );
	}

	/**
	 * Returns an ImageObject for the persons avatar.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array   $data      The Person schema.
	 * @param WP_User $user_data User data.
	 *
	 * @return array The Person schema.
	 */
	protected function add_image( $data, $user_data ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::add_image' );

		return $this->stable->add_image( $data, $user_data );
	}

	/**
	 * Returns an author's social site URL.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param string $social_site The social site to retrieve the URL for.
	 * @param mixed  $user_id     The user ID to use function outside of the loop.
	 *
	 * @return string
	 */
	protected function url_social_site( $social_site, $user_id = false ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::url_social_site' );

		$url = get_the_author_meta( $social_site, $user_id );

		if ( ! empty( $url ) && $social_site === 'twitter' ) {
			$url = 'https://twitter.com/' . $url;
		}

		return $url;
	}
}
frontend/schema/class-schema-article.php000066600000002246151130633500014325 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Generators\Schema\Article;

/**
 * Returns schema Article data.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_Article extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * The date helper.
	 *
	 * @var WPSEO_Date_Helper
	 */
	protected $date;

	/**
	 * WPSEO_Schema_Article constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param array|null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( Article::class );

		$this->date = new WPSEO_Date_Helper();
	}

	/**
	 * Determines whether a given post type should have Article schema.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param string|null $post_type Post type to check.
	 *
	 * @return bool True if it has article schema, false if not.
	 */
	public static function is_article_post_type( $post_type = null ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->article->is_article_post_type' );

		return YoastSEO()->helpers->schema->article->is_article_post_type( $post_type );
	}
}
frontend/schema/interface-wpseo-graph-piece.php000066600000001055151130633500015613 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

if ( ! interface_exists( 'WPSEO_Graph_Piece' ) ) {
	/**
	 * An interface for registering Schema Graph Pieces.
	 *
	 * @since      10.2
	 * @deprecated 14.0
	 */
	interface WPSEO_Graph_Piece {

		/**
		 * Add your piece of the graph.
		 *
		 * @return array|bool A graph piece on success, false on failure.
		 */
		public function generate();

		/**
		 * Determines whether or not a piece should be added to the graph.
		 *
		 * @return bool
		 */
		public function is_needed();
	}
}
frontend/schema/class-schema-author.php000066600000005116151130633500014203 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

use Yoast\WP\SEO\Config\Schema_IDs;
use Yoast\WP\SEO\Generators\Schema\Author;

/**
 * Returns schema Person data.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_Author extends WPSEO_Deprecated_Graph_Piece {

	/**
	 * The hash used for images.
	 *
	 * @var string
	 */
	protected $image_hash = Schema_IDs::AUTHOR_LOGO_HASH;

	/**
	 * The Schema type we use for this class.
	 *
	 * @var string[]
	 */
	protected $type = [ 'Person' ];

	/**
	 * WPSEO_Schema_Author constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param null $context The context. No longer used but present for BC.
	 */
	public function __construct( $context = null ) {
		parent::__construct( Author::class );
	}

	/**
	 * Determine whether we should return Person schema.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return bool
	 */
	public function is_needed() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Author::is_needed' );

		if ( $this->stable->context->indexable->object_type === 'user' ) {
			return true;
		}

		// This call to `is_post_author` is why this whole block could not be replaced with a `parent::is_needed()` call.
		if ( $this->is_post_author() ) {
			// If the author is the user the site represents, no need for an extra author block.
			if ( $this->stable->is_needed() ) {
				return (int) $this->stable->context->post->post_author !== $this->stable->context->site_user_id;
			}

			return true;
		}

		return false;
	}

	/**
	 * Gets the Schema type we use for this class.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return string[] The schema type.
	 */
	public static function get_type() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return [ 'Person' ];
	}

	/**
	 * Determine whether the current URL is worthy of Article schema.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return bool
	 */
	protected function is_post_author() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return (
			$this->stable->context->indexable->object_type === 'post'
			&& $this->helpers->schema->article->is_article_post_type( $this->stable->context->indexable->object_sub_type )
		);
	}

	/**
	 * Determines a User ID for the Person data.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @return bool|int User ID or false upon return.
	 */
	protected function determine_user_id() {
		_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Author::determine_user_id' );

		return parent::determine_user_id();
	}
}
frontend/schema/class-schema-ids.php000066600000002254151130633500013460 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

/**
 * Constants used for @id variables.
 *
 * @since      10.2
 * @deprecated 14.0
 */
class WPSEO_Schema_IDs {

	/**
	 * Hash used for the Author `@id`.
	 */
	const AUTHOR_HASH = '#author';

	/**
	 * Hash used for the Author Logo's `@id`.
	 */
	const AUTHOR_LOGO_HASH = '#authorlogo';

	/**
	 * Hash used for the Breadcrumb's `@id`.
	 */
	const BREADCRUMB_HASH = '#breadcrumb';

	/**
	 * Hash used for the Person `@id`.
	 */
	const PERSON_HASH = '#/schema/person/';

	/**
	 * Hash used for the Article `@id`.
	 */
	const ARTICLE_HASH = '#article';

	/**
	 * Hash used for the Organization `@id`.
	 */
	const ORGANIZATION_HASH = '#organization';

	/**
	 * Hash used for the Organization `@id`.
	 */
	const ORGANIZATION_LOGO_HASH = '#logo';

	/**
	 * Hash used for the logo `@id`.
	 */
	const PERSON_LOGO_HASH = '#personlogo';

	/**
	 * Hash used for an Article's primary image `@id`.
	 */
	const PRIMARY_IMAGE_HASH = '#primaryimage';

	/**
	 * Hash used for the WebPage's `@id`.
	 *
	 * @deprecated 19.3
	 */
	const WEBPAGE_HASH = '';

	/**
	 * Hash used for the Website's `@id`.
	 */
	const WEBSITE_HASH = '#website';
}
frontend/class-primary-category.php000066600000002043151130633500013475 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend
 */

/**
 * Adds customizations to the front end for the primary category.
 *
 * @deprecated 14.0
 */
class WPSEO_Frontend_Primary_Category implements WPSEO_WordPress_Integration {

	/**
	 * Registers the hooks necessary for correct primary category behaviour.
	 */
	public function register_hooks() {
		add_filter( 'post_link_category', [ $this, 'post_link_category' ], 10, 3 );
	}

	/**
	 * Filters post_link_category to change the category to the chosen category by the user.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param stdClass     $category   The category that is now used for the post link.
	 * @param array|null   $categories This parameter is not used.
	 * @param WP_Post|null $post       The post in question.
	 *
	 * @return array|object|WP_Error|null The category we want to use for the post link.
	 */
	public function post_link_category( $category, $categories = null, $post = null ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );

		return $category;
	}
}
frontend/class-opengraph-image.php000066600000001365151130633500013250 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend
 */

use Yoast\WP\SEO\Values\Open_Graph\Images;

_deprecated_file( basename( __FILE__ ), 'WPSEO 14.0' );

/**
 * Class WPSEO_OpenGraph_Image.
 *
 * @deprecated 14.0
 */
class WPSEO_OpenGraph_Image extends Images {

	/**
	 * The image ID used when the image is external.
	 *
	 * @var string
	 */
	const EXTERNAL_IMAGE_ID = '-1';

	/**
	 * Constructor.
	 *
	 * @deprecated 14.0
	 * @codeCoverageIgnore
	 *
	 * @param string|null          $image     Optional. The Image to use.
	 * @param WPSEO_OpenGraph|null $opengraph Optional. The OpenGraph object.
	 */
	public function __construct( $image = null, WPSEO_OpenGraph $opengraph = null ) {
		_deprecated_function( __METHOD__, 'WPSEO 14.0' );
	}
}
src/presenters/admin/indexation-warning-presenter.php000066600000003164151130633500017145 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Admin;

use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Presenters\Abstract_Presenter;

/**
 * Presenter class for the indexation warning.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Indexation_Warning_Presenter extends Abstract_Presenter {

	/**
	 * Represents the link to action type.
	 */
	const ACTION_TYPE_LINK_TO = 'link_to';

	/**
	 * Represents the run here action type.
	 */
	const ACTION_TYPE_RUN_HERE = 'run_here';

	/**
	 * The number of objects that needs to be indexed.
	 *
	 * @var int
	 */
	protected $total_unindexed;

	/**
	 * Determines if the action is a link or a button.
	 *
	 * The link links to the Yoast Tools page.
	 * The button will run the action on the current page.
	 *
	 * @var string
	 */
	protected $action_type;

	/**
	 * The options helper.
	 *
	 * @var Options_Helper
	 */
	protected $options_helper;

	/**
	 * Indexation_Warning_Presenter constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param int            $total_unindexed The number of objects that needs to be indexed.
	 * @param Options_Helper $options_helper  The options helper.
	 * @param string         $action_type     The action type.
	 */
	public function __construct( $total_unindexed, Options_Helper $options_helper, $action_type ) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Presents the warning that your site's content is not fully indexed.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return string The warning HTML.
	 */
	public function present() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return '';
	}
}
src/presenters/admin/auto-update-notification-presenter.php000066600000001421151130633500020246 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Admin;

use Yoast\WP\SEO\Presenters\Abstract_Presenter;

/**
 * Class Auto_Update_Notification_Presenter.
 *
 * @deprecated 19.8
 * @codeCoverageIgnore
 */
class Auto_Update_Notification_Presenter extends Abstract_Presenter {

	/**
	 * Returns the notification as an HTML string.
	 *
	 * @deprecated 19.8
	 * @codeCoverageIgnore
	 *
	 * @return string The notification in an HTML string representation.
	 */
	public function present() {
		\_deprecated_function( __METHOD__, 'WPSEO 19.8' );

		return '';
	}

	/**
	 * Returns the message to show.
	 *
	 * @deprecated 19.8
	 * @codeCoverageIgnore
	 *
	 * @return string The message.
	 */
	protected function get_message() {
		\_deprecated_function( __METHOD__, 'WPSEO 19.8' );

		return '';
	}
}
src/presenters/admin/indexation-modal-presenter.php000066600000001377151130633500016600 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Admin;

use Yoast\WP\SEO\Presenters\Abstract_Presenter;

/**
 * Presenter class for the indexation modal.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Indexation_Modal_Presenter extends Abstract_Presenter {

	/**
	 * Indexation_Modal constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param int $total_unindexed The number of objects that need to be indexed.
	 */
	public function __construct( $total_unindexed ) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Presents the modal.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return string The modal HTML.
	 */
	public function present() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return '';
	}
}
src/presenters/admin/indexation-list-item-presenter.php000066600000001726151130633500017411 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Admin;

use Yoast\WP\SEO\Helpers\Indexable_Helper;
use Yoast\WP\SEO\Presenters\Abstract_Presenter;

/**
 * Presenter class for the indexation list item.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Indexation_List_Item_Presenter extends Abstract_Presenter {

	/**
	 * Indexation_List_Item_Presenter constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param int              $total_unindexed  The number of objects that need to be indexed.
	 * @param Indexable_Helper $indexable_helper The indexable helper.
	 */
	public function __construct(
		$total_unindexed,
		Indexable_Helper $indexable_helper
	) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Presents the list item for the tools menu.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return string The list item HTML.
	 */
	public function present() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return '';
	}
}
src/presenters/admin/link-count-indexing-list-item-presenter.php000066600000001445151130633500021133 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Admin;

use Yoast\WP\SEO\Presenters\Abstract_Presenter;

/**
 * Presenter class for the link count indexing tool.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Link_Count_Indexing_List_Item_Presenter extends Abstract_Presenter {

	/**
	 * Link_Count_Indexing_List_Item_Presenter constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param int $total_unindexed The number of objects that need to be indexed.
	 */
	public function __construct( $total_unindexed ) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Returns the output as string.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return string
	 */
	public function present() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return '';
	}
}
src/presenters/admin/indexation-permalink-warning-presenter.php000066600000001726151130633500021127 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Admin;

/**
 * Presenter class for the warning that is given when the Category URLs (stripcategorybase) option is touched.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Indexation_Permalink_Warning_Presenter extends Indexation_Warning_Presenter {

	/**
	 * Represents the reason that the permalink settings are changed.
	 */
	const REASON_PERMALINK_SETTINGS = 'permalink_settings_changed';

	/**
	 * Represents the reason that the category base is changed.
	 */
	const REASON_CATEGORY_BASE_PREFIX = 'category_base_changed';

	/**
	 * Represents the reason that the home url option is changed.
	 */
	const REASON_HOME_URL_OPTION = 'home_url_option_changed';

	/**
	 * Presents the warning that your site's content is not fully indexed.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return string The warning HTML.
	 */
	public function present() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return '';
	}
}
src/presenters/admin/link-count-indexing-modal-presenter.php000066600000001421151130633500020312 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Admin;

use Yoast\WP\SEO\Presenters\Abstract_Presenter;

/**
 * Presenter class for the link count indexing modal.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Link_Count_Indexing_Modal_Presenter extends Abstract_Presenter {

	/**
	 * Indexation_Modal constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param int $total_unindexed The number of objects that need to be indexed.
	 */
	public function __construct( $total_unindexed ) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Presents the modal.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return string The modal HTML.
	 */
	public function present() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return '';
	}
}
src/presenters/open-graph/fb-app-id-presenter.php000066600000001361151130633500016044 0ustar00<?php

namespace Yoast\WP\SEO\Presenters\Open_Graph;

use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;

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

/**
 * Presenter class for the Open Graph FB app ID.
 *
 * @deprecated 15.5
 * @codeCoverageIgnore
 */
class FB_App_ID_Presenter extends Abstract_Indexable_Tag_Presenter {

	/**
	 * The tag key name.
	 *
	 * @var string
	 */
	protected $key = 'fb:app_id';

	/**
	 * The tag format including placeholders.
	 *
	 * @var string
	 */
	protected $tag_format = self::META_PROPERTY_CONTENT;

	/**
	 * Gets the raw value of a presentation.
	 *
	 * @return string The raw value.
	 */
	public function get() {
		return $this->presentation->open_graph_fb_app_id;
	}
}
src/actions/indexing/indexable-prepare-indexation-action.php000066600000000452151130633500020315 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexing;

/**
 * Action for preparing the indexing routine.
 *
 * @deprecated 15.3 - Use \Yoast\WP\SEO\Actions\Indexing\Indexing_Prepare_Action instead.
 * @codeCoverageIgnore
 */
class Indexable_Prepare_Indexation_Action extends Indexing_Prepare_Action {

}
src/actions/indexation/indexable-post-type-archive-indexation-action.php000066600000000614151130633500022577 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Reindexation action for post type archive indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action instead.
 * @codeCoverageIgnore
 */
class Indexable_Post_Type_Archive_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action {

}
src/actions/indexation/indexable-post-indexation-action.php000066600000000530151130633500020176 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Reindexation action for post indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action instead.
 * @codeCoverageIgnore
 */
class Indexable_Post_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action {

}
src/actions/indexation/indexable-prepare-indexation-action.php000066600000000557151130633500020660 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Action for preparing the indexable indexation routine.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Prepare_Indexation_Action instead.
 * @codeCoverageIgnore
 */
class Indexable_Prepare_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Prepare_Indexation_Action {

}
src/actions/indexation/indexable-general-indexation-action.php000066600000000544151130633500020633 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * General reindexation action for indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_General_Indexation_Action instead.
 * @codeCoverageIgnore
 */
class Indexable_General_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_General_Indexation_Action {

}
src/actions/indexation/post-link-indexing-action.php000066600000000510151130633500016641 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Reindexation action for post link indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action instead.
 * @codeCoverageIgnore
 */
class Post_Link_Indexing_Action extends \Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action {

}
src/actions/indexation/indexable-term-indexation-action.php000066600000000530151130633500020160 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Reindexation action for term indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexable_Term_Indexation_Action instead.
 * @codeCoverageIgnore
 */
class Indexable_Term_Indexation_Action extends \Yoast\WP\SEO\Actions\Indexing\Indexable_Term_Indexation_Action {

}
src/actions/indexation/term-link-indexing-action.php000066600000000510151130633500016623 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Reindexation action for term link indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Term_Link_Indexing_Action instead.
 * @codeCoverageIgnore
 */
class Term_Link_Indexing_Action extends \Yoast\WP\SEO\Actions\Indexing\Term_Link_Indexing_Action {

}
src/actions/indexation/abstract-link-indexing-action.php000066600000000530151130633500017461 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Reindexation action for link indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action instead.
 * @codeCoverageIgnore
 */
abstract class Abstract_Link_Indexing_Action extends \Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action {

}
src/actions/indexation/indexable-complete-indexation-action.php000066600000000571151130633500021026 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

use Yoast\WP\SEO\Actions\Indexing\Indexing_Complete_Action;

/**
 * Indexing action to call when the indexing is completed.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexing_Complete_Action instead.
 * @codeCoverageIgnore
 */
class Indexable_Complete_Indexation_Action extends Indexing_Complete_Action {

}
src/actions/indexation/indexation-action-interface.php000066600000000540151130633500017221 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Indexation;

/**
 * Interface definition of reindexation action for indexables.
 *
 * @deprecated 15.1 - Use \Yoast\WP\SEO\Actions\Indexing\Indexation_Action_Interface instead.
 * @codeCoverageIgnore
 */
interface Indexation_Action_Interface extends \Yoast\WP\SEO\Actions\Indexing\Indexation_Action_Interface {

}
src/actions/configuration/configuration-workout-action.php000066600000000446151130633500020212 0ustar00<?php

namespace Yoast\WP\SEO\Actions\Configuration;

/**
 * Class Configuration_Workout_Action.
 *
 * @deprecated 19.0 - Use \Yoast\WP\SEO\Actions\First_Time_Configuration_Action instead.
 * @codeCoverageIgnore
 */
class Configuration_Workout_Action extends First_Time_Configuration_Action {}
src/conditionals/norwegian-readability-conditional.php000066600000001132151130633500017311 0ustar00<?php

namespace Yoast\WP\SEO\Conditionals;

/**
 * Checks if the YOAST_SEO_NORWEGIAN_READABILITY constant is set.
 *
 * @deprecated 16.8
 * @codeCoverageIgnore
 */
class Norwegian_Readability_Conditional extends Feature_Flag_Conditional {

	/**
	 * Returns the name of the feature flag.
	 * 'YOAST_SEO_' is automatically prepended to it and it will be uppercased.
	 *
	 * @deprecated 16.8
	 * @codeCoverageIgnore
	 *
	 * @return string the name of the feature flag.
	 */
	public function get_feature_flag() {
		\_deprecated_function( __METHOD__, 'WPSEO 16.8' );
		return 'NORWEGIAN_READABILITY';
	}
}
src/conditionals/greek-support-conditional.php000066600000001102151130633500015635 0ustar00<?php

namespace Yoast\WP\SEO\Conditionals;

/**
 * Checks if the YOAST_SEO_GREEK_SUPPORT constant is set.
 *
 * @deprecated 17.5
 * @codeCoverageIgnore
 */
class Greek_Support_Conditional extends Feature_Flag_Conditional {

	/**
	 * Returns the name of the feature flag.
	 * 'YOAST_SEO_' is automatically prepended to it and it will be uppercased.
	 *
	 * @deprecated 17.5
	 * @codeCoverageIgnore
	 *
	 * @return string the name of the feature flag.
	 */
	public function get_feature_flag() {
		\_deprecated_function( __METHOD__, 'WPSEO 17.5' );
		return 'GREEK_SUPPORT';
	}
}
src/conditionals/farsi-support-conditional.php000066600000001102151130633500015644 0ustar00<?php

namespace Yoast\WP\SEO\Conditionals;

/**
 * Checks if the YOAST_SEO_FARSI_SUPPORT constant is set.
 *
 * @deprecated 17.2
 * @codeCoverageIgnore
 */
class Farsi_Support_Conditional extends Feature_Flag_Conditional {

	/**
	 * Returns the name of the feature flag.
	 * 'YOAST_SEO_' is automatically prepended to it and it will be uppercased.
	 *
	 * @deprecated 17.2
	 * @codeCoverageIgnore
	 *
	 * @return string the name of the feature flag.
	 */
	public function get_feature_flag() {
		\_deprecated_function( __METHOD__, 'WPSEO 17.2' );
		return 'FARSI_SUPPORT';
	}
}
src/conditionals/japanese-support-conditional.php000066600000001113151130633500016330 0ustar00<?php

namespace Yoast\WP\SEO\Conditionals;

/**
 * Checks if the YOAST_SEO_JAPANESE_SUPPORT constant is set.
 *
 * @deprecated 17.9
 * @codeCoverageIgnore
 */
class Japanese_Support_Conditional extends Feature_Flag_Conditional {

	/**
	 * Returns the name of the feature flag.
	 * 'YOAST_SEO_' is automatically prepended to it and it will be uppercased.
	 *
	 * @deprecated 17.9
	 * @codeCoverageIgnore
	 *
	 * @return string the name of the feature flag.
	 */
	public function get_feature_flag() {
		\_deprecated_function( __METHOD__, 'WPSEO 17.9' );
		return 'JAPANESE_SUPPORT';
	}
}
src/conditionals/front-end-inspector-conditional.php000066600000000724151130633500016737 0ustar00<?php

namespace Yoast\WP\SEO\Conditionals;

/**
 * Feature flag conditional for the front-end inspector.
 *
 * @deprecated 19.5
 */
class Front_End_Inspector_Conditional extends Feature_Flag_Conditional {

	/**
	 * Returns the name of the feature flag.
	 *
	 * @deprecated 19.5
	 *
	 * @return string The name of the feature flag.
	 */
	protected function get_feature_flag() {
		\_deprecated_function( __METHOD__, 'WPSEO 19.5' );
		return 'FRONT_END_INSPECTOR';
	}
}
src/routes/configuration-workout-route.php000066600000011327151130633500015105 0ustar00<?php

namespace Yoast\WP\SEO\Routes;

use WP_REST_Request;
use Yoast\WP\SEO\Actions\Configuration\Configuration_Workout_Action;
use Yoast\WP\SEO\Conditionals\No_Conditionals;

/**
 * Configuration_Workout_Route class.
 *
 * @deprecated 19.0 - Use \Yoast\WP\SEO\Actions\First_Time_Configuration_Action instead.
 * @codeCoverageIgnore
 */
class Configuration_Workout_Route implements Route_Interface {

	use No_Conditionals;

	/**
	 * Represents a site representation route.
	 *
	 * @var string
	 */
	const SITE_REPRESENTATION_ROUTE = '/site_representation';

	/**
	 * Represents a social profiles route.
	 *
	 * @var string
	 */
	const SOCIAL_PROFILES_ROUTE = '/social_profiles';

	/**
	 * Represents a person's social profiles route.
	 *
	 * @var string
	 */
	const PERSON_SOCIAL_PROFILES_ROUTE = '/person_social_profiles';

	/**
	 * Represents a route to enable/disable tracking.
	 *
	 * @var string
	 */
	const ENABLE_TRACKING_ROUTE = '/enable_tracking';

	/**
	 * Represents a route to check if current user has the correct capabilities to edit another user's profile.
	 *
	 * @var string
	 */
	const CHECK_CAPABILITY_ROUTE = '/check_capability';

	/**
	 * Configuration_Workout_Route constructor.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @param Configuration_Workout_Action $configuration_workout_action The configuration workout action.
	 */
	public function __construct(
		Configuration_Workout_Action $configuration_workout_action
	) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0' );
	}

	/**
	 * Registers routes with WordPress.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function register_routes() {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::register_routes' );
	}

	/**
	 * Sets the site representation values.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return void
	 */
	public function set_site_representation( WP_REST_Request $request ) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_site_representation' );
	}

	/**
	 * Sets the social profiles values.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return void
	 */
	public function set_social_profiles( WP_REST_Request $request ) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_social_profiles' );
	}

	/**
	 * Gets a person's social profiles values.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return void
	 */
	public function get_person_social_profiles( WP_REST_Request $request ) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::get_person_social_profiles' );
	}

	/**
	 * Sets a person's social profiles values.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return void
	 */
	public function set_person_social_profiles( WP_REST_Request $request ) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_person_social_profiles' );
	}

	/**
	 * Checks if the current user has the correct capability to edit a specific user.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return void
	 */
	public function check_capability( WP_REST_Request $request ) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::check_capability' );
	}

	/**
	 * Enables or disables tracking.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return void
	 */
	public function set_enable_tracking( WP_REST_Request $request ) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::set_enable_tracking' );
	}

	/**
	 * Checks if the current user has the right capability.
	 *
	 * @deprecated 19.0
	 * @codeCoverageIgnore
	 *
	 * @return bool
	 */
	public function can_manage_options() {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::can_manage_options' );

		return \current_user_can( 'wpseo_manage_options' );
	}

	/**
	 * Checks if the current user has the capability to edit a specific user.
	 *
	 * @param WP_REST_Request $request The request.
	 *
	 * @return void
	 */
	public function can_edit_user( WP_REST_Request $request ) {
		\_deprecated_function( __METHOD__, 'WPSEO 19.0', '\Yoast\WP\SEO\Routes\First_Time_Configuration_Route::can_edit_user' );
	}
}
src/services/health-check/curl-runner.php000066600000005524151130633500014472 0ustar00<?php

namespace Yoast\WP\SEO\Services\Health_Check;

use WPSEO_Addon_Manager;
use Yoast\WP\SEO\Helpers\Curl_Helper;

/**
 * Runs the Curl health check.
 *
 * @deprecated 19.7.2
 * @codeCoverageIgnore
 */
class Curl_Runner implements Runner_Interface {

	/**
	 * Sets the minimum cURL version for this health check to pass.
	 */
	const MINIMUM_CURL_VERSION = '7.34.0';

	/**
	 * Sets the target URL for testing whether the MyYoast API is reachable.
	 */
	const MYYOAST_API_REQUEST_URL = 'sites/current';

	/**
	 * Constructor.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @psalm-suppress InvalidClass MyYoast is a product name, so it's an exception to the class naming conventions.
	 * @param WPSEO_Addon_Manager         $addon_manager                The add-on manager.
	 * @param MyYoast_Api_Request_Factory $my_yoast_api_request_factory A MyYoast API request object.
	 * @param Curl_Helper                 $curl_helper                  A cURL helper object for obtaining
	 *                                                                  cURL installation information.
	 */
	public function __construct(
		WPSEO_Addon_Manager $addon_manager,
		MyYoast_Api_Request_Factory $my_yoast_api_request_factory,
		Curl_Helper $curl_helper
	) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
	}

	/**
	 * Runs the health check. Checks if cURL is installed and up to date, and if it's able to reach the MyYoast API
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function run() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
	}

	/**
	 * Returns whether the health check was successful.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return bool True if all the routines for this health check were successful.
	 */
	public function is_successful() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return true;
	}

	/**
	 * Returns whether there are premium plugins installed.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return bool True if there are premium plugins installed.
	 */
	public function has_premium_plugins_installed() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return false;
	}

	/**
	 * Returns whether cURL was able to reach the MyYoast API.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return bool True if cURL was able to reach the MyYoast API.
	 */
	public function can_reach_my_yoast_api() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return true;
	}

	/**
	 * Returns whether the installed cURL version is recent enough.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return bool True if the installed cURL version is more recent than MINIMUM_CURL_VERSION.
	 */
	public function has_recent_curl_version_installed() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return true;
	}
}
src/services/health-check/ryte-runner.php000066600000004564151130633500014513 0ustar00<?php

namespace Yoast\WP\SEO\Services\Health_Check;

use WPSEO_Utils;
use Yoast\WP\SEO\Integrations\Admin\Ryte_Integration;

/**
 * Runs the Ryte health check.
 *
 * @deprecated 19.6
 * @codeCoverageIgnore
 */
class Ryte_Runner implements Runner_Interface {

	/**
	 * Constructor.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param Ryte_Integration $ryte  The Ryte_Integration object that the health check uses to check indexability.
	 * @param WPSEO_Utils      $utils The WPSEO_Utils object used to determine whether the site is in development mode.
	 */
	public function __construct(
		Ryte_Integration $ryte,
		WPSEO_Utils $utils
	) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Runs the health check. Checks if Ryte is accessible and whether the site is indexable.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function run() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Checks if the site is a live production site that has Ryte enabled.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool
	 */
	public function should_run() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return false;
	}

	/**
	 * Checks if the site is indexable.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool
	 */
	public function is_successful() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return true;
	}

	/**
	 * Checks if the site's indexability is unknown.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool Returns true if the site indexability is unknown even though getting a response from Ryte was
	 *              successful.
	 */
	public function has_unknown_indexability() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return false;
	}

	/**
	 * Checks whether there was a response error when attempting a request to Ryte.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool True if the health check got a valid error response.
	 */
	public function got_response_error() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return true;
	}

	/**
	 * Returns the error response is there was one.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return array|null
	 */
	public function get_error_response() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}
}
src/services/health-check/curl-check.php000066600000002244151130633500014232 0ustar00<?php

namespace Yoast\WP\SEO\Services\Health_Check;

/**
 * Passes if the health check can reach the MyYoast API using a recent enough cURL version.
 *
 * @deprecated 19.7.2
 * @codeCoverageIgnore
 */
class Curl_Check extends Health_Check {

	/**
	 * Constructor.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @param Curl_Runner  $runner  The object that implements the actual health check.
	 * @param Curl_Reports $reports The object that generates WordPress-friendly results.
	 * @return void
	 */
	public function __construct(
		Curl_Runner $runner,
		Curl_Reports $reports
	) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
	}

	/**
	 * Returns a human-readable label for this health check.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return string The human-readable label.
	 */
	public function get_test_label() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return '';
	}

	/**
	 * Returns the WordPress-friendly health check result.
	 *
	 * @return string[] The WordPress-friendly health check result.
	 */
	protected function get_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return [];
	}
}
src/services/health-check/ryte-reports.php000066600000004550151130633500014673 0ustar00<?php

namespace Yoast\WP\SEO\Services\Health_Check;

use WPSEO_Shortlinker;

/**
 * Presents a set of different messages for the Ryte health check.
 *
 * @deprecated 19.6
 * @codeCoverageIgnore
 */
class Ryte_Reports {

	use Reports_Trait;

	/**
	 * Constructor
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param Report_Builder_Factory $report_builder_factory  The factory for result builder objects.
	 *                                                        This class uses the report builder to generate
	 *                                                        WordPress-friendly health check results.
	 * @param WPSEO_Shortlinker      $shortlinker             The WPSEO_Shortlinker object used to generate short
	 *                                                        links.
	 *
	 * @return void
	 */
	public function __construct(
		Report_Builder_Factory $report_builder_factory,
		WPSEO_Shortlinker $shortlinker
	) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Returns the message for a successful health check.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_success_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}

	/**
	 * Returns the report for a health check result in which the site was not indexable.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_not_indexable_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}

	/**
	 * Returns the report for when the health check was unable to determine indexability.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_unknown_indexability_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}

	/**
	 * Returns the result for when the health check got an error response from Ryte.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param array $response_error The error response from Ryte.
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_response_error_result( $response_error ) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}
}
src/services/health-check/curl-reports.php000066600000003624151130633500014656 0ustar00<?php

namespace Yoast\WP\SEO\Services\Health_Check;

use WPSEO_Admin_Utils;
use WPSEO_Shortlinker;

/**
 * Presents a set of different messages for the cURL health check.
 *
 * @deprecated 19.7.2
 * @codeCoverageIgnore
 */
class Curl_Reports {

	/**
	 * Constructor
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @param  Report_Builder_Factory $report_builder_factory The factory for result builder objects.
	 *                                                        This class uses the report builder to generate WordPress-friendly
	 *                                                        health check results.
	 * @param  WPSEO_Shortlinker      $shortlinker            The WPSEO_Shortlinker object used to generate short links.
	 * @return void
	 */
	public function __construct(
		Report_Builder_Factory $report_builder_factory,
		WPSEO_Shortlinker $shortlinker
	) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );
	}

	/**
	 * Returns the message for a successful health check.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_success_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return [];
	}

	/**
	 * Returns the message for when the health check was unable to reach the MyYoast API.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_my_yoast_api_not_reachable_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return [];
	}

	/**
	 * Returns the message for a successful health check.
	 *
	 * @deprecated 19.7.2
	 * @codeCoverageIgnore
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_no_recent_curl_version_installed_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.7.2' );

		return [];
	}
}
src/services/health-check/ryte-check.php000066600000002301151130633500014242 0ustar00<?php

namespace Yoast\WP\SEO\Services\Health_Check;

/**
 * Passes if the health check determines that the site is indexable using Ryte.
 *
 * @deprecated 19.6
 * @codeCoverageIgnore
 */
class Ryte_Check extends Health_Check {

	/**
	 * Constructor.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param Ryte_Runner  $runner  The object that implements the actual health check.
	 * @param Ryte_Reports $reports The object that generates WordPress-friendly results.
	 *
	 * @return void
	 */
	public function __construct(
		Ryte_Runner $runner,
		Ryte_Reports $reports
	) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Returns a human-readable label for this health check.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return string The human-readable label.
	 */
	public function get_test_label() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return '';
	}

	/**
	 * Returns the WordPress-friendly health check result.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return string[] The WordPress-friendly health check result.
	 */
	protected function get_result() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}
}
src/integrations/third-party/elementor.php000066600000002760151130633500015021 0ustar00<?php
// phpcs:disable Yoast.Commenting.FileComment.Unnecessary
/**
 * Graceful deprecation of various classes which were renamed.
 *
 * {@internal As this file is just (temporarily) put in place to warn extending
 * plugins about the class name changes, it is exempt from select CS standards.}
 *
 * @package Yoast\WP\SEO
 *
 * @since      16.7
 * @deprecated 16.7
 *
 * @phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
 * @phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound
 * @phpcs:disable Yoast.Commenting.CodeCoverageIgnoreDeprecated
 * @phpcs:disable Yoast.Commenting.FileComment.Unnecessary
 * @phpcs:disable Yoast.Files.FileName.InvalidClassFileName
 */

namespace Yoast\WP\SEO\Integrations\Third_Party;

/**
 * Class Elementor_Exclude_Post_Types.
 *
 * @deprecated 16.7 Use {@see \Yoast\WP\SEO\Integrations\Third_Party\Exclude_Elementor_Post_Types} instead.
 */
class Elementor_Exclude_Post_Types extends Exclude_Elementor_Post_Types {

	/**
	 * Elementor Exclude Post Types constructor.
	 *
	 * @deprecated 16.7 Use {@see \Yoast\WP\SEO\Integrations\Third_Party\Exclude_Elementor_Post_Types} instead.
	 */
	public function __construct() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 16.7', '\Yoast\WP\SEO\Integrations\Third_Party\Exclude_Elementor_Post_Types' );

		// Only call a constructor if the parent has one; we already are a subclass of the parent.
		if ( \is_callable( [ parent::class, '__construct' ] ) ) {
			parent::__construct();
		}
	}
}
src/integrations/admin/link-count-notification-integration.php000066600000004044151130633500020735 0ustar00<?php

namespace Yoast\WP\SEO\Integrations\Admin;

use Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Integrations\Integration_Interface;
use Yoast_Notification_Center;

/**
 * Link_Count_Notification_Integration class.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Link_Count_Notification_Integration implements Integration_Interface {

	/**
	 * The ID of the link indexing notification.
	 *
	 * @var string
	 */
	const NOTIFICATION_ID = 'wpseo-reindex-links';

	/**
	 * Returns the conditionals based in which this loadable should be active.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return array
	 */
	public static function get_conditionals() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return [ Admin_Conditional::class ];
	}

	/**
	 * Link_Count_Notification_Integration constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param Yoast_Notification_Center $notification_center       The Yoast notification center.
	 * @param Post_Link_Indexing_Action $post_link_indexing_action The post link indexing action.
	 */
	public function __construct(
		Yoast_Notification_Center $notification_center,
		Post_Link_Indexing_Action $post_link_indexing_action
	) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Initializes the integration.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 */
	public function register_hooks() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Removes the notification when it is set and the amount of unindexed items is lower than the threshold.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 */
	public function cleanup_notification() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Adds the notification when it isn't set already and the amount of unindexed items is greater than the set
	 * threshold.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 */
	public function manage_notification() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}
}
src/integrations/admin/link-count-tools-integration.php000066600000005133151130633500017407 0ustar00<?php

namespace Yoast\WP\SEO\Integrations\Admin;

use WPSEO_Admin_Asset_Manager;
use Yoast\WP\SEO\Actions\Indexing\Post_Link_Indexing_Action;
use Yoast\WP\SEO\Actions\Indexing\Term_Link_Indexing_Action;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Conditionals\Migrations_Conditional;
use Yoast\WP\SEO\Conditionals\Yoast_Admin_And_Dashboard_Conditional;
use Yoast\WP\SEO\Integrations\Integration_Interface;

/**
 * Link_Count_Tools_Integration class.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Link_Count_Tools_Integration implements Integration_Interface {

	/**
	 * Returns the conditionals based in which this loadable should be active.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return array
	 */
	public static function get_conditionals() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return [
			Admin_Conditional::class,
			Yoast_Admin_And_Dashboard_Conditional::class,
			Migrations_Conditional::class,
		];
	}

	/**
	 * Constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param Post_Link_Indexing_Action $post_link_indexing_action The post link indexing action.
	 * @param Term_Link_Indexing_Action $term_link_indexing_action The term link indexing action.
	 * @param WPSEO_Admin_Asset_Manager $asset_manager             The asset manager.
	 */
	public function __construct(
		Post_Link_Indexing_Action $post_link_indexing_action,
		Term_Link_Indexing_Action $term_link_indexing_action,
		WPSEO_Admin_Asset_Manager $asset_manager
	) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Initializes the integration.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 */
	public function register_hooks() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Enqueues all required assets.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function enqueue_assets() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Renders the tools list item.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function render_tools_overview_item() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Renders the link count indexing modal.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function render_modal() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Returns the total number of unindexed objects.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return int
	 */
	protected function get_total_unindexed() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return 0;
	}
}
src/integrations/admin/indexation-integration.php000066600000011471151130633500016332 0ustar00<?php

namespace Yoast\WP\SEO\Integrations\Admin;

use WPSEO_Admin_Asset_Manager;
use Yoast\WP\SEO\Actions\Indexing\Indexable_General_Indexation_Action;
use Yoast\WP\SEO\Actions\Indexing\Indexable_Indexing_Complete_Action;
use Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Indexation_Action;
use Yoast\WP\SEO\Actions\Indexing\Indexable_Post_Type_Archive_Indexation_Action;
use Yoast\WP\SEO\Actions\Indexing\Indexable_Term_Indexation_Action;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Conditionals\Migrations_Conditional;
use Yoast\WP\SEO\Conditionals\Yoast_Admin_And_Dashboard_Conditional;
use Yoast\WP\SEO\Conditionals\Yoast_Tools_Page_Conditional;
use Yoast\WP\SEO\Helpers\Indexable_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;

/**
 * Indexation_Integration class.
 *
 * @deprecated 15.1
 * @codeCoverageIgnore
 */
class Indexation_Integration implements Integration_Interface {

	/**
	 * Returns the conditionals based in which this loadable should be active.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return array
	 */
	public static function get_conditionals() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return [
			Admin_Conditional::class,
			Yoast_Admin_And_Dashboard_Conditional::class,
			Migrations_Conditional::class,
		];
	}

	/**
	 * Indexation_Integration constructor.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @param Indexable_Post_Indexation_Action              $post_indexation              The post indexation action.
	 * @param Indexable_Term_Indexation_Action              $term_indexation              The term indexation action.
	 * @param Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation The archive indexation action.
	 * @param Indexable_General_Indexation_Action           $general_indexation           The general indexation action.
	 * @param Indexable_Indexing_Complete_Action            $complete_indexation_action   The complete indexation action.
	 * @param Options_Helper                                $options_helper               The options helper.
	 * @param WPSEO_Admin_Asset_Manager                     $asset_manager                The admin asset manager.
	 * @param Yoast_Tools_Page_Conditional                  $yoast_tools_page_conditional The Yoast tools page conditional.
	 * @param Indexable_Helper                              $indexable_helper             The indexable helper.
	 */
	public function __construct(
		Indexable_Post_Indexation_Action $post_indexation,
		Indexable_Term_Indexation_Action $term_indexation,
		Indexable_Post_Type_Archive_Indexation_Action $post_type_archive_indexation,
		Indexable_General_Indexation_Action $general_indexation,
		Indexable_Indexing_Complete_Action $complete_indexation_action,
		Options_Helper $options_helper,
		WPSEO_Admin_Asset_Manager $asset_manager,
		Yoast_Tools_Page_Conditional $yoast_tools_page_conditional,
		Indexable_Helper $indexable_helper
	) {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Initializes the integration.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 */
	public function register_hooks() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Enqueues the required scripts.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function enqueue_scripts() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Renders the indexation warning.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function render_indexation_warning() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Renders the indexation modal.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function render_indexation_modal() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Renders the indexation list item.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function render_indexation_list_item() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Renders the indexation permalink warning.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function render_indexation_permalink_warning() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Runs a single indexation pass of each indexation action. Intended for use as a shutdown function.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function shutdown_indexation() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );
	}

	/**
	 * Returns the total number of unindexed objects.
	 *
	 * @deprecated 15.1
	 * @codeCoverageIgnore
	 *
	 * @return int The total number of unindexed objects.
	 */
	public function get_total_unindexed() {
		\_deprecated_function( __METHOD__, 'WPSEO 15.1' );

		return 0;
	}
}
src/integrations/admin/ryte-integration.php000066600000006522151130633500015154 0ustar00<?php

namespace Yoast\WP\SEO\Integrations\Admin;

use wfConfig;
use WP_Error;
use WPSEO_Ryte_Option;
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;

/**
 * Handles the request for getting the Ryte status.
 *
 * @deprecated 19.6
 * @codeCoverageIgnore
 */
class Ryte_Integration implements Integration_Interface {

	/**
	 * Constructor.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param Options_Helper $options_helper The options helper object used to determine if Ryte is active or not.
	 */
	public function __construct( Options_Helper $options_helper ) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Sets up the hooks.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function register_hooks() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Returns the conditionals based on which this loadable should be active.
	 *
	 * In this case: only when on an admin page.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return array The conditionals.
	 */
	public static function get_conditionals() {
		return [ Admin_Conditional::class ];
	}

	/**
	 * Determines if we can use the functionality.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool True if this functionality can be used.
	 */
	public function is_active() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return false;
	}

	/**
	 * Hooks to run on plugin activation.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 */
	public function activate_hooks() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Determines whether to add a custom cron weekly schedule.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return void
	 */
	public function maybe_add_weekly_schedule() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
	}

	/**
	 * Adds a custom weekly cron schedule.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @param array $schedules The existing custom cron schedules.
	 *
	 * @return array Enriched list of custom cron schedules.
	 */
	public function add_weekly_schedule( $schedules ) {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}

	/**
	 * Fetches the data from Ryte.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return bool Whether the request ran.
	 */
	public function fetch_from_ryte() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return true;
	}

	/**
	 * Retrieves the option to use.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return WPSEO_Ryte_Option The option.
	 */
	public function get_option() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return new WPSEO_Ryte_Option();
	}

	/**
	 * Sends a request to Ryte to get the indexability status.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return int The indexability status value.
	 */
	protected function request_indexability() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return -1;
	}

	/**
	 * Retrieves the Ryte API response property.
	 *
	 * @deprecated 19.6
	 * @codeCoverageIgnore
	 *
	 * @return array|WP_Error The response or WP_Error on failure.
	 */
	public function get_response() {
		\_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );

		return [];
	}
}
inc/class-wpseo-validator.php000066600000004502151130633500012253 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Internals
 */

/**
 * Class WPSEO_Validator.
 *
 * @deprecated 15.6
 */
class WPSEO_Validator {

	/**
	 * Validates whether the passed variable is a boolean.
	 *
	 * @deprecated 15.6
	 * @codeCoverageIgnore
	 *
	 * @param mixed $variable The variable to validate.
	 *
	 * @return bool Whether or not the passed variable is a valid boolean.
	 */
	public static function is_boolean( $variable ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.6' );

		if ( is_bool( $variable ) ) {
			return true;
		}

		return filter_var( $variable, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) !== null;
	}

	/**
	 * Validates whether the passed variable is a string.
	 *
	 * @deprecated 15.6
	 * @codeCoverageIgnore
	 *
	 * @param mixed $variable The variable to validate.
	 *
	 * @return bool Whether or not the passed variable is a string.
	 */
	public static function is_string( $variable ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.6' );

		return is_string( $variable );
	}

	/**
	 * Validates whether the passed variable is a non-empty string.
	 *
	 * @deprecated 15.6
	 * @codeCoverageIgnore
	 *
	 * @param mixed $variable The variable to validate.
	 *
	 * @return bool Whether or not the passed value is a non-empty string.
	 */
	public static function is_non_empty_string( $variable ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.6' );

		return self::is_string( $variable ) && $variable !== '';
	}

	/**
	 * Validates whether the passed variable is an integer.
	 *
	 * @deprecated 15.6
	 * @codeCoverageIgnore
	 *
	 * @param mixed $variable The variable to validate.
	 *
	 * @return bool Whether or not the passed variable is an integer.
	 */
	public static function is_integer( $variable ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.6' );

		return filter_var( $variable, FILTER_VALIDATE_INT ) || filter_var( $variable, FILTER_VALIDATE_INT ) === 0;
	}

	/**
	 * Determines whether a particular key exists within the passed dataset.
	 *
	 * @deprecated 15.6
	 * @codeCoverageIgnore
	 *
	 * @param array  $data The dataset to search through.
	 * @param string $key  The key to search for.
	 *
	 * @return bool Whether or not the key exists.
	 */
	public static function key_exists( array $data, $key ) {
		_deprecated_function( __METHOD__, 'WPSEO 15.6' );

		return array_key_exists( $key, $data );
	}
}
ActionScheduler_Abstract_QueueRunner_Deprecated.php000066600000001524151143231420016634 0ustar00<?php

/**
 * Abstract class with common Queue Cleaner functionality.
 */
abstract class ActionScheduler_Abstract_QueueRunner_Deprecated {

	/**
	 * Get the maximum number of seconds a batch can run for.
	 *
	 * @deprecated 2.1.1
	 * @return int The number of seconds.
	 */
	protected function get_maximum_execution_time() {
		_deprecated_function( __METHOD__, '2.1.1', 'ActionScheduler_Abstract_QueueRunner::get_time_limit()' );

		$maximum_execution_time = 30;

		// Apply deprecated filter.
		if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {
			_deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );
			$maximum_execution_time = apply_filters( 'action_scheduler_maximum_execution_time', $maximum_execution_time );
		}

		return absint( $maximum_execution_time );
	}
}
functions.php000066600000012231151143231420007264 0ustar00<?php
/**
 * Deprecated API functions for scheduling actions
 *
 * Functions with the wc prefix were deprecated to avoid confusion with
 * Action Scheduler being included in WooCommerce core, and it providing
 * a different set of APIs for working with the action queue.
 *
 * @package ActionScheduler
 */

/**
 * Schedule an action to run one time.
 *
 * @param int    $timestamp When the job will run.
 * @param string $hook The hook to trigger.
 * @param array  $args Arguments to pass when the hook triggers.
 * @param string $group The group to assign this job to.
 *
 * @return string The job ID
 */
function wc_schedule_single_action( $timestamp, $hook, $args = array(), $group = '' ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_single_action()' );
	return as_schedule_single_action( $timestamp, $hook, $args, $group );
}

/**
 * Schedule a recurring action.
 *
 * @param int    $timestamp When the first instance of the job will run.
 * @param int    $interval_in_seconds How long to wait between runs.
 * @param string $hook The hook to trigger.
 * @param array  $args Arguments to pass when the hook triggers.
 * @param string $group The group to assign this job to.
 *
 * @deprecated 2.1.0
 *
 * @return string The job ID
 */
function wc_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '' ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_recurring_action()' );
	return as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args, $group );
}

/**
 * Schedule an action that recurs on a cron-like schedule.
 *
 * @param int    $timestamp The schedule will start on or after this time.
 * @param string $schedule A cron-link schedule string.
 * @see http://en.wikipedia.org/wiki/Cron
 *   *    *    *    *    *    *
 *   ┬    ┬    ┬    ┬    ┬    ┬
 *   |    |    |    |    |    |
 *   |    |    |    |    |    + year [optional]
 *   |    |    |    |    +----- day of week (0 - 7) (Sunday=0 or 7)
 *   |    |    |    +---------- month (1 - 12)
 *   |    |    +--------------- day of month (1 - 31)
 *   |    +-------------------- hour (0 - 23)
 *   +------------------------- min (0 - 59)
 * @param string $hook The hook to trigger.
 * @param array  $args Arguments to pass when the hook triggers.
 * @param string $group The group to assign this job to.
 *
 * @deprecated 2.1.0
 *
 * @return string The job ID
 */
function wc_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '' ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_cron_action()' );
	return as_schedule_cron_action( $timestamp, $schedule, $hook, $args, $group );
}

/**
 * Cancel the next occurrence of a job.
 *
 * @param string $hook The hook that the job will trigger.
 * @param array  $args Args that would have been passed to the job.
 * @param string $group Action's group.
 *
 * @deprecated 2.1.0
 */
function wc_unschedule_action( $hook, $args = array(), $group = '' ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'as_unschedule_action()' );
	as_unschedule_action( $hook, $args, $group );
}

/**
 * Get next scheduled action.
 *
 * @param string $hook Action's hook.
 * @param array  $args Action's args.
 * @param string $group Action's group.
 *
 * @deprecated 2.1.0
 *
 * @return int|bool The timestamp for the next occurrence, or false if nothing was found
 */
function wc_next_scheduled_action( $hook, $args = null, $group = '' ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'as_next_scheduled_action()' );
	return as_next_scheduled_action( $hook, $args, $group );
}

/**
 * Find scheduled actions
 *
 * @param array  $args Possible arguments, with their default values:
 *        'hook' => '' - the name of the action that will be triggered
 *        'args' => NULL - the args array that will be passed with the action
 *        'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
 *        'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '='
 *        'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
 *        'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '='
 *        'group' => '' - the group the action belongs to
 *        'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING
 *        'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID
 *        'per_page' => 5 - Number of results to return
 *        'offset' => 0
 *        'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date'
 *        'order' => 'ASC'.
 * @param string $return_format OBJECT, ARRAY_A, or ids.
 *
 * @deprecated 2.1.0
 *
 * @return array
 */
function wc_get_scheduled_actions( $args = array(), $return_format = OBJECT ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'as_get_scheduled_actions()' );
	return as_get_scheduled_actions( $args, $return_format );
}
ActionScheduler_Schedule_Deprecated.php000066600000001500151143231420014261 0ustar00<?php

/**
 * Class ActionScheduler_Abstract_Schedule
 */
abstract class ActionScheduler_Schedule_Deprecated implements ActionScheduler_Schedule {

	/**
	 * Get the date & time this schedule was created to run, or calculate when it should be run
	 * after a given date & time.
	 *
	 * @param DateTime $after DateTime to calculate against.
	 *
	 * @return DateTime|null
	 */
	public function next( ?DateTime $after = null ) {
		if ( empty( $after ) ) {
			$return_value       = $this->get_date();
			$replacement_method = 'get_date()';
		} else {
			$return_value       = $this->get_next( $after );
			$replacement_method = 'get_next( $after )';
		}

		_deprecated_function( __METHOD__, '3.0.0', __CLASS__ . '::' . $replacement_method ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped

		return $return_value;
	}
}
ActionScheduler_Store_Deprecated.php000066600000002043151143231420013624 0ustar00<?php

/**
 * Class ActionScheduler_Store_Deprecated
 *
 * @codeCoverageIgnore
 */
abstract class ActionScheduler_Store_Deprecated {

	/**
	 * Mark an action that failed to fetch correctly as failed.
	 *
	 * @since 2.2.6
	 *
	 * @param int $action_id The ID of the action.
	 */
	public function mark_failed_fetch_action( $action_id ) {
		_deprecated_function( __METHOD__, '3.0.0', 'ActionScheduler_Store::mark_failure()' );
		self::$store->mark_failure( $action_id );
	}

	/**
	 * Add base hooks
	 *
	 * @since 2.2.6
	 */
	protected static function hook() {
		_deprecated_function( __METHOD__, '3.0.0' );
	}

	/**
	 * Remove base hooks
	 *
	 * @since 2.2.6
	 */
	protected static function unhook() {
		_deprecated_function( __METHOD__, '3.0.0' );
	}

	/**
	 * Get the site's local time.
	 *
	 * @deprecated 2.1.0
	 * @return DateTimeZone
	 */
	protected function get_local_timezone() {
		_deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' );
		return ActionScheduler_TimezoneHelper::get_local_timezone();
	}
}
ActionScheduler_AdminView_Deprecated.php000066600000012532151143231420014417 0ustar00<?php

/**
 * Class ActionScheduler_AdminView_Deprecated
 *
 * Store deprecated public functions previously found in the ActionScheduler_AdminView class.
 * Keeps them out of the way of the main class.
 *
 * @codeCoverageIgnore
 */
class ActionScheduler_AdminView_Deprecated {

	/**
	 * Adjust parameters for custom post type.
	 *
	 * @param array $args Args.
	 */
	public function action_scheduler_post_type_args( $args ) {
		_deprecated_function( __METHOD__, '2.0.0' );
		return $args;
	}

	/**
	 * Customise the post status related views displayed on the Scheduled Actions administration screen.
	 *
	 * @param array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen.
	 * @return array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen.
	 */
	public function list_table_views( $views ) {
		_deprecated_function( __METHOD__, '2.0.0' );
		return $views;
	}

	/**
	 * Do not include the "Edit" action for the Scheduled Actions administration screen.
	 *
	 * Hooked to the 'bulk_actions-edit-action-scheduler' filter.
	 *
	 * @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
	 * @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
	 */
	public function bulk_actions( $actions ) {
		_deprecated_function( __METHOD__, '2.0.0' );
		return $actions;
	}

	/**
	 * Completely customer the columns displayed on the Scheduled Actions administration screen.
	 *
	 * Because we can't filter the content of the default title and date columns, we need to recreate our own
	 * custom columns for displaying those post fields. For the column content, @see self::list_table_column_content().
	 *
	 * @param array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen.
	 * @return array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen.
	 */
	public function list_table_columns( $columns ) {
		_deprecated_function( __METHOD__, '2.0.0' );
		return $columns;
	}

	/**
	 * Make our custom title & date columns use defaulting title & date sorting.
	 *
	 * @param array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen.
	 * @return array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen.
	 */
	public static function list_table_sortable_columns( $columns ) {
		_deprecated_function( __METHOD__, '2.0.0' );
		return $columns;
	}

	/**
	 * Print the content for our custom columns.
	 *
	 * @param string $column_name The key for the column for which we should output our content.
	 * @param int    $post_id The ID of the 'scheduled-action' post for which this row relates.
	 */
	public static function list_table_column_content( $column_name, $post_id ) {
		_deprecated_function( __METHOD__, '2.0.0' );
	}

	/**
	 * Hide the inline "Edit" action for all 'scheduled-action' posts.
	 *
	 * Hooked to the 'post_row_actions' filter.
	 *
	 * @param array   $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
	 * @param WP_Post $post The 'scheduled-action' post object.
	 * @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
	 */
	public static function row_actions( $actions, $post ) {
		_deprecated_function( __METHOD__, '2.0.0' );
		return $actions;
	}

	/**
	 * Run an action when triggered from the Action Scheduler administration screen.
	 *
	 * @codeCoverageIgnore
	 */
	public static function maybe_execute_action() {
		_deprecated_function( __METHOD__, '2.0.0' );
	}

	/**
	 * Convert an interval of seconds into a two part human friendly string.
	 *
	 * The WordPress human_time_diff() function only calculates the time difference to one degree, meaning
	 * even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step
	 * further to display two degrees of accuracy.
	 *
	 * Based on Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/
	 *
	 * @return void
	 */
	public static function admin_notices() {
		_deprecated_function( __METHOD__, '2.0.0' );
	}

	/**
	 * Filter search queries to allow searching by Claim ID (i.e. post_password).
	 *
	 * @param string   $orderby MySQL orderby string.
	 * @param WP_Query $query Instance of a WP_Query object.
	 * @return void
	 */
	public function custom_orderby( $orderby, $query ) {
		_deprecated_function( __METHOD__, '2.0.0' );
	}

	/**
	 * Filter search queries to allow searching by Claim ID (i.e. post_password).
	 *
	 * @param string   $search MySQL search string.
	 * @param WP_Query $query Instance of a WP_Query object.
	 * @return void
	 */
	public function search_post_password( $search, $query ) {
		_deprecated_function( __METHOD__, '2.0.0' );
	}

	/**
	 * Change messages when a scheduled action is updated.
	 *
	 * @param  array $messages Messages.
	 * @return array
	 */
	public function post_updated_messages( $messages ) {
		_deprecated_function( __METHOD__, '2.0.0' );
		return $messages;
	}

}
notice/index.js000066600000004663151143561770007521 0ustar00/**
 * WordPress dependencies
 */
const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const { RichText } = wp.editor;

const { Notice } = wp.components;

/**
 * Internal dependencies
 */
import './style.scss';
import './editor.scss';

registerBlockType( 'themeisle-blocks/notice', {
	title: __( 'Notice' ),
	description: __( 'Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.' ),
	icon: 'info',
	category: 'themeisle-blocks',
	keywords: [
		'notice',
		'info'
	],
	attributes: {
		content: {
			type: 'array',
			source: 'children',
			selector: 'p.components-notice__content'
		}
	},

	supports: {
		align: [ 'wide', 'full' ],
		inserter: false
	},

	styles: [
		{ name: 'sucess', label: __( 'Success' ), isDefault: true },
		{ name: 'info', label: __( 'Info' ) },
		{ name: 'warning', label: __( 'Warning' ) },
		{ name: 'error', label: __( 'Error' ) }
	],

	edit: props => {
		let status = 'success';
		if ( props.attributes.className && props.attributes.className.includes( 'is-style-info' ) ) {
			status = '';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-warning' ) ) {
			status = 'warning';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-error' ) ) {
			status = 'error';
		}
		return (
			<Notice
				className={ props.className }
				isDismissible={ false }
				status={ status }
			>
				<RichText
					tagName="p"
					placeholder={ __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' ) }
					value={ props.attributes.content }
					className="components-notice__content"
					onChange={ content => props.setAttributes({ content }) }
					keepPlaceholderOnFocus="true"
				/>
			</Notice>
		);
	},
	save: props => {
		let status = 'success';
		if ( props.attributes.className && props.attributes.className.includes( 'is-style-info' ) ) {
			status = '';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-warning' ) ) {
			status = 'warning';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-error' ) ) {
			status = 'error';
		}
		return (
			<Notice
				className="themeisle-block-notice"
				isDismissible={ false }
				status={ status }
			>
				<RichText.Content
					tagName="p"
					className="components-notice__content"
					value={ props.attributes.content }
				/>
			</Notice>
		);
	}
});
notice/style.scss000066600000001065151143561770010102 0ustar00.themeisle-block-notice {

	&.components-notice {
		background-color: #E5F5FA;
		border-left: 4px solid #00a0d2;
		margin: 5px 15px 10px;
		padding: 8px 12px;
	
		&.is-success {
			border-left-color: #4ab866;
			background-color: lighten( #4ab866, 45% );
		}
	
		&.is-warning {
			border-left-color: #f0b849;
			background-color: lighten( #f0b849, 35% );
		}
	
		&.is-error {
			border-left-color: #d94f4f;
			background-color: lighten( #d94f4f, 35% );
		}
	
		.components-notice__content {
			font-size: 14px;
			line-height: 1.5;
			margin: 0 !important;
		}
	}
}notice/editor.scss000066600000001065151143561770010230 0ustar00.themeisle-block-notice {

	&.components-notice {
		background-color: #E5F5FA;
		border-left: 4px solid #00a0d2;
		margin: 5px 15px 10px;
		padding: 8px 12px;
	
		&.is-success {
			border-left-color: #4ab866;
			background-color: lighten( #4ab866, 45% );
		}
	
		&.is-warning {
			border-left-color: #f0b849;
			background-color: lighten( #f0b849, 35% );
		}
	
		&.is-error {
			border-left-color: #d94f4f;
			background-color: lighten( #d94f4f, 35% );
		}
	
		.components-notice__content {
			font-size: 14px;
			line-height: 1.5;
			margin: 0 !important;
		}
	}
}accordion-box/index.js000066600000000207151143561770010755 0ustar00/**
 * Accordion Block
 */
import './style.scss';
import './editor.scss';
import './accordion-area.js';
import './accordion-block.js';
accordion-box/accordion-block.js000066600000003057151143561770012705 0ustar00/**
 * WordPress dependencies
 */
const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const {
	RichText,
	InnerBlocks
} = wp.editor;

registerBlockType( 'themeisle-blocks/accordion-block', {
	title: __( 'Accordion Item' ),
	description: __( 'Accordion block allows you to add beautiful accordions in your posts.' ),
	parent: [ 'themeisle-blocks/accordion-area' ],
	icon: 'menu',
	category: 'themeisle-blocks',
	keywords: [
		'accordion',
		'collapsible',
		'orbitfox'
	],

	attributes: {
		heading: {
			type: 'array',
			source: 'children',
			selector: '.accordion-heading'
		}
	},

	supports: {
		inserter: false
	},

	edit: props => {

		const CONTENT =  [
			[ 'core/paragraph', {
				content: __( 'What is the point of being alive if you don’t at least try to do something remarkable?' ),
				className: 'accordion-content'
			} ]
		];

		return (
			<li className={ props.className }>
				<RichText
					tagName="h4"
					className="accordion-heading"
					value={ props.attributes.heading }
					placeholder="Section Title"
					onChange={ ( heading ) => props.setAttributes({ heading }) }
				/>
				<div className="accordion-content">
					<InnerBlocks
						template={ CONTENT }
						id="accordion-content"
					/>
				</div>
			</li>
		);
	},

	save: props => {
		return (
			<li>
				<input type="checkbox" checked />
				<i></i>
				<RichText.Content
					tagName="h4"
					className="accordion-heading"
					value={ props.attributes.heading }
				/>
				<div className="accordion-content">
					<InnerBlocks.Content/>
				</div>
			</li>
		);
	}
});
accordion-box/accordion-area.js000066600000001776151143561770012531 0ustar00/**
 * WordPress dependencies
 */
const {__} = wp.i18n;

const {
	registerBlockType
} = wp.blocks;

const {
	InnerBlocks
} = wp.editor;

registerBlockType( 'themeisle-blocks/accordion-area', {
	title: __( 'Accordion' ),
	description: __( 'Accordion block allows you to add beautiful accordions in your posts.' ),
	icon: 'menu',
	category: 'themeisle-blocks',
	keywords: [
		'accordion',
		'collapsible',
		'orbitfox'
	],

	supports: {
		inserter: false
	},

	edit: props => {
		const ALLOWED_BLOCKS = [ 'themeisle-blocks/accordion-block' ];
		const TEMPLATE = [ [ 'themeisle-blocks/accordion-block' ], [ 'themeisle-blocks/accordion-block' ], [ 'themeisle-blocks/accordion-block' ] ];
		return (
			<div className={ props.className }>
				<ul>
					<InnerBlocks
						allowedBlocks={ ALLOWED_BLOCKS }
						template={ TEMPLATE }
					/>
				</ul>
			</div>
		);
	},

	save: () => {
		return (
			<div className="wp-block-themeisle-blocks-accordion-box">
				<ul>
					<InnerBlocks.Content/>
				</ul>
			</div>
		);
	}
});
accordion-box/editor.scss000066600000001576151143561770011505 0ustar00$white: rgba(254,255,250,1);
$grey: rgba(220,231,235,1);
$black: rgba(48,69,92,0.8);

.wp-block-themeisle-blocks-accordion-area {
	ul {
		list-style: none;
		perspective: 900;
		padding: 20px 0;
		margin: 0;
		
		li {
			position: relative;
			padding: 0;
			margin: 0;
			padding-bottom: 18px;
			padding-top: 18px;
			list-style: none;
			border-top: 1px dotted $grey;
			animation-delay: 0.5s;
	
			&:last-of-type {
				border-bottom: 1px dotted $grey;
			}

			.accordion-heading {
				line-height: 34px;
				font-weight: 300;
				letter-spacing: 1px;
				display: block;
				background-color: $white;
				margin: 0 !important;
			}

			.accordion-content {
				color: $black;
				font-size: 17px;
				line-height: 26px;
				letter-spacing: 1px;
				position: relative;
				margin-top: 14px !important;
				max-height: 800px;
				opacity: 1;
				transform: translate( 0 , 0 );
			}
		}
	}
}accordion-box/style.scss000066600000004161151143561770011350 0ustar00$white: rgba(254,255,250,1);
$grey: rgba(220,231,235,1);
$black: rgba(48,69,92,0.8);

.wp-block-themeisle-blocks-accordion-area {
	.transition {
		transition: all 0.25s ease-in-out;
	}

	.no-select {
		-webkit-tap-highlight-color: rgba(0,0,0,0);
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		-khtml-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
	}

	ul {
		list-style: none;
		perspective: 900;
		padding: 20px 0;
		margin: 0;
		
		li {
			position: relative;
			padding: 0;
			margin: 0;
			padding-bottom: 18px;
			padding-top: 18px;
			list-style: none;
			border-top: 1px dotted $grey;
	
			&:last-of-type {
				border-bottom: 1px dotted $grey;
			}

			.accordion-heading {
				line-height: 34px;
				font-weight: 300;
				letter-spacing: 1px;
				display: block;
				background-color: $white;
				margin: 0 !important;
				padding: 0;
				cursor: pointer;
				@extend .no-select;
			}

			.accordion-content {
				color: $black;
				font-size: 17px;
				line-height: 26px;
				letter-spacing: 1px;
				position: relative;
				margin-top: 14px !important;
				max-height: 800px;
				@extend .transition;
				opacity: 1;
				transform: translate( 0 , 0 );
			}

			i {
				position: absolute;
				transform: translate( -6px , 0 );
				margin-top: 16px;
				right: 0;
	
				&:before, &:after{
					content: "";
					@extend .transition;
					position: absolute;
					background-color: $black;
					width: 3px;
					height: 9px;
				}

				&:before {
					transform: translate( -2px , 0 ) rotate( 45deg );
				}

				&:after {
					transform: translate( 2px , 0 ) rotate( -45deg );
				}
			}
	
			input[type=checkbox] {
				position: absolute;
				cursor: pointer;
				width: 100%;
				height: 100%;
				z-index: 1;
				opacity: 0;
	
				&:checked {
					&~.accordion-content {
						margin: 0 !important;
						max-height: 0;
						opacity: 0;
						transform: translate( 0 , 50% );
					}
		
					&~i {
						&:before {
							transform: translate( 2px , 0 ) rotate( 45deg );
						}
		
						&:after {
							transform: translate( -2px , 0 ) rotate( -45deg );
						}
					}
				}
			}
		}
	}
}services/style.scss000066600000002074151143561770010445 0ustar00.wp-block-themeisle-blocks-services {
	display: flex;
	position: relative;

	&.is-dim {
		&:before {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-color: rgba(0,0,0,.5);
		}

		.wp-block-column {
			z-index: 1;
		}
	}

	&.is-parallax {
		background-attachment: fixed !important;
	}

	&.alignfull {
		padding: 100px;
	}

	&.alignwide {
		padding: 100px 150px;
	}

	.wp-block-column {
		position: relative;
		flex: 1;
		padding: 20px 10px;
		margin: 0 20px;
	}
}

@media ( min-width:768px ) {
	.wp-block-themeisle-blocks-services {
		.wp-block-column {

			&:first-child {
				margin-left: 0;
			}
	
			&:last-child {
				margin-right: 0;
			}
		}
	}
}

@media ( max-width:768px ) {
	.wp-block-themeisle-blocks-services {
		display: block;

		.wp-block-column {
			margin: 20px;
		}
	}
}

@media ( max-width:1024px ) {
	.wp-block-themeisle-blocks-services {

		&.alignfull {
			padding: 100px 20px;
		}
	
		&.alignwide {
			padding: 100px 20px;
		}
	}
}services/service-block.js000066600000003730151143561770011476 0ustar00/**
 * WordPress dependencies
 */
const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const {
	InnerBlocks,
	InspectorControls,
	PanelColorSettings
} = wp.editor;

registerBlockType( 'themeisle-blocks/service-block', {
	title: __( 'Service Block' ),
	description: __( 'Use this Services table to showcase services your website offers.' ),
	parent: [ 'themeisle-blocks/services' ],
	icon: 'slides',
	category: 'themeisle-blocks',
	keywords: [
		'pricing',
		'table',
		'orbitfox'
	],
	attributes: {
		backgroundColor: {
			type: 'string',
			default: '#ffffff'
		}
	},

	supports: {
		inserter: false
	},

	edit: props => {
		const setBackgroundColor = value => {
			props.setAttributes({ backgroundColor: value });
		};
		const TEMPLATE =  [
			[ 'themeisle-blocks/font-awesome-icons', {
				fontSize: 62,
				prefix: 'fab',
				icon: 'angellist'
			} ],
			[ 'core/heading', {
				content: __( 'Panel' ),
				className: 'service-title',
				align: 'center',
				level: 4
			} ],
			[ 'core/paragraph', {
				content: __( 'Small description, but a pretty long one.' ),
				className: 'service-content',
				align: 'center'
			} ],
			[ 'core/button', {
				text: __( 'Learn More' ),
				className: 'service-button',
				align: 'center'
			} ]
		];

		return [
			<InspectorControls>
				<PanelColorSettings
					title={ __( 'Color Settings' ) }
					initialOpen={ true }
					colorSettings={ [
						{
							value: props.attributes.backgroundColor,
							onChange: setBackgroundColor,
							label: __( 'Background Color' )
						}
					] }
				>
				</PanelColorSettings>
			</InspectorControls>,

			<div
				className="wp-block-column"
				style={ {
					backgroundColor: props.attributes.backgroundColor
				}}
			>
				<InnerBlocks
					template={ TEMPLATE }
				/>
			</div>
		];
	},

	save: props => {
		return (
			<div
				className="wp-block-column"
				style={ {
					backgroundColor: props.attributes.backgroundColor
				} }
			>
				<InnerBlocks.Content/>
			</div>
		);
	}
});
services/editor.scss000066600000004544151143561770010577 0ustar00// These margins make sure that nested blocks stack/overlay with the parent block chrome
// This is sort of an experiment at making sure the editor looks as much like the end result as possible
// Potentially the rules here can apply to all nested blocks and enable stacking, in which case it should be moved elsewhere
.wp-block-themeisle-blocks-services .editor-block-list__layout {
	margin-left: 0;
	margin-right: 0;

	// This max-width is used to constrain the main editor column, it should not cascade into columns
	.editor-block-list__block {
		max-width: none;
	}
}

.wp-block-themeisle-blocks-services {
	display: block;
	position: relative;

	&.is-dim {
		&:before {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-color: rgba(0,0,0,.5);
		}

		.wp-block-column {
			z-index: 1;
		}
	}

	&.is-parallax {
		background-attachment: fixed !important;
	}

	> .editor-inner-blocks > .editor-block-list__layout {
		display: flex;

		> [data-type="themeisle-blocks/service-block"] {
			display: flex;
			flex-direction: column;
			flex: 1;
			width: 0;

			.editor-block-list__block-edit {
				margin-top: 12px;
				flex-basis: 100%;
			}
		}
	}

	.wp-block-column {
		&:first-child {
			margin-left: 0;
		}

		&:last-child {
			margin-right: 0;
		}

		position: relative;
		padding: 20px 10px;
		margin: 0 20px;
	}
}

[data-type="themeisle-blocks/services"] {
	&[data-align="full"] {
		.wp-block-themeisle-blocks-services {
			padding: 100px 150px;
		}
	}

	&[data-align="wide"] {
		.wp-block-themeisle-blocks-services {
			padding: 30px 50px;
		}
	}
}

@media ( max-width:768px ) {
	.wp-block-themeisle-blocks-services {
		display: block;

		> .editor-inner-blocks > .editor-block-list__layout {
			display: block;
	
			> [data-type="themeisle-blocks/service-block"] {
				display: flex;
				flex-direction: column;
				flex: 1;
				width: auto;
	
				.editor-block-list__block-edit {
					margin-top: 12px;
					flex-basis: 100%;
				}
			}
		}
	}
}

@media ( max-width:1024px ) {
	[data-type="themeisle-blocks/services"] {
		&[data-align="full"] {
			.wp-block-themeisle-blocks-services {
				padding: 100px 20px;
			}
		}

		&[data-align="wide"] {
			.wp-block-themeisle-blocks-services {
				padding: 30px 50px;
			}
		}
	}
}services/index.js000066600000000176151143561770010056 0ustar00/**
 * Services Block
 */
import './style.scss';
import './editor.scss';
import './services-block';
import './service-block';
services/services-block.js000066600000011334151143561770011660 0ustar00/**
 * External dependencies
 */
import classnames from 'classnames';

/**
 * WordPress dependencies
 */

const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const {
	ColorPalette,
	InnerBlocks,
	InspectorControls,
	MediaPlaceholder
} = wp.editor;

const {
	Button,
	ToggleControl,
	SelectControl,
	PanelBody
} = wp.components;

const { Fragment } = wp.element;

registerBlockType( 'themeisle-blocks/services', {
	title: __( 'Our Services' ),
	description: __( 'Use this Services table to showcase services your website offers.' ),
	icon: 'columns',
	category: 'themeisle-blocks',
	keywords: [
		'services',
		'features',
		'orbitfox'
	],
	attributes: {
		backgroundType: {
			type: 'string',
			default: 'color'
		},
		backgroundColor: {
			type: 'string',
			default: '#ffffff'
		},
		backgroundImageID: {
			type: 'string'
		},
		backgroundImageURL: {
			type: 'string'
		},
		backgroundDimmed: {
			type: 'boolean',
			default: true
		},
		backgroundParallax: {
			type: 'boolean',
			default: false
		}
	},

	supports: {
		align: [ 'wide', 'full' ],
		inserter: false
	},

	edit: props => {
		const ALLOWED_BLOCKS = [ 'themeisle-blocks/service-block' ];
		const ALLOWED_MEDIA_TYPES = [ 'image' ];
		const TEMPLATE = [ [ 'themeisle-blocks/service-block' ], [ 'themeisle-blocks/service-block' ], [ 'themeisle-blocks/service-block' ] ];
		const changeType = value => {
			props.setAttributes({ backgroundType: value });
		};
		const changeColor = value => {
			props.setAttributes({ backgroundColor: value });
		};
		const changeBackground = value => {
			props.setAttributes({
				backgroundImageID: value.id,
				backgroundImageURL: value.url
			});
		};
		const removeBackground = () => {
			props.setAttributes({
				backgroundImageID: '',
				backgroundImageURL: ''
			});
		};
		const toggleDimming = () => {
			props.setAttributes({ backgroundDimmed: ! props.attributes.backgroundDimmed });
		};
		const toggleParallax = () => {
			props.setAttributes({ backgroundParallax: ! props.attributes.backgroundParallax });
		};
		const style = {
			background: 'color' === props.attributes.backgroundType ? props.attributes.backgroundColor : `url(' ${ props.attributes.backgroundImageURL } ')`
		};
		return [
			<InspectorControls>
				<PanelBody
					title={ __( 'Background' ) }
				>
					<SelectControl
						label={ __( 'Background Type' ) }
						value={ props.attributes.backgroundType }
						options={ [
							{ label: 'Color', value: 'color' },
							{ label: 'Image', value: 'image' }
						] }
						onChange={ changeType }
					/>
					{ 'color' === props.attributes.backgroundType ?
						<ColorPalette
							label={ __( 'Background Color' ) }
							value={ props.attributes.backgroundColor }
							onChange={ changeColor }
						/>					:
						props.attributes.backgroundImageURL ?
							<Fragment>
								<ToggleControl
									label={ __( 'Dimmed Background' ) }
									checked={ props.attributes.backgroundDimmed }
									onChange={ toggleDimming }
								/>
								<ToggleControl
									label={ __( 'Parallax Background' ) }
									checked={ props.attributes.backgroundParallax }
									onChange={ toggleParallax }
								/>
								<img
									src={ props.attributes.backgroundImageURL }
								/>
								<Button
									isLarge
									onClick={ removeBackground }
									style={ { marginTop: '10px' } }
								>
									{ __( 'Change or Remove Image' ) }
								</Button>
							</Fragment>						:
							<MediaPlaceholder
								icon="format-image"
								labels={ {
									title: __( 'Background Image' ),
									name: __( 'an image' )
								} }
								value={ props.attributes.backgroundImageID }
								onSelect={ changeBackground }
								accept="image/*"
								allowedTypes={ ALLOWED_MEDIA_TYPES }
							/>
					}
				</PanelBody>
			</InspectorControls>,

			<div
				className={ classnames(
					props.className,
					{ 'is-dim': 'image' === props.attributes.backgroundType && props.attributes.backgroundDimmed },
					{ 'is-parallax': 'image' === props.attributes.backgroundType && props.attributes.backgroundParallax },
				) }
				style={ style }
			>
				<InnerBlocks
					allowedBlocks={ ALLOWED_BLOCKS }
					template={ TEMPLATE }
				/>
			</div>
		];
	},

	save: props => {
		const style = {
			background: 'color' === props.attributes.backgroundType ? props.attributes.backgroundColor : `url(' ${ props.attributes.backgroundImageURL } ')`
		};
		return (
			<div
				className={ classnames(
					'wp-block-themeisle-blocks-services',
					{ 'is-dim': 'image' === props.attributes.backgroundType && props.attributes.backgroundDimmed },
					{ 'is-parallax': 'image' === props.attributes.backgroundType && props.attributes.backgroundParallax },
				) }
				style={ style }
			>
				<InnerBlocks.Content/>
			</div>
		);
	}
});
tweetable/style.scss000066600000001616151143561770010577 0ustar00.wp-block-themeisle-blocks-tweetable {
	display: block;
	background-color: #fff;
	position: relative;
	border: 1px solid #dddddd;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 15px 30px;
	margin: 15px 0px;

	p {
		margin: 0 0 10px 0;
		padding: 0;
		position: relative;
		word-wrap: break-word;
		color: #999999;
		font-size: 24px;
		line-height: 140%;
		box-shadow: none;
		letter-spacing: 0.05em;
		font-weight: 100;
		text-decoration: none;
		text-transform: none;
	}

	.tweetbutton {
		margin: 0;
		padding: 0;
		padding-right: 0px;
		display: block;
		text-transform: uppercase;
		font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
		box-shadow: none;
		font-size: 12px;
		font-weight: bold;
		line-height: 100%;
		color: #999999;
		text-align: right;
		text-decoration: none;

		&:after {
			content: "\f301";
			color: #A0CCED;
			font-family: Dashicons;
			margin: 0 5px;
		}

	}
}tweetable/index.js000066600000011470151143561770010206 0ustar00/**
 * WordPress dependencies.
 */
const { __ } = wp.i18n;

const { get } = lodash;

const {
	registerBlockType,
	createBlock
} = wp.blocks;

const {
	Toolbar,
	TextControl
} = wp.components;

const { withSelect } = wp.data;

const {
	BlockControls,
	RichText
} = wp.editor;

/**
 * Internal dependencies
 */
import './editor.scss';
import './style.scss';

registerBlockType( 'themeisle-blocks/tweetable', {
	title: __( 'Click To Tweet' ),
	description: __( 'Click to Tweet allows visitors to easily share your content on Twitter.' ),
	icon: 'twitter',
	category: 'themeisle-blocks',
	keywords: [
		__( 'twitter' ),
		__( 'tweet' ),
		__( 'orbitfox' )
	],
	attributes: {
		quote: {
			type: 'string',
			source: 'children',
			selector: 'p',
			default: []
		},
		permalink: {
			type: 'url'
		},
		via: {
			type: 'string'
		},
		buttonText: {
			type: 'string',
			default: __( 'Click to Tweet' )
		}
	},

	supports: {
		inserter: false
	},

	transforms: {
		from: [
			{
				type: 'block',
				blocks: [ 'core/paragraph' ],
				transform: ({ content }) => {
					return createBlock( 'themeisle-blocks/tweetable', { quote: content });
				}
			},
			{
				type: 'block',
				blocks: [ 'core/quote' ],
				transform: ({ value, citation }) => {
					if ( ( ! value || ! value.length ) && ! citation ) {
						return createBlock( 'themeisle-blocks/tweetable' );
					}
					return ( value || []).map( item => createBlock( 'themeisle-blocks/tweetable', {
						quote: [ get( item, 'children.props.children', '' ) ]
					}) ).concat( citation ? createBlock( 'core/paragraph', {
						content: citation
					}) : []);
				}
			},
			{
				type: 'block',
				blocks: [ 'core/pullquote' ],
				transform: ({ value, citation }) => {
					if ( ( ! value || ! value.length ) && ! citation ) {
						return createBlock( 'themeisle-blocks/tweetable' );
					}
					return ( value || []).map( item => createBlock( 'themeisle-blocks/tweetable', {
						quote: [ get( item, 'children.props.children', '' ) ]
					}) ).concat( citation ? createBlock( 'core/paragraph', {
						quote: citation
					}) : []);
				}
			}
		],
		to: [
			{
				type: 'block',
				blocks: [ 'core/paragraph' ],
				transform: ({ content, quote }) => {
					if ( ! quote || ! quote.length ) {
						return createBlock( 'core/paragraph' );
					}
					return ( quote || []).map( item => createBlock( 'core/paragraph', {
						content: quote
					}) );
				}
			},
			{
				type: 'block',
				blocks: [ 'core/quote' ],
				transform: ({ quote }) => {
					return createBlock( 'core/quote', {
						value: [
							{ children: <p key="1">{ quote }</p> }
						]
					});
				}
			},
			{
				type: 'block',
				blocks: [ 'core/pullquote' ],
				transform: ({ quote }) => {
					return createBlock( 'core/pullquote', {
						value: [
							{ children: <p key="1">{ quote }</p> }
						]
					});
				}
			}
		]
	},

	edit: withSelect( ( select, props ) => {
		const { getPermalink } = select( 'core/editor' );

		if ( props.attributes.permalink === undefined ) {
			props.setAttributes({ permalink: getPermalink() });
		}

		return {
			permalink: getPermalink(),
			props
		};
	})( ({ props, className }) => {
		const onChangeQuote = ( value ) => {
			props.setAttributes({ quote: value });
		};

		const onChangeButton = ( value ) => {
			props.setAttributes({ buttonText: value });
		};

		const onChangeVia = ( value ) => {
			props.setAttributes({ via: value });
		};

		return [
			<BlockControls key="controls">
				<Toolbar>

					<i className="fas fa-at tweetable-icon"></i>

					<TextControl
						type="text"
						placeholder="Username"
						className="tweetable-controls"
						value={ props.attributes.via }
						onChange={ onChangeVia }
					/>

				</Toolbar>
			</BlockControls>,
			<blockquote className={ className }>
				<RichText
					tagName="p"
					multiline="false"
					placeholder={ __( 'What should we tweet?' ) }
					value={ props.attributes.quote }
					formattingControls={ [] }
					onChange={ onChangeQuote }
					keepPlaceholderOnFocus
				/>

				<RichText
					tagName="span"
					placeholder={ __( 'Tweet this!' ) }
					className="tweetbutton"
					value={ props.attributes.buttonText ? props.attributes.buttonText : __( 'Tweet this!' ) }
					formattingControls={ [] }
					onChange={ onChangeButton }
					keepPlaceholderOnFocus
				/>
			</blockquote>
		];
	}),

	save: props => {
		const viaUrl = props.attributes.via ? `&via=${ props.attributes.via }` : '';

		const tweetUrl = `http://twitter.com/share?&text=${ encodeURIComponent( props.attributes.quote ) }&url=${ props.attributes.permalink }${ viaUrl }`;

		return (
			<blockquote>
				<RichText.Content
					tagName="p"
					value={ props.attributes.quote }
				/>

				<RichText.Content
					tagName="a"
					className="tweetbutton"
					href={ tweetUrl }
					value={ props.attributes.buttonText }
					target="_blank"
				/>
			</blockquote>
		);
	}
});
tweetable/editor.scss000066600000002230151143561770010716 0ustar00.editor-block-list__block {
	.tweetable-icon {
		padding: 10px 8px;
	}
}

.editor-block-list__block {
 .tweetable-controls {
	.components-base-control__field {
		margin-bottom: 0;
	}
	input[type="text"] {
		width: auto;
		padding: 8px 8px;
	}
 }
}

.wp-block-themeisle-blocks-tweetable {
	display: block;
	background-color: #fff;
	position: relative;
	border: 1px solid #dddddd;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 15px 30px;
	margin: 15px 0px;

	p {
		margin: 0 0 10px 0;
		padding: 0;
		position: relative;
		word-wrap: break-word;
		color: #999999;
		font-size: 24px;
		line-height: 140%;
		box-shadow: none;
		letter-spacing: 0.05em;
		font-weight: 100;
		text-decoration: none;
		text-transform: none;
	}

	.tweetbutton {
		margin: 0;
		padding: 0;
		padding-right: 0px;
		position: relative;
		display: block;
		text-transform: uppercase;
		font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
		box-shadow: none;
		font-size: 12px;
		font-weight: bold;
		line-height: 100%;
		color: #999999;
		float: right;
		text-decoration: none;

		&:after {
			content: "\f301";
			color: #A0CCED;
			font-family: Dashicons;
			margin: 0 5px;
		}

	}
}chart/index.js000066600000001567151143561770007341 0ustar00/**
 * External dependencies
 */
import Editor from './Editor.js';

/**
 * WordPress dependencies.
 */
const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

/**
 * Internal dependencies
 */
import './editor.scss';

registerBlockType( 'themeisle-blocks/chart-pie', {
	title: __( 'Pie Chart' ),
	description: __( 'Display a beautiful Pie Chart on your blog post with Pie Chart block.' ),
	icon: 'chart-pie',
	category: 'themeisle-blocks',
	keywords: [
		__( 'pie' ),
		__( 'chart' ),
		__( 'orbitfox' )
	],
	attributes: {
		data: {
			type: 'string',
			default: '[["Label","Data"],["Dogs",40],["Cats",30],["Racoons",20],["Monkeys",10]]'
		},
		options: {
			type: 'object',
			default: {
				title: 'Animals',
				is3D: true
			}
		},
		id: {
			type: 'string',
			default: ''
		}
	},

	supports: {
		inserter: false
	},

	edit: Editor,

	save: () => {
		return null;
	}
});
chart/Editor.js000066600000004505151143561770007453 0ustar00/**
 * External dependencies
 */
import { Chart } from 'react-google-charts';

/**
 * WordPress dependencies
 */
const { __ } = wp.i18n;

const {
	Component,
	Fragment
} = wp.element;

const {
	ExternalLink,
	FormToggle,
	Notice,
	PanelBody,
	PanelRow,
	TextControl
} = wp.components;

const { InspectorControls } = wp.editor;

class Editor extends Component {
	constructor() {
		super( ...arguments );

		this.changeChartTitle = this.changeChartTitle.bind( this );
		this.toggle3d = this.toggle3d.bind( this );

		if ( this.props.clientId && '' === this.props.attributes.id ) {
			const id = this.props.clientId;
			this.props.setAttributes({ id });
		}

		this.data = JSON.parse( this.props.attributes.data );
	}

	changeChartTitle( value ) {
		const options = { ...this.props.attributes.options };
		options.title = value;
		this.props.setAttributes({ options });
	}

	toggle3d() {
		const options = { ...this.props.attributes.options };
		options.is3D = ! this.props.attributes.options.is3D;
		this.props.setAttributes({ options });
	}

	render() {
		return (
			<Fragment>

				<InspectorControls>
					<PanelBody
						title={ __( 'Chart Settings' ) }
					>
						<TextControl
							label={ __( 'Chart Title' ) }
							value={ this.props.attributes.options.title }
							onChange={ this.changeChartTitle }
						/>
						<PanelRow>
							<label
								htmlFor="is-3d-form-toggle"
							>
								{ __( 'Is chart 3d?' ) }
							</label>
							<FormToggle
								id="is-3d-form-toggle"
								label={ __( 'Is chart 3rd? ' ) }
								checked={ this.props.attributes.options.is3D }
								onChange={ this.toggle3d }
							/>
						</PanelRow>
					</PanelBody>
				</InspectorControls>

				<div className={ this.props.className }>
					<Chart
						chartType="PieChart"
						data={ JSON.parse( this.props.attributes.data ) }
						options={ this.props.attributes.options }
						width="100%"
						height="400px"
						legendToggle
					/>
				</div>
				<Notice status="warning" isDismissible={ false }>{ __( 'We have deprecated Pie Chart Block and it will be removed soon. For advanced options and more charts, please install our Visualizer plugin:' ) } <ExternalLink href="http://wordpress.org/plugins/visualizer/">{ __( 'Visualizer: Tables and Charts Manager for WordPress' ) }</ExternalLink></Notice>
			</Fragment>
		);
	}
}

export default Editor;
chart/editor.scss000066600000000134151143561770010044 0ustar00.wp-block-themeisle-blocks-chart-pie {
	width: 100%;

	.is-button {
		margin-top: 10px;
	}
}chart/class-chart-pie-block.php000066600000003510151143561770012442 0ustar00<?php
namespace ThemeIsle\GutenbergBlocks;

/**
 * Class Chart_Pie_Block
 */
class Chart_Pie_Block extends Base_Block {

	/**
	 * Constructor function for the module.
	 *
	 * @method __construct
	 */
	public function __construct() {
		parent::__construct();
	}

	/**
	 * Every block needs a slug, so we need to define one and assign it to the `$this->block_slug` property
	 *
	 * @return mixed
	 */
	function set_block_slug() {
		$this->block_slug = 'chart-pie';
	}

	/**
	 * Set the attributes required on the server side.
	 *
	 * @return mixed
	 */
	function set_attributes() {
		$this->attributes = array(
			'data' => array(
				'type'    => 'string',
				'default' => '[["Label","Data"],["Dogs",40],["Cats",30],["Racoons",20],["Monkeys",10]]',
			),
			'options' => array(
				'type' => 'object',
				'default' => [
					'title' => __( 'Animals', 'themeisle-companion' ),
					'is3D' => true,
				],
			),
			'id' => array(
				'type' => 'string',
			),
		);
	}

	/**
	 * Block render function for server-side.
	 *
	 * This method will pe passed to the render_callback parameter and it will output
	 * the server side output of the block.
	 *
	 * @return mixed|string
	 */
	function render( $attributes ) {
		$chart_markup = "<div class='wp-block-themeisle-blocks-chart-pie' id='" . $attributes['id'] . "' style='width: 100%; min-height: 450px;'></div>";

		$script = "<script>
			google.charts.load('current', {'packages':['corechart'] });
			google.charts.setOnLoadCallback(drawChart);
	
			function drawChart() {
				var data = google.visualization.arrayToDataTable(" . $attributes['data'] . ');
				var options = ' . json_encode( $attributes['options'] ) . ";
				var chart = new google.visualization.PieChart(document.getElementById('" . $attributes['id'] . "'));
				chart.draw(data, options);
			}
		</script>";

		return $chart_markup . $script;
	}
}
pricing-table/style.scss000066600000002673151143561770011347 0ustar00.wp-block-themeisle-blocks-pricing-table {
	display: flex;
	position: relative;

	&.is-dim {
		&:before {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-color: rgba(0,0,0,.5);
		}

		.wp-block-column {
			z-index: 1;
		}
	}

	&.is-parallax {
		background-attachment: fixed !important;
	}

	&.alignfull {
		padding: 100px;
	}

	&.alignwide {
		padding: 100px 150px;
	}

	.wp-block-column {
		position: relative;
		flex: 1;
		padding: 20px 10px;
		margin: 0 20px;
	}

	.raised {
		-webkit-box-shadow: 0 16px 38px -12px rgba(0,0,0,.56),0 4px 25px 0 rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2);
		-moz-box-shadow: 0 16px 38px -12px rgba(0,0,0,.56),0 4px 25px 0 rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2);
		box-shadow: 0 16px 38px -12px rgba(0,0,0,.56),0 4px 25px 0 rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2);
	}
}


@media ( min-width:768px ) {
	.wp-block-themeisle-blocks-pricing-table {
		.wp-block-column {

			&:first-child {
				margin-left: 0;
			}
	
			&:last-child {
				margin-right: 0;
			}
		}
	}
}

@media ( max-width:768px ) {
	.wp-block-themeisle-blocks-pricing-table {
		display: block;

		.wp-block-column {
			margin: 20px;
		}
	}
}

@media ( max-width:1024px ) {
	.wp-block-themeisle-blocks-pricing-table {

		&.alignfull {
			padding: 100px 20px;
		}
	
		&.alignwide {
			padding: 100px 20px;
		}
	}
}pricing-table/pricing-block.js000066600000006463151143561770012374 0ustar00/**
 * WordPress dependencies
 */

import classnames from 'classnames';

const { __ } = wp.i18n;

const {
	registerBlockType
} = wp.blocks;

const {
	InnerBlocks,
	BlockControls,
	InspectorControls,
	PanelColorSettings
} = wp.editor;

const {
	Dashicon,
	Toolbar,
	Button,
	Tooltip
} = wp.components;

/**
 * Internal dependencies
 */
registerBlockType( 'themeisle-blocks/pricing-block', {
	title: __( 'Pricing Block' ),
	description: __( 'Pricing tables are a critical part in showcasing your services, prices and overall offerings.' ),
	parent: [ 'themeisle-blocks/pricing-table' ],
	icon: 'slides',
	category: 'themeisle-blocks',
	keywords: [
		'pricing',
		'table',
		'orbitfox'
	],
	attributes: {
		featured: {
			type: 'boolean',
			default: false
		},
		backgroundColor: {
			type: 'string',
			default: '#ffffff'
		}
	},

	supports: {
		inserter: false
	},

	edit: props => {
		const toggleFeatured = () => {
			props.setAttributes({ featured: ! props.attributes.featured });
		};
		const setBackgroundColor = value => {
			props.setAttributes({ backgroundColor: value });
		};
		const TEMPLATE =  [
			[ 'core/heading', {
				content: __( 'Basic' ),
				className: 'pricing-title',
				align: 'center',
				level: 5
			} ],
			[ 'core/paragraph', {
				content: __( '$9.99' ),
				align: 'center',
				customFontSize: 36
			} ],
			[ 'core/paragraph', {
				content: __( 'Per Month' ),
				align: 'center',
				customFontSize: 12
			} ],
			[ 'core/separator', {} ],
			[ 'core/paragraph', {
				content: __( 'First Feature' ),
				align: 'center',
				fontSize: 'small'
			} ],
			[ 'core/separator', {} ],
			[ 'core/paragraph', {
				content: __( 'Second Feature' ),
				align: 'center',
				fontSize: 'small'
			} ],
			[ 'core/separator', {} ],
			[ 'core/paragraph', {
				content: __( 'Last Feature' ),
				align: 'center',
				fontSize: 'small'
			} ],
			[ 'core/separator', {} ],
			[ 'core/button', {
				text: __( 'Buy Now' ),
				className: 'pricing-button',
				align: 'center'
			} ]
		];

		return [
			<BlockControls key="toolbar-controls">
				<Toolbar
					className='components-toolbar'
				>
					<Tooltip text={ __( 'Feature Table' )	}>
						<Button
							className={ classnames(
								'components-icon-button',
								'components-toolbar__control',
								{ 'is-active': props.attributes.featured },
							) }
							onClick={ toggleFeatured }
						>
							<Dashicon icon="star-empty" />
						</Button>
					</Tooltip>
				</Toolbar>
			</BlockControls>,

			<InspectorControls>
				<PanelColorSettings
					title={ __( 'Color Settings' ) }
					initialOpen={ true }
					colorSettings={ [
						{
							value: props.attributes.backgroundColor,
							onChange: setBackgroundColor,
							label: __( 'Background Color' )
						}
					] }
				>
				</PanelColorSettings>
			</InspectorControls>,

			<div
				className={ classnames(
					'wp-block-column',
					{ 'raised': props.attributes.featured },
				) }
				style={ {
					backgroundColor: props.attributes.backgroundColor
				}}
			>
				<InnerBlocks
					template={ TEMPLATE }
				/>
			</div>
		];
	},

	save: props => {
		return (
			<div
				className={ classnames(
					'wp-block-column',
					{ 'raised': props.attributes.featured },
				) }
				style={ {
					backgroundColor: props.attributes.backgroundColor
				} }
			>
				<InnerBlocks.Content/>
			</div>
		);
	}
});
pricing-table/editor.scss000066600000005177151143561770011477 0ustar00// These margins make sure that nested blocks stack/overlay with the parent block chrome
// This is sort of an experiment at making sure the editor looks as much like the end result as possible
// Potentially the rules here can apply to all nested blocks and enable stacking, in which case it should be moved elsewhere
.wp-block-themeisle-blocks-pricing-table .editor-block-list__layout {
	margin-left: 0;
	margin-right: 0;

	// This max-width is used to constrain the main editor panel, it should not cascade into columns
	.editor-block-list__block {
		max-width: none;
	}
}

.wp-block-themeisle-blocks-pricing-table {
	display: block;
	position: relative;

	&.is-dim {
		&:before {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-color: rgba(0,0,0,.5);
		}

		.wp-block-column {
			z-index: 1;
		}
	}

	&.is-parallax {
		background-attachment: fixed !important;
	}

	> .editor-inner-blocks > .editor-block-list__layout {
		display: flex;

		> [data-type="themeisle-blocks/pricing-block"] {
			display: flex;
			flex-direction: column;
			flex: 1;
			width: 0;

			.editor-block-list__block-edit {
				margin-top: 12px;
				flex-basis: 100%;
			}
		}
	}

	.wp-block-column {
		&:first-child {
			margin-left: 0;
		}

		&:last-child {
			margin-right: 0;
		}

		position: relative;
		padding: 20px 10px;
		margin: 0 20px;
	}
  
	.raised {
		-webkit-box-shadow: 0 16px 38px -12px rgba(0,0,0,.56),0 4px 25px 0 rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2);
		-moz-box-shadow: 0 16px 38px -12px rgba(0,0,0,.56),0 4px 25px 0 rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2);
		box-shadow: 0 16px 38px -12px rgba(0,0,0,.56),0 4px 25px 0 rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2);
	}
}

[data-type="themeisle-blocks/pricing-table"] {
	&[data-align="full"] {
		.wp-block-themeisle-blocks-pricing-table {
			padding: 100px 150px;
		}
	}

	&[data-align="wide"] {
		.wp-block-themeisle-blocks-pricing-table {
			padding: 30px 50px;
		}
	}
}

@media ( max-width:768px ) {
	.wp-block-themeisle-blocks-pricing-table {
		display: block;

		> .editor-inner-blocks > .editor-block-list__layout {
			display: block;
	
			> [data-type="themeisle-blocks/pricing-block"] {
				display: flex;
				flex-direction: column;
				flex: 1;
				width: auto;
	
				.editor-block-list__block-edit {
					margin-top: 12px;
					flex-basis: 100%;
				}
			}
		}
	}
}

@media ( max-width:1024px ) {
	[data-type="themeisle-blocks/pricing-table"] {
		&[data-align="full"] {
			.wp-block-themeisle-blocks-pricing-table {
				padding: 100px 20px;
			}
		}

		&[data-align="wide"] {
			.wp-block-themeisle-blocks-pricing-table {
				padding: 30px 50px;
			}
		}
	}
}pricing-table/index.js000066600000000202151143561770010741 0ustar00/**
 * Pricing Table Block
 */
import './style.scss';
import './editor.scss';
import './pricing-table';
import './pricing-block';
pricing-table/pricing-table.js000066600000011376151143561770012370 0ustar00/**
 * External dependencies
 */
import classnames from 'classnames';

/**
 * WordPress dependencies
 */

const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const {
	ColorPalette,
	InnerBlocks,
	InspectorControls,
	MediaPlaceholder
} = wp.editor;

const {
	Button,
	ToggleControl,
	SelectControl,
	PanelBody
} = wp.components;

const { Fragment } = wp.element;

registerBlockType( 'themeisle-blocks/pricing-table', {
	title: __( 'Pricing Table' ),
	description: __( 'Pricing tables are a critical part in showcasing your services, prices and overall offerings.' ),
	icon: 'slides',
	category: 'themeisle-blocks',
	keywords: [
		'pricing',
		'table',
		'orbitfox'
	],
	attributes: {
		backgroundType: {
			type: 'string',
			default: 'color'
		},
		backgroundColor: {
			type: 'string',
			default: '#ffffff'
		},
		backgroundImageID: {
			type: 'string'
		},
		backgroundImageURL: {
			type: 'string'
		},
		backgroundDimmed: {
			type: 'boolean',
			default: true
		},
		backgroundParallax: {
			type: 'boolean',
			default: false
		}
	},

	supports: {
		align: [ 'wide', 'full' ],
		inserter: false
	},

	edit: props => {
		const ALLOWED_BLOCKS = [ 'themeisle-blocks/pricing-block' ];
		const ALLOWED_MEDIA_TYPES = [ 'image' ];
		const TEMPLATE = [ [ 'themeisle-blocks/pricing-block' ], [ 'themeisle-blocks/pricing-block' ], [ 'themeisle-blocks/pricing-block' ] ];
		const changeType = value => {
			props.setAttributes({ backgroundType: value });
		};
		const changeColor = value => {
			props.setAttributes({ backgroundColor: value });
		};
		const changeBackground = value => {
			props.setAttributes({
				backgroundImageID: value.id,
				backgroundImageURL: value.url
			});
		};
		const removeBackground = () => {
			props.setAttributes({
				backgroundImageID: '',
				backgroundImageURL: ''
			});
		};
		const toggleDimming = () => {
			props.setAttributes({ backgroundDimmed: ! props.attributes.backgroundDimmed });
		};
		const toggleParallax = () => {
			props.setAttributes({ backgroundParallax: ! props.attributes.backgroundParallax });
		};
		const style = {
			background: 'color' === props.attributes.backgroundType ? props.attributes.backgroundColor : `url(' ${ props.attributes.backgroundImageURL } ')`
		};
		return [
			<InspectorControls>
				<PanelBody
					title={ __( 'Background' ) }
				>
					<SelectControl
						label={ __( 'Background Type' ) }
						value={ props.attributes.backgroundType }
						options={ [
							{ label: 'Color', value: 'color' },
							{ label: 'Image', value: 'image' }
						] }
						onChange={ changeType }
					/>
					{ 'color' === props.attributes.backgroundType ?
						<ColorPalette
							label={ __( 'Background Color' ) }
							value={ props.attributes.backgroundColor }
							onChange={ changeColor }
						/>					:
						props.attributes.backgroundImageURL ?
							<Fragment>
								<ToggleControl
									label={ __( 'Dimmed Background' ) }
									checked={ props.attributes.backgroundDimmed }
									onChange={ toggleDimming }
								/>
								<ToggleControl
									label={ __( 'Parallax Background' ) }
									checked={ props.attributes.backgroundParallax }
									onChange={ toggleParallax }
								/>
								<img
									src={ props.attributes.backgroundImageURL }
								/>
								<Button
									isLarge
									onClick={ removeBackground }
									style={ { marginTop: '10px' } }
								>
									{ __( 'Change or Remove Image' ) }
								</Button>
							</Fragment>						:
							<MediaPlaceholder
								icon="format-image"
								labels={ {
									title: __( 'Background Image' ),
									name: __( 'an image' )
								} }
								value={ props.attributes.backgroundImageID }
								onSelect={ changeBackground }
								accept="image/*"
								allowedTypes={ ALLOWED_MEDIA_TYPES }
							/>
					}
				</PanelBody>
			</InspectorControls>,

			<div
				className={ classnames(
					props.className,
					{ 'is-dim': 'image' === props.attributes.backgroundType && props.attributes.backgroundDimmed },
					{ 'is-parallax': 'image' === props.attributes.backgroundType && props.attributes.backgroundParallax },
				) }
				style={ style }
			>
				<InnerBlocks
					allowedBlocks={ ALLOWED_BLOCKS }
					template={ TEMPLATE }
				/>
			</div>
		];
	},

	save: props => {
		const style = {
			background: 'color' === props.attributes.backgroundType ? props.attributes.backgroundColor : `url(' ${ props.attributes.backgroundImageURL } ')`
		};
		return (
			<div
				className={ classnames(
					'wp-block-themeisle-blocks-pricing-table',
					{ 'is-dim': 'image' === props.attributes.backgroundType && props.attributes.backgroundDimmed },
					{ 'is-parallax': 'image' === props.attributes.backgroundType && props.attributes.backgroundParallax },
				) }
				style={ style }
			>
				<InnerBlocks.Content/>
			</div>
		);
	}
});
testimonials/testimonials-area.js000066600000011425151143561770013257 0ustar00/**
 * External dependencies
 */
import classnames from 'classnames';

/**
 * WordPress dependencies
 */

const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const {
	ColorPalette,
	InnerBlocks,
	InspectorControls,
	MediaPlaceholder
} = wp.editor;

const {
	Button,
	ToggleControl,
	SelectControl,
	PanelBody
} = wp.components;

const { Fragment } = wp.element;

registerBlockType( 'themeisle-blocks/testimonials-area', {
	title: __( 'Testimonials Area' ),
	description: __( 'Display kudos from customers and clients and display them on your website.' ),
	icon: 'testimonial',
	category: 'themeisle-blocks',
	keywords: [
		'testimonials',
		'clients',
		'quotes'
	],
	attributes: {
		backgroundType: {
			type: 'string',
			default: 'color'
		},
		backgroundColor: {
			type: 'string',
			default: '#ffffff'
		},
		backgroundImageID: {
			type: 'string'
		},
		backgroundImageURL: {
			type: 'string'
		},
		backgroundDimmed: {
			type: 'boolean',
			default: true
		},
		backgroundParallax: {
			type: 'boolean',
			default: false
		}
	},

	supports: {
		align: [ 'wide', 'full' ],
		inserter: false
	},

	edit: props => {
		const ALLOWED_BLOCKS = [ 'themeisle-blocks/testimonials-block' ];
		const ALLOWED_MEDIA_TYPES = [ 'image' ];
		const TEMPLATE = [ [ 'themeisle-blocks/testimonials-block' ], [ 'themeisle-blocks/testimonials-block' ], [ 'themeisle-blocks/testimonials-block' ] ];
		const changeType = value => {
			props.setAttributes({ backgroundType: value });
		};
		const changeColor = value => {
			props.setAttributes({ backgroundColor: value });
		};
		const changeBackground = value => {
			props.setAttributes({
				backgroundImageID: value.id,
				backgroundImageURL: value.url
			});
		};
		const removeBackground = () => {
			props.setAttributes({
				backgroundImageID: '',
				backgroundImageURL: ''
			});
		};
		const toggleDimming = () => {
			props.setAttributes({ backgroundDimmed: ! props.attributes.backgroundDimmed });
		};
		const toggleParallax = () => {
			props.setAttributes({ backgroundParallax: ! props.attributes.backgroundParallax });
		};
		const style = {
			background: 'color' === props.attributes.backgroundType ? props.attributes.backgroundColor : `url(' ${ props.attributes.backgroundImageURL } ')`
		};
		return [
			<InspectorControls>
				<PanelBody
					title={ __( 'Background' ) }
				>
					<SelectControl
						label={ __( 'Background Type' ) }
						value={ props.attributes.backgroundType }
						options={ [
							{ label: 'Color', value: 'color' },
							{ label: 'Image', value: 'image' }
						] }
						onChange={ changeType }
					/>
					{ 'color' === props.attributes.backgroundType ?
						<ColorPalette
							label={ __( 'Background Color' ) }
							value={ props.attributes.backgroundColor }
							onChange={ changeColor }
						/>					:
						props.attributes.backgroundImageURL ?
							<Fragment>
								<ToggleControl
									label={ __( 'Dimmed Background' ) }
									checked={ props.attributes.backgroundDimmed }
									onChange={ toggleDimming }
								/>
								<ToggleControl
									label={ __( 'Parallax Background' ) }
									checked={ props.attributes.backgroundParallax }
									onChange={ toggleParallax }
								/>
								<img
									src={ props.attributes.backgroundImageURL }
								/>
								<Button
									isLarge
									onClick={ removeBackground }
									style={ { marginTop: '10px' } }
								>
									{ __( 'Change or Remove Image' ) }
								</Button>
							</Fragment>						:
							<MediaPlaceholder
								icon="format-image"
								labels={ {
									title: __( 'Background Image' ),
									name: __( 'an image' )
								} }
								value={ props.attributes.backgroundImageID }
								onSelect={ changeBackground }
								accept="image/*"
								allowedTypes={ ALLOWED_MEDIA_TYPES }
							/>
					}
				</PanelBody>
			</InspectorControls>,

			<div
				className={ classnames(
					props.className,
					{ 'is-dim': 'image' === props.attributes.backgroundType && props.attributes.backgroundDimmed },
					{ 'is-parallax': 'image' === props.attributes.backgroundType && props.attributes.backgroundParallax },
				) }
				style={ style }
			>
				<InnerBlocks
					allowedBlocks={ ALLOWED_BLOCKS }
					template={ TEMPLATE }
				/>
			</div>
		];
	},

	save: props => {
		const style = {
			background: 'color' === props.attributes.backgroundType ? props.attributes.backgroundColor : `url(' ${ props.attributes.backgroundImageURL } ')`
		};
		return (
			<div
				className={ classnames(
					'wp-block-themeisle-blocks-testimonials-area',
					{ 'is-dim': 'image' === props.attributes.backgroundType && props.attributes.backgroundDimmed },
					{ 'is-parallax': 'image' === props.attributes.backgroundType && props.attributes.backgroundParallax },
				) }
				style={ style }
			>
				<InnerBlocks.Content/>
			</div>
		);
	}
});
testimonials/editor.scss000066600000005723151143561770011467 0ustar00// These margins make sure that nested blocks stack/overlay with the parent block chrome
// This is sort of an experiment at making sure the editor looks as much like the end result as possible
// Potentially the rules here can apply to all nested blocks and enable stacking, in which case it should be moved elsewhere
.wp-block-themeisle-blocks-testimonials-area .editor-block-list__layout {
	margin-left: 0;
	margin-right: 0;

	// This max-width is used to constrain the main editor panel, it should not cascade into columns
	.editor-block-list__block {
		max-width: none;
	}
}

.wp-block-themeisle-blocks-testimonials-area {
	display: block;
	position: relative;

	&.is-dim {
		&:before {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-color: rgba(0,0,0,.5);
		}

		.wp-block-column {
			z-index: 1;
		}
	}

	&.is-parallax {
		background-attachment: fixed !important;
	}

	> .editor-inner-blocks > .editor-block-list__layout {
		display: flex;

		> [data-type="themeisle-blocks/testimonials-block"] {
			display: flex;
			flex-direction: column;
			flex: 1;
			width: 0;

			.editor-block-list__block-edit {
				margin-top: 12px;
				flex-basis: 100%;
			}
		}
	}

	.wp-block-column {
		&:first-child {
			margin-left: 0;
		}

		&:last-child {
			margin-right: 0;
		}

		position: relative;
		padding: 20px 10px;
		margin: 0 20px;

		.wp-block-image {
			margin: 0 auto;
			width: 100px;
			height: auto;

			img {
				width: 100px;
				border-radius: 100%;
				box-shadow: 0 10px 25px 0 rgba(0,0,0,.3);
			}
		}

		h3 {
			&.testimonials-title {
				margin: 20px 0 0 0 !important;
			}
		}

		.testimonials-content {
			&:before {
				content: open-quote;
			}

			&:after {
				content: close-quote;
			}
		}
	}

	> .editor-inner-blocks > .editor-block-list__layout {
		display: flex;

		> [data-type="themeisle-blocks/testimonials-block"] {
			display: flex;
			flex-direction: column;
			flex: 1;
			width: 0;

			.editor-block-list__block-edit {
				flex-basis: 100%;
			}
		}
	}
}

[data-type="themeisle-blocks/testimonials-area"] {
	&[data-align="full"] {
		.wp-block-themeisle-blocks-testimonials-area {
			padding: 100px 150px;
		}
	}

	&[data-align="wide"] {
		.wp-block-themeisle-blocks-testimonials-area {
			padding: 30px 50px;
		}
	}
}

@media ( max-width:768px ) {
	.wp-block-themeisle-blocks-testimonials-area {
		display: block;

		> .editor-inner-blocks > .editor-block-list__layout {
			display: block;
	
			> [data-type="themeisle-blocks/testimonials-block"] {
				display: flex;
				flex-direction: column;
				flex: 1;
				width: auto;
	
				.editor-block-list__block-edit {
					margin-top: 12px;
					flex-basis: 100%;
				}
			}
		}
	}
}

@media ( max-width:1024px ) {
	[data-type="themeisle-blocks/testimonials-area"] {
		&[data-align="full"] {
			.wp-block-themeisle-blocks-testimonials-area {
				padding: 100px 20px;
			}
		}

		&[data-align="wide"] {
			.wp-block-themeisle-blocks-testimonials-area {
				padding: 30px 50px;
			}
		}
	}
}testimonials/style.scss000066600000002577151143561770011345 0ustar00.wp-block-themeisle-blocks-testimonials-area {
	display: flex;
	position: relative;

	&.is-dim {
		&:before {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-color: rgba(0,0,0,.5);
		}

		.wp-block-column {
			z-index: 1;
		}
	}

	&.is-parallax {
		background-attachment: fixed !important;
	}

	&.alignfull {
		padding: 100px;
	}

	&.alignwide {
		padding: 100px 150px;
	}

	.wp-block-column {
		position: relative;
		flex: 1;
		padding: 20px 25px;
		margin: 0 20px;

		.wp-block-image {
			margin: 0 auto;
			width: 100px;
			height: auto;

			img {
				border-radius: 100%;
				box-shadow: 0 10px 25px 0 rgba(0,0,0,.3);
			}
		}

		h3 {
			&.testimonials-title {
				margin: 20px 0 0 0 !important;
			}
		}

		.testimonials-content {
			&:before {
				content: open-quote;
			}

			&:after {
				content: close-quote;
			}
		}
	}
}


@media ( min-width:768px ) {
	.wp-block-themeisle-blocks-testimonials-area {
		.wp-block-column {

			&:first-child {
				margin-left: 0;
			}
	
			&:last-child {
				margin-right: 0;
			}
		}
	}
}

@media ( max-width:768px ) {
	.wp-block-themeisle-blocks-testimonials-area {
		display: block;

		.wp-block-column {
			margin: 20px;
		}
	}
}

@media ( max-width:1024px ) {
	.wp-block-themeisle-blocks-testimonials-area {

		&.alignfull {
			padding: 100px 20px;
		}
	
		&.alignwide {
			padding: 100px 20px;
		}
	}
}testimonials/index.js000066600000000212151143561770010735 0ustar00/**
 * Testimonials Block
 */
import './style.scss';
import './editor.scss';
import './testimonials-area';
import './testimonials-block';
testimonials/testimonials-block.js000066600000004065151143561770013443 0ustar00/**
 * WordPress dependencies
 */

const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const {
	InnerBlocks,
	InspectorControls,
	PanelColorSettings
} = wp.editor;

/**
 * Internal dependencies
 */
registerBlockType( 'themeisle-blocks/testimonials-block', {
	title: __( 'Testimonials Block' ),
	description: __( 'Display kudos from customers and clients and display them on your website.' ),
	parent: [ 'themeisle-blocks/testimonials-area' ],
	icon: 'testimonial',
	category: 'themeisle-blocks',
	keywords: [
		'testimonials',
		'clients',
		'quotes'
	],
	attributes: {
		backgroundColor: {
			type: 'string',
			default: '#ffffff'
		}
	},

	supports: {
		inserter: false
	},

	edit: props => {
		const setBackgroundColor = value => {
			props.setAttributes({ backgroundColor: value });
		};
		const TEMPLATE =  [
			[ 'core/image', {
				align: 'center'
			} ],
			[ 'core/heading', {
				content: __( 'John Doe' ),
				className: 'testimonials-title',
				align: 'center',
				level: 3
			} ],
			[ 'core/heading', {
				content: __( 'Jedi Master' ),
				className: 'testimonials-subtitle',
				align: 'center',
				level: 6
			} ],
			[ 'core/paragraph', {
				content: __( 'What is the point of being alive if you don’t at least try to do something remarkable?' ),
				className: 'testimonials-content',
				align: 'center'
			} ]
		];

		return [
			<InspectorControls>
				<PanelColorSettings
					title={ __( 'Color Settings' ) }
					initialOpen={ true }
					colorSettings={ [
						{
							value: props.attributes.backgroundColor,
							onChange: setBackgroundColor,
							label: __( 'Background Color' )
						}
					] }
				>
				</PanelColorSettings>
			</InspectorControls>,

			<div
				className="wp-block-column"
				style={ {
					backgroundColor: props.attributes.backgroundColor
				}}
			>
				<InnerBlocks
					template={ TEMPLATE }
				/>
			</div>
		];
	},

	save: props => {
		return (
			<div
				className="wp-block-column"
				style={ {
					backgroundColor: props.attributes.backgroundColor
				}}
			>
				<InnerBlocks.Content/>
			</div>
		);
	}
});
index.js000066600000000400151143561770006221 0ustar00/**
 * Blocks to be deprecated.
 */
import './accordion-box/index.js';
import './chart/index.js';
import './notice/index.js';
import './pricing-table/index.js';
import './services/index.js';
import './testimonials/index.js';
import './tweetable/index.js';
admin/ryte/.htaccess000066600000000424151147510770010431 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>admin/.htaccess000066600000000424151147510770007446 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>admin/ajax/.htaccess000066600000000424151147510770010371 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>admin/endpoints/.htaccess000066600000000424151147510770011451 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>admin/links/.htaccess000066600000000424151147510770010566 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>admin/onpage/.htaccess000066600000000424151147510770010717 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>admin/taxonomy/.htaccess000066600000000424151147510770011324 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>admin/recalculate/.htaccess000066600000000424151147510770011732 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>admin/notifiers/.htaccess000066600000000424151147510770011450 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>admin/metabox/.htaccess000066600000000424151147510770011105 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>src/services/.htaccess000066600000000424151147510770010770 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>src/services/health-check/.htaccess000066600000000424151147510770013310 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>src/integrations/third-party/.htaccess000066600000000424151147510770014122 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>src/integrations/admin/.htaccess000066600000000424151147510770012743 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>src/integrations/.htaccess000066600000000424151147510770011653 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>src/conditionals/.htaccess000066600000000424151147510770011633 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>src/actions/indexing/.htaccess000066600000000424151147510770012412 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>src/actions/.htaccess000066600000000424151147510770010605 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>src/actions/configuration/.htaccess000066600000000424151147510770013454 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>src/actions/indexation/.htaccess000066600000000424151147510770012747 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>src/presenters/.htaccess000066600000000424151147510770011337 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>src/presenters/open-graph/.htaccess000066600000000424151147510770013377 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>src/presenters/admin/.htaccess000066600000000424151147510770012427 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>src/.htaccess000066600000000424151147510770007145 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>src/routes/.htaccess000066600000000424151147510770010466 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>inc/.htaccess000066600000000424151147510770007127 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>.htaccess000066600000000424151147510770006356 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>frontend/.htaccess000066600000000424151147510770010175 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>frontend/schema/.htaccess000066600000000424151147510770011435 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>