Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
actions
/
semrush
/
File Content:
semrush-phrases-action.php
<?php namespace Yoast\WP\SEO\Actions\SEMrush; use Exception; use Yoast\WP\SEO\Config\SEMrush_Client; /** * Class SEMrush_Phrases_Action */ class SEMrush_Phrases_Action { /** * The transient cache key. */ const TRANSIENT_CACHE_KEY = 'wpseo_semrush_related_keyphrases_%s_%s'; /** * The SEMrush keyphrase URL. * * @var string */ const KEYPHRASES_URL = 'https://oauth.semrush.com/api/v1/keywords/phrase_fullsearch'; /** * The SEMrush_Client instance. * * @var SEMrush_Client */ protected $client; /** * SEMrush_Phrases_Action constructor. * * @param SEMrush_Client $client The API client. */ public function __construct( SEMrush_Client $client ) { $this->client = $client; } /** * Gets the related keyphrases and data based on the passed keyphrase and database country code. * * @param string $keyphrase The keyphrase to search for. * @param string $database The database's country code. * * @return object The response object. */ public function get_related_keyphrases( $keyphrase, $database ) { try { $transient_key = \sprintf( static::TRANSIENT_CACHE_KEY, $keyphrase, $database ); $transient = \get_transient( $transient_key ); if ( $transient !== false ) { return $this->to_result_object( $transient ); } $options = [ 'params' => [ 'phrase' => $keyphrase, 'database' => $database, 'export_columns' => 'Ph,Nq,Td', 'display_limit' => 10, 'display_offset' => 0, 'display_sort' => 'nq_desc', 'display_filter' => '%2B|Nq|Lt|1000', ], ]; $results = $this->client->get( self::KEYPHRASES_URL, $options ); \set_transient( $transient_key, $results, \DAY_IN_SECONDS ); return $this->to_result_object( $results ); } catch ( Exception $e ) { return (object) [ 'error' => $e->getMessage(), 'status' => $e->getCode(), ]; } } /** * Converts the passed dataset to an object. * * @param array $result The result dataset to convert to an object. * * @return object The result object. */ protected function to_result_object( $result ) { return (object) [ 'results' => $result['data'], 'status' => $result['status'], ]; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
.DS_Store
10234 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
class-admin-utils-20260622095013.php
2147 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.pack.database.php
30838 bytes
0644
controller.php
2441 bytes
0644
deactivation.php
21118 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin-20260706233512.php
3331 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260705194237.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
exceptions.php
708 bytes
0644
image-helper.php
10231 bytes
0644
inc.validator.php
5401 bytes
0644
index.php
38 bytes
0644
loco.php
5626 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
module.php
1297 bytes
0644
quick-edit-handler-1650-20260707003632.js
1848 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
root.php
1951 bytes
0644
semrush-login-action.php
1243 bytes
0644
semrush-options-action.php
1120 bytes
0644
semrush-phrases-action.php
2219 bytes
0644
uninstall.php
4401 bytes
0644
wordpress-seo-es_ES-20260705061119.json
25583 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-es_CR.json
14212 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wp-query-wrapper.php
834 bytes
0644
N4ST4R_ID | Naxtarrr