class-gsc-settings.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Google_Search_Console
  6. */
  7. /**
  8. * Class WPSEO_GSC_Settings.
  9. *
  10. * @deprecated 12.5
  11. *
  12. * @codeCoverageIgnore
  13. */
  14. class WPSEO_GSC_Settings {
  15. /**
  16. * Clear all data from the database.
  17. *
  18. * @deprecated 12.5
  19. *
  20. * @codeCoverageIgnore
  21. *
  22. * @param WPSEO_GSC_Service $service Service class instance.
  23. */
  24. public static function clear_data( WPSEO_GSC_Service $service ) {
  25. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  26. }
  27. /**
  28. * Reloading all the issues.
  29. *
  30. * @deprecated 12.5
  31. *
  32. * @codeCoverageIgnore
  33. */
  34. public static function reload_issues() {
  35. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  36. }
  37. /**
  38. * When authorization is successful return true, otherwise false.
  39. *
  40. * @deprecated 12.5
  41. *
  42. * @codeCoverageIgnore
  43. *
  44. * @return bool
  45. */
  46. public static function validate_authorization() {
  47. _deprecated_function( __METHOD__, 'WPSEO 12.5' );
  48. return null;
  49. }
  50. /**
  51. * Get the GSC profile.
  52. *
  53. * @deprecated 12.5
  54. *
  55. * @codeCoverageIgnore
  56. *
  57. * @return string
  58. */
  59. public static function get_profile() {
  60. // Get option.
  61. $option = get_option( 'wpseo-gsc', array( 'profile' => '' ) );
  62. // Set the profile.
  63. $profile = '';
  64. if ( ! empty( $option['profile'] ) ) {
  65. $profile = $option['profile'];
  66. }
  67. // Return the profile.
  68. return trim( $profile, '/' );
  69. }
  70. }