Created
June 12, 2013 13:03
-
-
Save diije/5765046 to your computer and use it in GitHub Desktop.
WordPress : supprimer totalement les tags.
Détails et explications : http://www.diije.fr/wordpress-supprimer-tags/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* suppression de la metabox des tags et des formats sur la page d'ajout/edition de posts */ | |
function dfr_remove_tags_metabox() { | |
remove_meta_box('tagsdiv-post_tag', 'post', 'side'); | |
} | |
add_action('admin_menu', 'dfr_remove_tags_metabox'); | |
/* suppression de la colonne "Mots-clefs" sur la liste des articles */ | |
function dfr_remove_tags_column($defaults) { | |
unset($defaults['tags']); | |
return $defaults; | |
} | |
add_filter( 'manage_posts_columns', 'dfr_remove_tags_column'); | |
/* suppression du menu "Mots-clefs" */ | |
function dfr_remove_tags_menu() { | |
global $submenu; | |
unset($submenu['edit.php'][16]); | |
} | |
add_action('admin_head', 'dfr_remove_tags_menu'); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE a,b,c | |
FROM prefix_terms AS a | |
LEFT JOIN prefix_term_taxonomy AS c ON a.term_id = c.term_id | |
LEFT JOIN prefix_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id | |
WHERE c.taxonomy = 'post_tag' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment