Skip to content

Instantly share code, notes, and snippets.

@matbrady
matbrady / wp-get-taxonomy-hierarchy.php
Created May 11, 2020 16:07 — forked from daggerhart/wp-get-taxonomy-hierarchy.php
WordPress function to get a complete taxonomy hierarchy of terms in PHP
<?php
/**
* Recursively get taxonomy and its children
*
* @param string $taxonomy
* @param int $parent - parent term id
* @return array
*/
function get_taxonomy_hierarchy( $taxonomy, $parent = 0 ) {
@matbrady
matbrady / Remove all git tags
Created September 17, 2019 14:09 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d