Exemplo n.º 1
0
 /**
  * Apply all media types for custom grids that have not much settings
  * @since: 1.2.0
  */
 public function apply_all_media_types()
 {
     /**
      * Add settings that need to be set
      * - use all media sources, sorting does not matter since we only set one thing in each entry
      * - use all poster sources for videos, sorting does not matter since we only set one thing in each entry
      * - use all lightbox sources, sorting does not matter since we only set one thing in each entry
      */
     $media_orders = Essential_Grid_Base::get_media_source_order();
     foreach ($media_orders as $handle => $vals) {
         if ($handle == 'featured-image' || $handle == 'alternate-image') {
             continue;
         }
         $this->grid_postparams['media-source-order'][] = $handle;
     }
     $this->grid_postparams['media-source-order'][] = 'featured-image';
     //set this as the last entry
     $this->grid_postparams['media-source-order'][] = 'alternate-image';
     //set this as the last entry
     $poster_orders = Essential_Grid_Base::get_poster_source_order();
     foreach ($poster_orders as $handle => $vals) {
         $this->grid_params['poster-source-order'][] = $handle;
     }
     $lb_orders = Essential_Grid_Base::get_lb_source_order();
     foreach ($lb_orders as $handle => $vals) {
         $this->grid_params['lb-source-order'][] = $handle;
     }
 }
Exemplo n.º 2
0
    /**
     * Advanced Rules Dialog for Item Skin Editor
     * @since    1.5.0
     */
    public static function edit_advanced_rules_dialog()
    {
        $base = new Essential_Grid_Base();
        $types = $base->get_media_source_order();
        ?>
		<div id="advanced-rules-dialog-wrap" class="essential-dialog-wrap" title="<?php 
        _e('Advanced Rules', EG_TEXTDOMAIN);
        ?>
"  style="display: none; padding:20px !important;">
			<form id="ar-form-wrap">
				<div class="ad-rules-main"><?php 
        _e('Show/Hide if rules are true:', EG_TEXTDOMAIN);
        ?>
					<input class="ar-show-field" type="radio" value="show" name="ar-show" checked="checked" /> <?php 
        _e('Show', EG_TEXTDOMAIN);
        ?>
					<input class="ar-show-field" type="radio" value="hide" name="ar-show" /> <?php 
        _e('Hide', EG_TEXTDOMAIN);
        ?>
				</div>
				<?php 
        $num = 0;
        for ($i = 0; $i <= 2; $i++) {
            ?>
					<div class="ar-form-table-wrapper">
						<table>
							<tr style="text-align:center">
								<td style="width:150px;"><?php 
            _e('Type', EG_TEXTDOMAIN);
            ?>
</td>
								<td style="width:250px;"><?php 
            _e('Meta', EG_TEXTDOMAIN);
            ?>
</td>
								<td style="width:85px;"><?php 
            _e('Operator', EG_TEXTDOMAIN);
            ?>
</td>
								<td style="width:105px;"><?php 
            _e('Value', EG_TEXTDOMAIN);
            ?>
</td>
								<td style="width:105px;"><?php 
            _e('Value', EG_TEXTDOMAIN);
            ?>
</td>								
							</tr>
							<?php 
            for ($g = 0; $g <= 2; $g++) {
                ?>
								<tr>
									<td style="text-align:center">
										<select class="ar-type-field" id="ar-field-<?php 
                echo $num - 1;
                ?>
" name="ar-type[]" style="width: 150px;">
											<option value="off"><?php 
                _e('--- Choose ---', EG_TEXTDOMAIN);
                ?>
</option>
											<?php 
                if (!empty($types)) {
                    foreach ($types as $handle => $val) {
                        ?>
													<option value="<?php 
                        echo $handle;
                        ?>
"><?php 
                        echo $val['name'];
                        ?>
</option>
													<?php 
                    }
                }
                ?>
											<option value="meta"><?php 
                _e('Meta', EG_TEXTDOMAIN);
                ?>
</option>
										</select>
									</td>
									<td>
										<input class="ar-meta-field" style="width: 150px;" name="ar-meta[]" value="" disabled="disabled" /> <a class="button-secondary ar-open-meta" href="javascript:void(0);"><i class="eg-icon-down-open"></i></a>
									</td>
									<td style="text-align:center">
										<select class="ar-operator-field" name="ar-operator[]" style="width: 45px;">
											<option value="isset"><?php 
                _e('isset', EG_TEXTDOMAIN);
                ?>
</option>
											<option value="empty"><?php 
                _e('empty', EG_TEXTDOMAIN);
                ?>
</option>
											<option class="ar-opt-meta" value="lt"><</option>
											<option class="ar-opt-meta" value="gt">></option>
											<option class="ar-opt-meta" value="equal">==</option>
											<option class="ar-opt-meta" value="notequal">!=</option>
											<option class="ar-opt-meta" value="lte"><=</option>
											<option class="ar-opt-meta" value="gte">>=</option>
											<option class="ar-opt-meta" value="between"><?php 
                _e('between', EG_TEXTDOMAIN);
                ?>
</option>
										</select>
									</td>
									<td>
										<input class="ar-value-field" style="width: 100px;" name="ar-value[]" value="" />
									</td>
									<td>
										<input style="width: 100px;" name="ar-value-2[]" value="" disabled="disabled" />
									</td>
									
								</tr>
								<?php 
                if ($g !== 2) {
                    ?>
									<tr>
										<td colspan="5" style="text-align:center;">
											<select class="ar-logic-field" id="ar-field-<?php 
                    echo $num;
                    ?>
-logic" name="ar-logic[]">
												<option value="and"><?php 
                    _e('and', EG_TEXTDOMAIN);
                    ?>
</option>
												<option value="or"><?php 
                    _e('or', EG_TEXTDOMAIN);
                    ?>
</option>
											</select>
										</td>
									</tr>
									<?php 
                }
                $num++;
            }
            ?>
						</table>
					</div>
					<?php 
            if ($i !== 2) {
                ?>
						<div style="text-align:center;">
							<select  class="ar-logic-glob-field" name="ar-logic-glob[]">
								<option value="and"><?php 
                _e('and', EG_TEXTDOMAIN);
                ?>
</option>
								<option value="or"><?php 
                _e('or', EG_TEXTDOMAIN);
                ?>
</option>
							</select>
						</div>
						<?php 
            }
        }
        ?>
			</form>
		</div>
		<?php 
    }
Exemplo n.º 3
0
$nav_skin_choosen = $base->getVar($grid['params'], 'navigation-skin', 'minimal-light');
$navigation_skins = $nav_skin->get_essential_navigation_skins();
$navigation_skin_css = $base->jsonEncodeForClientSide($navigation_skins);
$entry_skins = Essential_Grid_Item_Skin::get_essential_item_skins();
$entry_skin_choosen = $base->getVar($grid['params'], 'entry-skin', '0');
$grid_animations = $base->get_grid_animations();
$hover_animations = $base->get_hover_animations();
$grid_animation_choosen = $base->getVar($grid['params'], 'grid-animation', 'fade');
$hover_animation_choosen = $base->getVar($grid['params'], 'hover-animation', 'fade');
if (intval($isCreate) > 0) {
    //currently editing, so default can be empty
    $media_source_order = $base->getVar($grid['postparams'], 'media-source-order', '');
} else {
    $media_source_order = $base->getVar($grid['postparams'], 'media-source-order', array('featured-image'));
}
$media_source_list = $base->get_media_source_order();
$custom_elements = $base->get_custom_elements_for_javascript();
$all_image_sizes = $base->get_all_image_sizes();
$meta_keys = $meta->get_all_meta_handle();
?>

<!--
LEFT SETTINGS
-->
<h2 class="topheader"><?php 
echo $title;
?>
</h2>
<div class="postbox eg-postbox" style="width:100%;min-width:500px"><h3><span><?php 
_e('Layout Composition', EG_TEXTDOMAIN);
?>