Created
January 16, 2019 14:58
-
-
Save jtsternberg/f03addf336660ee80dbb3f238e41f5c6 to your computer and use it in GitHub Desktop.
Add additional languages to code-snippet-cpt plugin
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 | |
add_action( 'admin_init', function() { | |
$exists = get_term_by( 'slug', 'xpp', $taxonomy ); | |
if ( empty( $exists ) ) { | |
$result = wp_insert_term( 'X++', 'languages', array( 'slug' => 'xpp' ) ); | |
wp_die( '<xmp>'. __LINE__ .') $result: '. print_r( $result, true ) .'</xmp>', 'Debug' ); | |
} | |
wp_die( '<xmp>'. __LINE__ .') $exists: '. print_r( $exists, true ) .'</xmp>', 'Debug' ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment