';
echo '';
// For field with additional options / sub-fields, we add a wrapper to enclose field descriptions
if ( array_key_exists( 'field_options_wrapper', $args ) && $args['field_options_wrapper'] ) {
// For when the options / sub-fields occupy lengthy vertical space, we add show all / less toggler
if ( array_key_exists( 'field_options_moreless', $args ) && $args['field_options_moreless'] ) {
echo '
';
// For field with additional options / sub-fields, we add wrapper for them
if ( array_key_exists( 'field_options_wrapper', $args ) && $args['field_options_wrapper'] ) {
echo '';
}
// For field with additional options / sub-fields, we add a wrapper to enclose field descriptions
if ( array_key_exists( 'field_options_wrapper', $args ) && $args['field_options_wrapper'] ) {
echo '
';
}
/**
* Render sortable menu field
*
* @since 2.0.0
*/
function render_sortable_menu( $args ) {
?>
Drag and drop menu items to the desired position. Optionally change item titles or hide some items until "Show All" at the bottom of the admin menu is clicked.
strip_html_tags_and_content( $menu_info[0] ) );
} else {
// Get defaul/custom menu item title
foreach ( $custom_menu_titles as $custom_menu_title ) {
// At this point, $custom_menu_title value looks like toplevel_page_snippets__Code Snippets
$custom_menu_title = explode( '__', $custom_menu_title );
if ( $custom_menu_title[0] == $menu_item_id ) {
$menu_item_title = $common_methods->strip_html_tags_and_content( $custom_menu_title[1] ); // e.g. Code Snippets
break; // stop foreach loop so $menu_item_title is not overwritten in the next iteration
} else {
$menu_item_title = $common_methods->strip_html_tags_and_content( $menu_info[0] );
}
}
?>