WPSEO_Import_WPSEO::import_taxonomy_description()
Imports the meta description to Yoast SEO.
Метод класса: WPSEO_Import_WPSEO{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->import_taxonomy_description( $tax_meta, $taxonomy, $term_id );
- $tax_meta(массив) (обязательный) (передается по ссылке — &)
- The array with the current metadata.
- $taxonomy(строка) (обязательный)
- String with the name of the taxonomy.
- $term_id(строка) (обязательный)
- The ID of the current term.
Код WPSEO_Import_WPSEO::import_taxonomy_description() WPSEO Import WPSEO::import taxonomy description Yoast 22.4
private function import_taxonomy_description( &$tax_meta, $taxonomy, $term_id ) { $description = get_option( 'wpseo_' . $taxonomy . '_' . $term_id, false ); if ( $description !== false ) { // Import description. $tax_meta[ $taxonomy ][ $term_id ]['wpseo_desc'] = $description; } }