input(
array(
'type' => 'select',
'name' => "{$input->name}[link_type]",
'id' => "{$input->id}-link_type",
'options' => array(
'custom' => __( 'Custom', 'layerswp' ),
'post' => __( 'Existing Content', 'layerswp' ), // Page, Post, Custom Post Type
// 'post_type_archive' => __( 'Post Archives (incl. Custom Post Types)', 'layerswp' ),
// 'taxonomy_archive' => __( 'Taxonomy Archives (incl. Custom Taxonomies)', 'layerswp' ),
),
'value' => ( isset( $input->value->link_type ) ) ? $input->value->link_type : NULL,
'class' => 'layers-text',
'data' => array(
'tip' => __( 'Choose Link Type', 'layerswp' ),
),
)
); ?>
id}-link_type"; ?>" data-show-if-value="custom" data-tip="">
input(
array(
'type' => 'text',
'name' => "{$input->name}[link_type_custom]",
'id' => "{$input->id}-link_type_custom",
'placeholder' => __( 'http://' , 'layerswp' ),
'value' => ( isset( $input->value->link_type_custom ) ) ? $input->value->link_type_custom : NULL,
'class' => 'layers-text',
'data' => array(
'tip' => __( 'Link', 'layerswp' ),
),
)
); ?>
id}-link_type"; ?>" data-show-if-value="post" data-tip="">
value->link_type_post ) && '' !== $input->value->link_type_post ) ? $input->value->link_type_post : 0 ;
$initial_display = ( 0 !== $initial_post_id ) ? get_the_title( $initial_post_id ) . ' (' . get_post_type( $initial_post_id ) . ')' : '' ;
echo $this->input(
array(
'type' => 'hidden',
'name' => "{$input->name}[link_type_post]",
'id' => "{$input->id}-link_type_post",
'placeholder' => __( '-- Choose --' , 'layerswp' ),
'value' => ( isset( $input->value->link_type_post ) ) ? $input->value->link_type_post : NULL,
'class' => 'layers-text layers-widget-dynamic-linking-select',
'data' => array(
'display-text' => $initial_display,
),
)
);
?>
id}-link_type"; ?>" data-show-if-value="post_type_archive" data-tip="">
input(
array(
'type' => 'hidden',
'name' => "{$input->name}[link_type_post_type_archive]",
'id' => "{$input->id}-link_type_post_type_archive",
'placeholder' => __( 'http://' , 'layerswp' ),
'value' => ( isset( $input->value->link_type_post_type_archive ) ) ? $input->value->link_type_post_type_archive : NULL,
'class' => 'layers-text layers-widget-dynamic-linking-select',
)
); ?>
id}-link_type"; ?>" data-show-if-value="taxonomy_archive" data-tip="">
input(
array(
'type' => 'hidden',
'name' => "{$input->name}[link_type_taxonomy_archive]",
'id' => "{$input->id}-link_type_taxonomy_archive",
'placeholder' => __( 'http://' , 'layerswp' ),
'value' => ( isset( $input->value->link_type_taxonomy_archive ) ) ? $input->value->link_type_taxonomy_archive : NULL,
'class' => 'layers-text layers-widget-dynamic-linking-select',
)
); ?>
input(
array(
'type' => 'select-icons',
'name' => "{$input->name}[link_target]",
'id' => "{$input->id}-link_target",
'placeholder' => __( 'e.g. http://facebook.com/oboxthemes', 'layerswp' ),
'value' => ( isset( $input->value->link_target ) ) ? $input->value->link_target : NULL,
'options' => array(
'_blank' => array(
'name' => 'New Tab',
'class' => 'fa fa-share-square-o',
'data' => array(
'tip' => 'Open in New Tab',
),
),
)
) ); ?>
input(
array(
'type' => 'text',
'name' => "{$input->name}[link_text]",
'id' => "{$input->id}-link_text",
'placeholder' => __( 'e.g. "Read More"' , 'layerswp' ),
'value' => ( isset( $input->value->link_text ) ) ? $input->value->link_text : NULL,
)
); ?>