??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/koilplta.co.uk/wp-content/plugins/wordpress-seo/src/helpers/wincher-helper.php
⬅ Kembali
<?php
namespace Yoast\WP\SEO\Helpers;
use WPSEO_Shortlinker;
use Yoast\WP\SEO\Conditionals\Non_Multisite_Conditional;
use Yoast\WP\SEO\Config\Wincher_Client;
use Yoast\WP\SEO\Exceptions\OAuth\Authentication_Failed_Exception;
use Yoast\WP\SEO\Exceptions\OAuth\Tokens\Empty_Property_Exception;
use Yoast\WP\SEO\Exceptions\OAuth\Tokens\Empty_Token_Exception;
/**
* A helper object for Wincher matters.
*/
class Wincher_Helper {
/**
* Holds the Options Page helper instance.
*
* @var Options_Helper
*/
protected $options;
/**
* Options_Helper constructor.
*
* @param Options_Helper $options The options helper.
*/
public function __construct( Options_Helper $options ) {
$this->options = $options;
}
/**
* Checks if the integration should be active for the current user.
*
* @return bool Whether the integration is active.
*/
public function is_active() {
$conditional = new Non_Multisite_Conditional();
if ( ! $conditional->is_met() ) {
return false;
}
if ( ! \current_user_can( 'publish_posts' ) && ! \current_user_can( 'publish_pages' ) ) {
return false;
}
return (bool) $this->options->get( 'wincher_integration_active', true );
}
/**
* Checks if the user is logged in to Wincher.
*
* @return bool The Wincher login status.
*/
public function login_status() {
try {
$wincher = \YoastSEO()->classes->get( Wincher_Client::class );
} catch ( Empty_Property_Exception $e ) {
// Return false if token is malformed (empty property).
return false;
}
// Get token (and refresh it if it's expired).
try {
$wincher->get_tokens();
} catch ( Authentication_Failed_Exception $e ) {
return false;
} catch ( Empty_Token_Exception $e ) {
return false;
}
return $wincher->has_valid_tokens();
}
/**
* Returns the Wincher links that can be used to localize the global admin
* script. Mainly exists to avoid duplicating these links in multiple places
* around the code base.
*
* @return string[]
*/
public function get_admin_global_links() {
return [
'links.wincher.login' => 'https://app.wincher.com/login?utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast',
'links.wincher.about' => WPSEO_Shortlinker::get( 'https://yoa.st/dashboard-about-wincher' ),
'links.wincher.pricing' => WPSEO_Shortlinker::get( 'https://yoa.st/wincher-popup-pricing' ),
'links.wincher.website' => WPSEO_Shortlinker::get( 'https://yoa.st/wincher-popup' ),
'links.wincher.upgrade' => WPSEO_Shortlinker::get( 'https://yoa.st/wincher-upgrade' ),
];
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 open-graph
dir
—
2026-06-24 10:05
📁 schema
dir
—
2026-06-24 10:05
📁 twitter
dir
—
2026-06-24 10:05
🐘 aioseo-helper.php
php
1.2 KB
2025-04-07 13:46
🐘 asset-helper.php
php
2.5 KB
2024-03-05 17:08
🐘 attachment-cleanup-helper.php
php
2.2 KB
2023-02-07 14:53
🐘 author-archive-helper.php
php
5.2 KB
2025-04-07 13:46
🐘 blocks-helper.php
php
2.3 KB
2022-11-29 19:15
🐘 capability-helper.php
php
2.1 KB
2020-09-01 16:27
🐘 crawl-cleanup-helper.php
php
8.1 KB
2026-02-17 17:17
🐘 curl-helper.php
php
655 B
2022-09-01 10:45
🐘 current-page-helper.php
php
15.6 KB
2026-02-17 17:17
🐘 date-helper.php
php
3.1 KB
2021-12-21 15:29
🐘 environment-helper.php
php
793 B
2022-11-29 19:15
🐘 first-time-configuration-notice-helper.php
php
5.4 KB
2025-12-02 18:31
🐘 home-url-helper.php
php
681 B
2026-02-17 17:17
🐘 image-helper.php
php
11.7 KB
2024-09-24 13:30
🐘 import-cursor-helper.php
php
1.4 KB
2025-04-07 13:46
🐘 import-helper.php
php
716 B
2022-04-05 17:50
🐘 indexable-helper.php
php
9.2 KB
2025-10-08 18:12
🐘 indexable-to-postmeta-helper.php
php
6.8 KB
2025-04-07 13:46
🐘 indexing-helper.php
php
12.7 KB
2026-02-17 17:17
🐘 language-helper.php
php
2.7 KB
2023-01-10 17:05
🐘 lock-helper.php
php
2.8 KB
2026-05-12 16:03
🐘 meta-helper.php
php
2.9 KB
2022-01-25 15:16
🐘 notification-helper.php
php
2 KB
2026-02-17 17:17
🐘 options-helper.php
php
4.6 KB
2026-01-07 16:32
🐘 pagination-helper.php
php
5.7 KB
2025-04-07 13:46
🐘 permalink-helper.php
php
1.6 KB
2026-02-04 19:42
🐘 post-helper.php
php
5.4 KB
2025-04-07 13:46
🐘 post-type-helper.php
php
7.2 KB
2026-02-17 17:17
🐘 primary-term-helper.php
php
1.4 KB
2024-01-19 15:31
🐘 product-helper.php
php
1.1 KB
2023-08-08 16:52
🐘 redirect-helper.php
php
1.7 KB
2026-02-17 17:17
🐘 require-file-helper.php
php
326 B
2025-04-07 13:46
🐘 robots-helper.php
php
1.7 KB
2025-04-07 13:46
🐘 robots-txt-helper.php
php
3.4 KB
2026-04-14 14:10
🐘 route-helper.php
php
694 B
2025-12-02 18:31
🐘 sanitization-helper.php
php
1 KB
2022-01-25 15:16
🐘 score-icon-helper.php
php
2.8 KB
2023-05-09 13:01
🐘 short-link-helper.php
php
3.5 KB
2025-04-07 13:46
🐘 site-helper.php
php
566 B
2021-03-22 17:43
🐘 social-profiles-helper.php
php
10.7 KB
2026-02-17 17:17
🐘 string-helper.php
php
1.2 KB
2022-01-25 15:16
🐘 taxonomy-helper.php
php
5 KB
2023-01-24 15:07
🐘 url-helper.php
php
8.1 KB
2026-02-17 17:17
🐘 user-helper.php
php
3.9 KB
2024-12-03 16:05
🐘 wincher-helper.php
php
2.5 KB
2023-06-13 14:02
🐘 woocommerce-helper.php
php
1.3 KB
2026-02-17 17:17
🐘 wordpress-helper.php
php
512 B
2021-07-07 18:45
🐘 wpdb-helper.php
php
937 B
2025-04-07 13:46