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


PHP op_tpl函数代码示例

本文整理汇总了PHP中op_tpl函数的典型用法代码示例。如果您正苦于以下问题:PHP op_tpl函数的具体用法?PHP op_tpl怎么用?PHP op_tpl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: page_template

    function page_template($post)
    {
        $id = 'op_page_tpl_';
        $cur_tpl = get_post_meta($post->ID, '_op_page_template', true);
        wp_nonce_field('op_page_template', 'op_page_template');
        if ($cur_tpl == '') {
            $cur_tpl = op_default_attr('column_layout', 'option');
        }
        $previews = array();
        foreach ($this->tpls as $name => $tpl) {
            $li_class = $input_attr = $image = '';
            $width = 152;
            $height = 115;
            if (is_array($tpl)) {
                extract($tpl);
            }
            if ($cur_tpl == $name) {
                $li_class = 'img-radio-selected';
                $input_attr = ' checked="checked"';
            }
            $preview = array('width' => $width, 'height' => $height, 'li_class' => $li_class, 'input' => '<input type="radio" id="op_page_tpl_file_' . $name . '" name="op_page_tpl_file" value="' . $name . '"' . $input_attr . ' />', 'image' => empty($image) ? OP_IMG . $name . '.jpg' : $image);
            $previews[] = $preview;
        }
        echo '
		<div id="op-meta-page-template">
			<h4>' . __('Page Template Options', OP_SN) . '</h4><p class="op-micro-copy">' . __('Select the template style for your page/post', OP_SN) . op_tpl('generic/img_radio_selector', array('previews' => $previews)) . '
		</div>';
    }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:28,代码来源:post_page.php

示例2: displayPage

 /**
  * Show support page with its sectinos
  *
  * Load "support/index" template
  * @return void
  */
 public function displayPage()
 {
     $tabs = $tabContent = array();
     foreach ($this->sections as $key => $section) {
         $tabs[$key] = array('title' => $section['title'], 'prefix' => '', 'li_class' => op_has_section_error($key) ? 'has-error' : '');
         $tabContent[$key] = op_tpl('support/step', array('section_type' => $key, 'sections' => $section['object']->sections()));
     }
     $data = array('tabs' => $tabs, 'tab_content' => $tabContent, 'module_name' => 'support', 'error' => $this->error, 'notification' => $this->notification);
     echo op_tpl('support/index', array('content' => op_tpl('generic/tabbed_module', $data)));
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:16,代码来源:support.php

示例3: install_screen

 function install_screen()
 {
     //If we can't get the API key we must inform the user
     if (false === op_sl_get_key()) {
         $this->error = __('API key missing or invalid', OP_SN);
     }
     //Set the data array for the template
     $data = array('error' => $this->error, 'notification' => $this->notification);
     //Load the template
     echo op_tpl('install/index', $data);
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:11,代码来源:install.php

示例4: dashboard

 function dashboard()
 {
     //Create an image
     $img = op_img('', true);
     //Init the tabs and content arrays
     $tabs = array();
     $tab_content = array();
     //Loop through each section
     foreach ($this->sections as $name => $section) {
         //Init tab info such as title of the tab
         $tabs[$name] = array('title' => $section['title'], 'prefix' => '');
         //Get tab content
         $tab_content[$name] = op_tpl('dashboard/step', array('section_type' => $name, 'sections' => $section['object']->sections()));
         //Set the li class if the section has an error
         $tabs[$name]['li_class'] = op_has_section_error($name) ? 'has-error' : '';
     }
     //Create the data array for use in template
     $data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'dashboard', 'error' => $this->error, 'notification' => $this->notification);
     //Echo out the template
     echo op_tpl('dashboard/index', array('content' => op_tpl('generic/tabbed_module', $data)));
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:21,代码来源:dashboard.php

示例5: op_tpl

<?php

global $post;
?>
<div id="op-le-editor-separator" class="cf"></div>
<div class="op-hidden"><?php 
echo $content_layouts_dialog . $presets_dialog . op_tpl('live_editor/row_select') . op_tpl('live_editor/row_options') . op_tpl('live_editor/advanced_element') . op_tpl('live_editor/split_column') . op_tpl('live_editor/membership') . op_tpl('live_editor/typography') . op_tpl('live_editor/settings') . op_tpl('live_editor/help') . op_tpl('live_editor/elements') . op_tpl('live_editor/colours') . op_tpl('live_editor/headers') . $GLOBALS['op_feature_area_dialogs'];
?>
</div>
<?php 
echo op_tpl('live_editor/epicbox');
?>
<!-- LiveEditor Header Toolbar-->
<div id="op-le-settings-toolbar" class="op-le-settings-toolbar--sidebar">
	<div id="op-le-settings-toolbar-container" class="op-le-settings-toolbar-container">
		<div class="container">
			<img src="<?php 
echo OP_IMG;
?>
logo-liveeditor.png" alt="LiveEditor" class="op-logo animated flipInY" />
			<div class="links"><ul>
				<li onmouseover="this.getElementsByTagName('img')[0].src='<?php 
echo OP_IMG;
?>
live_editor/le_layouts_icon.png'" onmouseout="this.getElementsByTagName('img')[0].src='<?php 
echo OP_IMG;
?>
live_editor/le_layouts_bg.png'" ><a href="#le-headers-dialog"><img src="<?php 
echo OP_IMG;
?>
live_editor/le_layouts_bg.png" alt="<?php 
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:index.php

示例6: op_load_section

function op_load_section($tpl, $data = array(), $type = 'blog')
{
    if (is_string($data) && $type == 'blog') {
        $type = $data;
        $data = array();
    }
    return op_tpl('sections/' . $type . '/' . $tpl, $data);
}
开发者ID:JalpMi,项目名称:v2contact,代码行数:8,代码来源:templates.php

示例7: step_4

 function step_4()
 {
     op_tpl_assign('nav_menus', wp_get_nav_menus());
     $img = op_img('', true);
     $tabs = array();
     $tab_content = array();
     if (is_array($this->sections) || is_object($this->sections)) {
         foreach ($this->sections as $name => $section) {
             $tabs[$name] = array('title' => $section['title']);
             $tab_content[$name] = op_tpl('page_builder/step', array('section_type' => $name, 'sections' => $name == 'functionality' ? $GLOBALS['functionality_sections'] : $section['object']->sections(), 'title' => $section['title'], 'description' => $section['description']));
             if (op_has_section_error($name)) {
                 $tabs[$name]['li_class'] = 'has-error';
             }
         }
     }
     $data = array('tabs' => $tabs, 'tab_content' => $tab_content, 'module_name' => 'page_builder', 'error' => $this->error, 'notification' => $this->notification);
     return op_tpl('page_builder/step4', array('content' => op_tpl('generic/tabbed_module', $data)));
 }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:18,代码来源:page_builder.php

示例8: load_content_layouts_preset_dialogs

 function load_content_layouts_preset_dialogs()
 {
     $data = array();
     $data['content_layouts'] = $this->load_content_layouts();
     $cats = $this->_get_content_layout_category_drop();
     $data['content_layout_category_count'] = $cats[0];
     $data['content_layout_category_select'] = '<select name="export_layout_category" id="export_layout_category">' . $cats[1] . '</select>';
     $presets = $this->_get_presets_drop();
     $data['preset_select'] = '<select name="preset_save" id="preset_save">' . $presets . '</select>';
     return array(op_tpl('live_editor/layouts', $data), op_tpl('live_editor/presets', $data));
 }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:11,代码来源:live_editor.php

示例9: menu_page_url

?>
</a></li>
            </ul>
        </div>

        <div class="op-info-box">
            <div class="op-hiddens" id="upload_new_layout_container">
                <iframe class="op-iframe-full" src="<?php 
menu_page_url(OP_SN . '-page-builder');
?>
&amp;section=content_upload&amp;info_box=yes" width="700" height="160"></iframe>
            </div>
        </div>

        <?php 
echo op_tpl('create_new_page/content_templates', $data);
?>

        <a class="op-back-to-top" id="op-js-back-to-top" href="#">Back to Top</a>

    </div> <!-- end .op-bsw-main-content -->

    <div class="op-bsw-grey-panel-fixed">
        <?php 
if (isset($content)) {
    echo $content;
}
?>
    </div>

</div>
开发者ID:kyscastellanos,项目名称:arepa,代码行数:31,代码来源:index.php

示例10: create_new_page_ajax

 function create_new_page_ajax()
 {
     $data = $this->get_content_templates_data();
     // Echo out the template
     echo op_tpl('create_new_page/content_templates', $data);
     die;
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:7,代码来源:create_new_page.php

示例11: _op_ajax_get_page_revisions

function _op_ajax_get_page_revisions()
{
    global $revisions_page_id;
    if ($_POST['page_id'] != '') {
        $revisions_page_id = $_POST['page_id'];
    }
    echo op_tpl('live_editor/revisions');
    exit;
}
开发者ID:JalpMi,项目名称:v2contact,代码行数:9,代码来源:admin.php

示例12: _e

</p>
                            <a href="#op-revisions-dialog" id="op-revisions-button" data-post_id="<?php 
    echo $post->ID;
    ?>
"><?php 
    _e('Launch Now', OP_SN);
    ?>
</a>
                        </div>
                    </li>
                </ul>
                <?php 
    global $post;
    global $revisions_page_id;
    $revisions_page_id = $post->ID;
    echo op_tpl('live_editor/revisions');
    ?>
            </div>
        </div>
    </div>
    <?php 
} else {
    ?>
    <div id="op-settings-container" class="meta-box-sortables" style="display:none">
        <div class="postbox" id="op-post-settings-tab">
            <h3 class="hndle"><span><?php 
    echo __('OptimizePress Settings', OP_SN);
    ?>
</span></h3>
            <div class="inside">
                <?php 
开发者ID:denis-chmel,项目名称:wordpress,代码行数:31,代码来源:index.php

示例13: _page_section

 function _page_section($type, $title, $data)
 {
     $content = op_tpl('generic/tabbed_module', $data);
     $data = array('content' => $content, 'title' => $title, 'page_type' => $type);
     return op_tpl('launch_suite/pages/section', $data);
 }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:6,代码来源:launch_suite.php

示例14: _e

    <div class="op-hidden" id="upload_new_layout_container">
        <a href="#load" id="view_layouts"><?php 
_e('View Uploaded Templates', 'optimizepress');
?>
</a>
        <div class="op-info-box">
            <iframe src="<?php 
menu_page_url(OP_SN . '-page-builder', true);
?>
&amp;section=content_upload&amp;info_box=yes" width="700" height="170"></iframe>
        </div>
    </div>
    <div id="content_layout_container">
        <a href="#upload" id="upload_new_layout"><?php 
_e('Upload Content Template', 'optimizepress');
?>
</a>
        <div id="content_layout_container_list">
        <?php 
if (isset($content_layouts)) {
    echo $content_layouts;
}
?>
        </div>
        <?php 
echo defined('OP_PAGEBUILDER_ID') ? op_tpl('live_editor/layouts/keep_options') : '';
?>
    </div>
</div>
<?php 
echo $this->load_tpl('page_builder/footer');
开发者ID:kyscastellanos,项目名称:arepa,代码行数:31,代码来源:step1.php

示例15: theme_tab

 function theme_tab()
 {
     if (($dirs = op_dir_list(OP_THEMES)) === false) {
         return op_show_error(__('No themes were found. Please check the themes directory is present and contains themes.', 'optimizepress'));
     }
     $themes = array();
     foreach ($dirs as $d) {
         if (($conf = op_load_theme_config($d)) !== false) {
             $themes[] = array('name' => $conf['name'], 'screenshot' => $conf['screenshot'], 'screenshot_thumbnail' => $conf['screenshot_thumbnail'], 'description' => $conf['description'], 'dir' => $d);
         }
     }
     usort($themes, 'op_sort_theme_array');
     return op_tpl('theme_settings/themes', array('themes' => $themes));
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:14,代码来源:theme_settings.php


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