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
// default styles for taxonomy summary page | |
$taxonomy_styles['summary-page'] = '#col-left { display: none; }#col-right { float:none; width: auto; }'; | |
// for create and edit custom taxonomy page | |
$taxonomy_styles['action-page'] = '#col-right { display: none; }#col-left { float:none; width: auto; }'; | |
$current_page = 'summary-page'; | |
$custom_taxonomy_page = false; | |
global $current_screen; | |
if (isset($current_screen) && (isset($current_screen->post_type) && $current_screen->post_type == CUSTOM_POST_TYPE)) { |
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
$option = change_key($args,'id','name'); | |
function change_key($array, $old_key, $new_key) | |
{ | |
if (!array_key_exists($old_key, $array)) { | |
return $array; | |
} | |
$keys = array_keys($array); | |
$keys[array_search($old_key, $keys)] = $new_key; |
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
$args = splice_associative_array($args, $index, $content); | |
if (!function_exists('splice_associative_array')) { | |
function splice_associative_array($original_data, $position, $replacement_array) | |
{ | |
/** | |
* Appending the $replacement_array array in $original_data array, set the $position ad -1. | |
* Add the $replacement_array array in top of the $original_data array, then set the $position as 0. | |
* | |
*/ |