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


PHP Essential_Grid_Base::set_basic_colums_height方法代码示例

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


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

示例1: add_start_height_css

    /**
     * Adds start height CSS for the Grid, to prevent jumping of Site on loading
     * @since 2.0.4
     */
    public function add_start_height_css($grid_id_wrap)
    {
        $base = new Essential_Grid_Base();
        $columns_advanced = $base->getVar($this->grid_params, 'columns-advanced', 'off');
        if ($columns_advanced == 'on') {
            $columns_width = $base->getVar($this->grid_params, 'columns-width', '');
            $columns_height = $base->getVar($this->grid_params, 'columns-height', '');
            $columns_width = $base->set_basic_colums_height($columns_width);
            $columns_height = $base->set_basic_colums_height($columns_height);
            $col_height = array_reverse($columns_height);
            //reverse to start with lowest value
            $col_width = array_reverse($columns_width);
            //reverse to start with lowest value
            $first = true;
            $css = '<style type="text/css">';
            foreach ($col_height as $key => $height) {
                if ($height > 0) {
                    $height = intval($height);
                    $mw = intval($col_width[$key] - 1);
                    if ($first) {
                        //first set up without restriction of width
                        $first = false;
                        $css .= '
#' . $grid_id_wrap . '.eg-startheight{ height: ' . $height . 'px; }';
                    } else {
                        $css .= '
@media only screen and (min-width: ' . $mw . 'px) {
	#' . $grid_id_wrap . '.eg-startheight{ height: ' . $height . 'px; }
}';
                    }
                }
            }
            $css .= '</style>';
            echo $css . "\n";
            if ($css !== '<style type="text/css"></style>') {
                return true;
            }
        }
        return false;
    }
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:44,代码来源:essential-grid.class.php

示例2: explode

    }
}
$postTypesWithCats = $base->getPostTypesWithCatsForClient();
$jsonTaxWithCats = $base->jsonEncodeForClientSide($postTypesWithCats);
$base = new Essential_Grid_Base();
$pages = get_pages(array('sort_column' => 'post_name'));
$post_elements = $base->getPostTypesAssoc();
$postTypes = $base->getVar($grid['postparams'], 'post_category', 'post');
$categories = $base->setCategoryByPostTypes($postTypes, $postTypesWithCats);
$selected_pages = explode(',', $base->getVar($grid['postparams'], 'selected_pages', '-1', 's'));
$columns = $base->getVar($grid['params'], 'columns', '');
$columns = $base->set_basic_colums($columns);
$columns_width = $base->getVar($grid['params'], 'columns-width', '');
$columns_width = $base->set_basic_colums_width($columns_width);
$columns_height = $base->getVar($grid['params'], 'columns-height', '');
$columns_height = $base->set_basic_colums_height($columns_height);
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-0', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-1', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-2', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-3', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-4', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-5', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-6', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-7', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-8', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-9', '');
$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');
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:31,代码来源:grid-create.php


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