当前位置: 首页>>代码示例>>PHP>>正文


PHP Essential_Grid_Base::get_media_source_order方法代码示例

本文整理汇总了PHP中Essential_Grid_Base::get_media_source_order方法的典型用法代码示例。如果您正苦于以下问题:PHP Essential_Grid_Base::get_media_source_order方法的具体用法?PHP Essential_Grid_Base::get_media_source_order怎么用?PHP Essential_Grid_Base::get_media_source_order使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Essential_Grid_Base的用法示例。


在下文中一共展示了Essential_Grid_Base::get_media_source_order方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: apply_all_media_types

 /**
  * 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;
     }
 }
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:32,代码来源:essential-grid.class.php

示例2: edit_advanced_rules_dialog

    /**
     * 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>
//.........这里部分代码省略.........
开发者ID:Lumbe,项目名称:dev_servus,代码行数:101,代码来源:dialogs.class.php

示例3: array

$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);
?>
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:31,代码来源:grid-create.php


注:本文中的Essential_Grid_Base::get_media_source_order方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。