Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
admin
/
config-ui
/
File Content:
class-configuration-service.php
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin\ConfigurationUI */ /** * Class WPSEO_Configuration_Service. */ class WPSEO_Configuration_Service { /** * Class holding the onboarding wizard configuration. * * @var WPSEO_Configuration_Structure */ protected $structure; /** * Class holding the onboarding wizard components. * * @var WPSEO_Configuration_Components */ protected $components; /** * Class handling the onboarding wizard persistence. * * @var WPSEO_Configuration_Storage */ protected $storage; /** * Class handling the onboarding wizard endpoint. * * @var WPSEO_Configuration_Endpoint */ protected $endpoint; /** * Adapter that converts onboarding wizard configuration to WordPress options. * * @var WPSEO_Configuration_Options_Adapter */ protected $adapter; /** * Class handling the onboarding wizard endpoint. * * @var WPSEO_Configuration_Translations */ protected $translations; /** * Hook into the REST API and switch language. */ public function initialize() { $this->set_default_providers(); $this->endpoint->register(); } /** * Set default handlers. */ public function set_default_providers() { $this->set_storage( new WPSEO_Configuration_Storage() ); $this->set_options_adapter( new WPSEO_Configuration_Options_Adapter() ); $this->set_components( new WPSEO_Configuration_Components() ); $this->set_endpoint( new WPSEO_Configuration_Endpoint() ); $this->set_structure( new WPSEO_Configuration_Structure() ); $this->set_translations( new WPSEO_Configuration_Translations( \get_user_locale() ) ); } /** * Set storage handler. * * @param WPSEO_Configuration_Storage $storage Storage handler to use. */ public function set_storage( WPSEO_Configuration_Storage $storage ) { $this->storage = $storage; } /** * Set endpoint handler. * * @param WPSEO_Configuration_Endpoint $endpoint Endpoint implementation to use. */ public function set_endpoint( WPSEO_Configuration_Endpoint $endpoint ) { $this->endpoint = $endpoint; $this->endpoint->set_service( $this ); } /** * Set the options adapter. * * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to use. */ public function set_options_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { $this->adapter = $adapter; } /** * Set components provider. * * @param WPSEO_Configuration_Components $components Component provider to use. */ public function set_components( WPSEO_Configuration_Components $components ) { $this->components = $components; } /** * Set structure provider. * * @param WPSEO_Configuration_Structure $structure Structure provider to use. */ public function set_structure( WPSEO_Configuration_Structure $structure ) { $this->structure = $structure; } /** * Sets the translations object. * * @param WPSEO_Configuration_Translations $translations The translations object. */ public function set_translations( WPSEO_Configuration_Translations $translations ) { $this->translations = $translations; } /** * Populate the configuration. */ protected function populate_configuration() { // Switch to the user locale with fallback to the site locale. switch_to_locale( \get_user_locale() ); // Make sure we have our translations available. wpseo_load_textdomain(); $this->structure->initialize(); $this->storage->set_adapter( $this->adapter ); $this->storage->add_default_fields(); $this->components->initialize(); $this->components->set_storage( $this->storage ); // @todo: check if this is really needed, since the switch happens only in the API. restore_current_locale(); } /** * Used by endpoint to retrieve configuration. * * @return array List of settings. */ public function get_configuration() { $this->populate_configuration(); $fields = $this->storage->retrieve(); $steps = $this->structure->retrieve(); $translations = $this->translations->retrieve(); return [ 'fields' => $fields, 'steps' => $steps, 'translations' => $translations, ]; } /** * Used by endpoint to store changes. * * @param WP_REST_Request $request Request from the REST API. * * @return array List of feedback per option if saving succeeded. */ public function set_configuration( WP_REST_Request $request ) { $this->populate_configuration(); return $this->storage->store( $request->get_json_params() ); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
components
---
0755
factories
---
0755
fields
---
0755
.DS_Store
10234 bytes
0644
20200616130143_ReplacePermalinkHashIndex.php
2293 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable-20260707002754.php
577 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
README.md
2555 bytes
0644
base.php
2793 bytes
0644
class-admin-utils.php
2147 bytes
0644
class-configuration-components.php
1593 bytes
0644
class-configuration-endpoint.php
2071 bytes
0644
class-configuration-options-adapter.php
5015 bytes
0644
class-configuration-page.php
7222 bytes
0644
class-configuration-service.php
4484 bytes
0644
class-configuration-storage.php
4635 bytes
0644
class-configuration-structure.php
3464 bytes
0644
class-configuration-translations.php
1263 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class.pack.database.php
30838 bytes
0644
class.u.json.php
4832 bytes
0644
ctrl.package.php
17073 bytes
0644
define.php
4567 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260624185532.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
157663 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
module.php
1297 bytes
0644
partial-notifications-errors.php
1139 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
request-methods-header.php
1127 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wp-seo-main.php
17504 bytes
0644
N4ST4R_ID | Naxtarrr