function genesis_import_child_theme_settings() { $settings_saved = false; $config = genesis_get_config( 'child-theme-settings' ); if ( ! $config ) { return false; } // Validate all settings keys are strings. $all_keys = array_keys( $config ); $string_keys = array_filter( $all_keys, 'is_string' ); if ( count( $string_keys ) === 0 || count( $all_keys ) !== count( $string_keys ) ) { return false; } foreach ( $config as $key => $value ) { $settings_saved = is_array( $value ) ? genesis_update_settings( $value, $key ) : update_option( $key, $value ); } return $settings_saved; }