khaihihi
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Ajax.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Ajax {
|
||||
|
||||
/**
|
||||
* Setting the AJAX hooks for GSC.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be access by an AJAX request and will mark an issue as fixed.
|
||||
*
|
||||
* First it will do a request to the Google API.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function ajax_mark_as_fixed() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AJAX request and dismiss the GSC notice.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function dismiss_notice() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the authorization code.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function save_auth_code() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all authorization data.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function clear_auth_code() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if posted nonce is valid and return true if it is.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function valid_nonce() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of the Google Search Console service.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return WPSEO_GSC_Service
|
||||
*/
|
||||
private function get_service() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a JSON encoded string with the current profile config.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private function get_profiles() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Bulk_Action.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Bulk_Action {
|
||||
|
||||
/**
|
||||
* Setting the listener on the bulk action post.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Category_Filters.
|
||||
*
|
||||
* This class will get all category counts from the options and will parse the filter links that are displayed above
|
||||
* the crawl issue tables.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Category_Filters {
|
||||
|
||||
/**
|
||||
* Constructing this object.
|
||||
*
|
||||
* Setting the hook to create the issues categories as the links.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param array $platform_counts Set of issue counts by platform.
|
||||
*/
|
||||
public function __construct( array $platform_counts ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the current category.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function get_category() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current filters as an array.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Only return categories with more than 0 issues.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function as_array() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Config.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Config {
|
||||
|
||||
/**
|
||||
* The Google search console configuration.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $gsc = [
|
||||
'application_name' => '',
|
||||
'client_id' => '',
|
||||
'client_secret' => '',
|
||||
'redirect_uri' => '',
|
||||
'scopes' => [],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Count.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Count {
|
||||
|
||||
/**
|
||||
* The name of the option containing the last checked timestamp.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const OPTION_CI_LAST_FETCH = 'wpseo_gsc_last_fetch';
|
||||
|
||||
/**
|
||||
* The option name where the issues counts are saved.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const OPTION_CI_COUNTS = 'wpseo_gsc_issues_counts';
|
||||
|
||||
/**
|
||||
* Fetching the counts
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WPSEO_GSC_Service $service Service class instance.
|
||||
*/
|
||||
public function __construct( WPSEO_GSC_Service $service ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the counts for given platform and return them as an array.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_platform_counts( $platform ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fetched issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_issues() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return $this->issues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Listing the issues an gives them back as fetched issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
* @param string $category Issue category.
|
||||
*/
|
||||
public function list_issues( $platform, $category ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the counts for given platform and category.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
* @param string $category Issue type.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function get_issue_count( $platform, $category ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the count of the issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
* @param string $category Issue type.
|
||||
* @param integer $new_count Updated count.
|
||||
*/
|
||||
public function update_issue_count( $platform, $category, $new_count ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetching the counts from the GSC API.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function fetch_counts() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Issue.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Issue {
|
||||
|
||||
/**
|
||||
* Search Console issue class constructor.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $url URL of the issue.
|
||||
* @param DateTime $first_detected Time of first discovery.
|
||||
* @param DateTime $last_crawled Time of last crawl.
|
||||
* @param string $response_code HTTP response code.
|
||||
*/
|
||||
public function __construct( $url, DateTime $first_detected, DateTime $last_crawled, $response_code ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Put the class properties in array.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function to_array() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Issues {
|
||||
|
||||
/**
|
||||
* Setting up the properties and fetching the current issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform type (desktop, mobile, feature phone).
|
||||
* @param string $category Issues category.
|
||||
* @param array|bool $fetched_issues Optional set of issues.
|
||||
*/
|
||||
public function __construct( $platform, $category, $fetched_issues = false ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the issues from the options.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_issues() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Deleting the issue from the issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $url URL to delete issues for.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete_issue( $url ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Mapper.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Mapper {
|
||||
|
||||
/**
|
||||
* If there is no platform, just get the first key out of the array and redirect to it.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function get_current_platform( $platform ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the platform.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function platform_to_api( $platform ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the given platform by value and return its key.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function platform_from_api( $platform ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the given category by searching for its key.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $category Issue type.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function category_to_api( $category ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the given category by value and return its key.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $category Issue type.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function category_from_api( $category ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return $category;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Marker.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Marker {
|
||||
|
||||
/**
|
||||
* Setting up the needed API libs and return the result.
|
||||
*
|
||||
* If param URL is given, the request is performed by a bulk action.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $url Optional URL.
|
||||
*/
|
||||
public function __construct( $url = '' ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the response for the AJAX request.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_response() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the Google Search Console modal.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Modal {
|
||||
|
||||
/**
|
||||
* Sets the required attributes for this object.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $view The file with the view content.
|
||||
* @param int $height The height that the modal will get.
|
||||
* @param array $view_vars The attributes to use in the view.
|
||||
*/
|
||||
public function __construct( $view, $height, array $view_vars = [] ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the modal.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return int The set height.
|
||||
*/
|
||||
public function get_height() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the view of the modal.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $unique_id An unique identifier for the modal.
|
||||
*/
|
||||
public function load_view( $unique_id ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Platform_Tabs.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Platform_Tabs {
|
||||
|
||||
/**
|
||||
* Return the tabs as a string.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the current_tab.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function current_tab() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Service.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Service {
|
||||
|
||||
/**
|
||||
* Search Console service constructor.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $profile Profile name.
|
||||
*/
|
||||
public function __construct( $profile = '' ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the client.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return Yoast_Api_Google_Client
|
||||
*/
|
||||
public function get_client() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the option and calls the clients clear_data method to clear that one as well.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function clear_data() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all sites that are registered in the GSC panel.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sites() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get crawl issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_crawl_issue_counts() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sending request to mark issue as fixed.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $url Issue URL.
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
* @param string $category Issue type.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function mark_as_fixed( $url, $platform, $category ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetching the issues from the GSC API.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
* @param string $category Issue type.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function fetch_category_issues( $platform, $category ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Settings.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Settings {
|
||||
|
||||
/**
|
||||
* Clear all data from the database.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param WPSEO_GSC_Service $service Service class instance.
|
||||
*/
|
||||
public static function clear_data( WPSEO_GSC_Service $service ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloading all the issues.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public static function reload_issues() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* When authorization is successful return true, otherwise false.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function validate_authorization() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the GSC profile.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_profile() {
|
||||
// Get option.
|
||||
$option = get_option( 'wpseo-gsc', [ 'profile' => '' ] );
|
||||
|
||||
// Set the profile.
|
||||
$profile = '';
|
||||
if ( ! empty( $option['profile'] ) ) {
|
||||
$profile = $option['profile'];
|
||||
}
|
||||
|
||||
// Return the profile.
|
||||
return trim( $profile, '/' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* WPSEO plugin file.
|
||||
*
|
||||
* @package WPSEO\Admin\Google_Search_Console
|
||||
*/
|
||||
|
||||
if ( ! class_exists( 'WP_List_Table' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Table.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class WPSEO_GSC_Table extends WP_List_Table {
|
||||
|
||||
/**
|
||||
* Modal height.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const FREE_MODAL_HEIGHT = 140;
|
||||
|
||||
/**
|
||||
* Search Console table class constructor (subclasses list table).
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $platform Platform (desktop, mobile, feature phone).
|
||||
* @param string $category Type of the issues.
|
||||
* @param array $items Set of the issues to display.
|
||||
*/
|
||||
public function __construct( $platform, $category, array $items ) {
|
||||
parent::__construct();
|
||||
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the screen id from this table.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_screen_id() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return $this->screen->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the table variables, fetch the items from the database, search, sort and format the items.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function prepare_items() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the table columns.
|
||||
*
|
||||
* @deprecated 12.5
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_columns() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 12.5' );
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user