Last active
May 5, 2017 04:10
-
-
Save enqtran/18415f04d15f46313f2f5a3af04e6d37 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* Show column name kana | |
*/ | |
if ( ! function_exists( 'kana_cpt_columns' ) ) { | |
function kana_cpt_columns( $columns ) { | |
if ( !isset($_GET['taxonomy']) || $_GET['taxonomy'] != 'category' ) | |
return $columns; | |
$columns["namekana"] = "Name Kana"; | |
return $columns; | |
} | |
add_filter('manage_edit-category_columns', 'kana_cpt_columns'); | |
} | |
function manage_category_custom_fields($deprecated,$column_name,$term_id) { | |
if ($column_name == 'namekana') { | |
echo 'test'; | |
} | |
} | |
add_action('manage_category_custom_column','manage_category_custom_fields',10,3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment