' . __('No blog modules yet? What about ', 'quadro') . $link . __('adding one right now?', 'quadro') . '
';
}
// Ofer link to create Modules if it matches the requested post type
if ( $items == 0 && !isset($field['mod_type']) && $field['post_type'] == 'quadro_mods' ){
$link = '';
echo '
', 'quadro') . '';
}
// Ofer link to create Slides if it matches the requested post type
if ( $items == 0 && $field['post_type'] == 'quadro_slide' ){
$link = '';
echo '
', 'quadro') . '';
}
// Prepare UL for jQuery to add selected items,
// and query the items again based on previously
// selected and saved in $meta
echo '
';
// Little home for the list to be saved in
echo '';
break;
case 'authors_picker' :
// First query, bring all of them
$select_query = get_users( array( 'fields' => array( 'display_name', 'ID' ), 'who' => 'authors' ) );
// List them
if( !empty($select_query) ) {
echo '';
echo '' . __('Add to list', 'quadro') . '';
}
// Prepare UL for jQuery to add selected items,
// and query the items again based on previously
// selected and saved in $meta
echo '
';
// Little home for the list to be saved in
echo '';
break;
case 'pattern_picker':
$quadro_patterns = quadro_get_background_patterns();
echo '' . __( 'Select pattern', 'quadro' ) . '';
echo '
';
break;
case 'tax_picker' :
// First, bring all of them
$terms = get_terms( $field['tax_slug'], array( 'hide_empty' => 0 ) );
// List them
if ( count($terms) > 0 ) :
echo '';
echo '' . __('Add categories to list', 'quadro') . '';
endif;
// Prepare UL for jQuery to add selected items,
// and query the items again based on previously
// selected and saved in $meta
echo '
';
// Little home for the list to be saved in
echo '';
break;
case 'tax_picker_permanent' :
// First, bring all of them
$terms = get_terms( $field['tax_slug'], array( 'hide_empty' => 0 ) );
// List them
if ( count($terms) > 0 ) :
echo '';
echo '' . __('Add categories to list', 'quadro') . '';
endif;
// Prepare UL for jQuery to add selected items,
// and query the items again based on previously
// selected and saved in $meta
echo '
';
// Little home for the list to be saved in
echo '';
break;
case 'format_picker' :
// First, define all of them
$post_formats = array( 'standard' => 'Standard', 'aside' => 'Aside', 'status' => 'Status', 'gallery' => 'Gallery', 'image' => 'Image', 'audio' => 'Audio', 'video' => 'Video', 'quote' => 'Quote', 'link' => 'Link' );
// Then, list them
echo '';
echo '' . __('Add formats to list', 'quadro') . '';
// Prepare UL for jQuery to add selected items,
// and query the items again based on previously
// selected and saved in $meta
echo '
';
break;
case 'data-fields-picker':
// First, bring all of them
$data_fields = $quadro_options['portfolio_fields'];
// List them
if ( count($data_fields) > 0 ) :
echo '';
echo '' . __('Add fields to list', 'quadro') . '';
endif;
// Prepare UL for jQuery to add selected items,
// and query the items again based on previously
// selected and saved in $meta
echo '
';
// Little home for the list to be saved in
echo '';
break;
case 'sidebar_picker':
$quadro_sidebars = $quadro_options['quadro_sidebars'];
echo '';
break;
case 'repeatable':
echo '
'.$field['desc'].'
';
echo '
';
// Make it behave as an array even if it's not
if ( !is_array($meta) ) $meta[0] = array();
$i = 0;
foreach ( $meta as $row ) {
echo '