Пример #1
0
function msp_get_slider_starter_field($field_id)
{
    $fields_in_sections = msp_get_slider_starter_fields();
    foreach ($fields_in_sections as $fields_in_section) {
        foreach ($fields_in_section as $the_field) {
            if (isset($the_field['id']) && $the_field['id'] == $field_id) {
                return $the_field;
            }
        }
    }
    return null;
}
Пример #2
0
}
?>


<?php 
if (current_user_can('create_masterslider')) {
    ?>

	<div id="msp-slider-type-select" >

	    <div class="msp-templates-list">

	    	<?php 
    sanitize_title('');
    $starter_sections = msp_get_slider_starter_sections();
    $starter_fields = msp_get_slider_starter_fields();
    foreach ($starter_sections as $starter_section) {
        ?>
		    	<div class="msp-dialog-inner-title ui-helper-clearfix">
		    		<span><?php 
        echo $starter_section['title'];
        ?>
</span>
		    	</div>
		    	<?php 
        $section_id = $starter_section['id'];
        $section_fields = isset($starter_fields[$section_id]) ? $starter_fields[$starter_section['id']] : array();
        foreach ($section_fields as $starter_data) {
            $selected_attr = 'true' == $starter_data['selected'] ? 'selected' : '';
            $is_unavailable = isset($starter_data['disable']) && 'true' == $starter_data['disable'] ? ' is-unavailable' : '';
            $disabled_msg = isset($starter_data['disabled_msg']) && !empty($starter_data['disabled_msg']) ? $starter_data['disabled_msg'] : '';