$clean[ $key ] = WPSEO_Utils::validate_bool( $old[ $key ] );
}
}
break;
}
}
return $clean;
}
/**
* Returns a list of lower cased taxonomies.
*
* @return array The found taxonomies.
*/
protected function get_taxonomies() {
$taxonomies = get_object_taxonomies( 'product', 'objects' );
if ( ! is_array( $taxonomies ) || empty( $taxonomies ) ) {
return [];
}
$processed_taxonomies = [];
foreach ( $taxonomies as $taxonomy ) {
$processed_taxonomies[] = strtolower( $taxonomy->name );
}
unset( $taxonomies );
return $processed_taxonomies;
}
/**
* Performs the upgrade of the option.
*/
private function upgrade() {
$option = get_option( $this->option_name );
if ( ! empty( $option['dbversion'] ) ) {
$option['woo_dbversion'] = $option['dbversion'];
}
// Check if the options need updating.
if ( $this->db_version <= $option['woo_dbversion'] ) {
return;
}
// Convert to the new prefixed option names.
if ( $this->db_version === 3 ) {
$fields_to_convert = [
'schema_brand' => 'woo_schema_brand',
'schema_manufacturer' => 'woo_schema_manufacturer',
'breadcrumbs' => 'woo_breadcrumbs',
'hide_columns' => 'woo_hide_columns',
'metabox_woo_top' => 'woo_metabox_top',
];
foreach ( $fields_to_convert as $current_field => $new_field ) {
if ( ! isset( $option[ $current_field ] ) ) {
continue;
}
$option[ $new_field ] = $option[ $current_field ];
}
update_option( $this->option_name, $option );
}
$this->clean();
}
}
}
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'WPSEO_Option_Woo' not found in /home/iranfpvi/public_html/wp-includes/class-wp-hook.php on line 308
حساب کاربری ندارید؟
ایجاد حساب کاربری