PATH:
home
/
letacommog
/
letacommunication
/
wp-content
/
plugins
/
google-site-kit
/
includes
/
Core
/
Util
<?php /** * Trait Google\Site_Kit\Core\Util\Migrate_Legacy_Keys * * @package Google\Site_Kit\Core\Util * @copyright 2021 Google LLC * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * @link https://sitekit.withgoogle.com */ namespace Google\Site_Kit\Core\Util; /** * Trait for a class that migrates array keys from old to new. * * @since 1.2.0 * @access private * @ignore */ trait Migrate_Legacy_Keys { /** * Migrates legacy array keys to the current key. * * @since 1.2.0 * * @param array $array Input associative array to migrate keys for. * @param array $key_mapping Map of legacy key to current key. * @return array Updated array. */ protected function migrate_legacy_keys( array $array, array $key_mapping ) { foreach ( $key_mapping as $legacy_key => $current_key ) { if ( ! isset( $array[ $current_key ] ) && isset( $array[ $legacy_key ] ) ) { $array[ $current_key ] = $array[ $legacy_key ]; } unset( $array[ $legacy_key ] ); } return $array; } }
[+]
..
[-] Google_URL_Matcher_Trait.php
[edit]
[-] Developer_Plugin_Installer.php
[edit]
[-] Migration_1_8_1.php
[edit]
[-] Feature_Flags.php
[edit]
[-] Build_Mode.php
[edit]
[-] Activation_Flag.php
[edit]
[-] Exit_Handler.php
[edit]
[-] User_Input_Settings.php
[edit]
[-] BC_Functions.php
[edit]
[-] JSON_File.php
[edit]
[-] Debug_Data.php
[edit]
[-] Migrate_Legacy_Keys.php
[edit]
[-] Activation_Notice.php
[edit]
[-] Input.php
[edit]
[-] Health_Checks.php
[edit]
[-] Google_Icon.php
[edit]
[-] Tracking.php
[edit]
[-] Reset.php
[edit]
[-] Scopes.php
[edit]
[-] Tracking_Consent.php
[edit]
[-] WP_Context_Switcher_Trait.php
[edit]
[-] Reset_Persistent.php
[edit]
[-] Migration_1_3_0.php
[edit]
[-] Requires_Javascript_Trait.php
[edit]
[-] Entity_Factory.php
[edit]
[-] WP_Query_Factory.php
[edit]
[-] Method_Proxy_Trait.php
[edit]
[-] Synthetic_WP_Query.php
[edit]
[-] Uninstallation.php
[edit]
[-] Google_URL_Normalizer.php
[edit]
[-] Entity.php
[edit]