Merged in feature/314-dev-dev01 (pull request #24)
auto-patch 314-dev-dev01-2024-01-25T04_09_02 * auto-patch 314-dev-dev01-2024-01-25T04_09_02
This commit is contained in:
@@ -85,11 +85,11 @@ class WPSEO_Tracking_Addon_Data implements WPSEO_Collection {
|
||||
* @return array
|
||||
*/
|
||||
public function get_addon_settings( array $addon_settings, $source_name, $slug, $option_include_list ) {
|
||||
$source_options = \get_option( $source_name, [] );
|
||||
if ( ! \is_array( $source_options ) || empty( $source_options ) ) {
|
||||
$source_options = get_option( $source_name, [] );
|
||||
if ( ! is_array( $source_options ) || empty( $source_options ) ) {
|
||||
return $addon_settings;
|
||||
}
|
||||
$addon_settings[ $slug ] = \array_intersect_key( $source_options, \array_flip( $option_include_list ) );
|
||||
$addon_settings[ $slug ] = array_intersect_key( $source_options, array_flip( $option_include_list ) );
|
||||
|
||||
return $addon_settings;
|
||||
}
|
||||
@@ -107,13 +107,13 @@ class WPSEO_Tracking_Addon_Data implements WPSEO_Collection {
|
||||
* @return array
|
||||
*/
|
||||
public function get_local_addon_settings( array $addon_settings, $source_name, $slug, $option_include_list ) {
|
||||
$source_options = \get_option( $source_name, [] );
|
||||
if ( ! \is_array( $source_options ) || empty( $source_options ) ) {
|
||||
$source_options = get_option( $source_name, [] );
|
||||
if ( ! is_array( $source_options ) || empty( $source_options ) ) {
|
||||
return $addon_settings;
|
||||
}
|
||||
$addon_settings[ $slug ] = \array_intersect_key( $source_options, \array_flip( $option_include_list ) );
|
||||
$addon_settings[ $slug ] = array_intersect_key( $source_options, array_flip( $option_include_list ) );
|
||||
|
||||
if ( \array_key_exists( 'use_multiple_locations', $source_options ) && \array_key_exists( 'business_type', $addon_settings[ $slug ] ) && $source_options['use_multiple_locations'] === 'on' && $source_options['multiple_locations_shared_business_info'] === 'off' ) {
|
||||
if ( array_key_exists( 'use_multiple_locations', $source_options ) && array_key_exists( 'business_type', $addon_settings[ $slug ] ) && $source_options['use_multiple_locations'] === 'on' && $source_options['multiple_locations_shared_business_info'] === 'off' ) {
|
||||
$addon_settings[ $slug ]['business_type'] = 'multiple_locations';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user