本文整理汇总了PHP中pagelines_register_hook函数的典型用法代码示例。如果您正苦于以下问题:PHP pagelines_register_hook函数的具体用法?PHP pagelines_register_hook怎么用?PHP pagelines_register_hook使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pagelines_register_hook函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: section_template
/**
* Section template.
*/
function section_template()
{
?>
<div class="notfound boomboard">
<?php
if (current_user_can('edit_posts') && isset($_GET['boxes']) || isset($_GET['feature']) || isset($_GET['banners'])) {
?>
<h2 class="notavail center"><?php
_e('Direct Previewing <em>of</em> "Special Post Types" Not Available... Yet', 'pagelines');
?>
</h2>
<p class="subhead center"><?php
_e('Sorry, direct previewing of special post types such as <strong>features</strong> or <strong>boxes</strong> is unavailable. This WordPress functionality is new and rapidly developing, so it should be available soon.', 'pagelines');
?>
</p>
<p class="subhead center">
<?php
_e('To preview a "custom post type" just view a page with that "section" on it.', 'pagelines');
?>
</p>
<?php
} else {
?>
<h2 class="hugetext center"><?php
_e('404!', 'pagelines');
?>
</h2>
<p class="subhead center"><?php
_e('Sorry, This Page Does not exist.', 'pagelines');
?>
<br/><?php
_e('Go', 'pagelines');
?>
<a href="<?php
echo home_url();
?>
"><?php
_e('home', 'pagelines');
?>
</a> <?php
_e('or try a search?', 'pagelines');
?>
</p>
<?php
}
?>
<div class="center fix"><?php
get_search_form();
?>
</div>
</div>
<?php
pagelines_register_hook('pagelines_not_found_actions');
// Hook
}
开发者ID:climo,项目名称:PageLines-Framework,代码行数:62,代码来源:section.php
示例2: section_template
function section_template() { ?>
<?php pagelines_register_hook( 'pagelines_section_before_postnav' ); // Hook ?>
<div class="post-nav fix">
<span class="previous"><?php previous_post_link('%link') ?></span>
<span class="next"><?php next_post_link('%link') ?></span>
</div>
<?php pagelines_register_hook( 'pagelines_section_after_postnav' ); // Hook ?>
<?php }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:8,代码来源:section.postnav.php
示例3: pagelines_head_common
/**
* PageLines <head> Includes
*
*/
function pagelines_head_common(){
pagelines_register_hook('pagelines_code_before_head'); // Hook
printf('<meta http-equiv="Content-Type" content="%s; charset=%s" />', get_bloginfo('html_type'), get_bloginfo('charset'));
pagelines_title_tag();
if(!VDEV)
echo "<!-- Platform WordPress Framework By PageLines - www.PageLines.com -->\n";
/*
Meta Images
*/
if(pagelines_option('pagelines_favicon'))
printf('<link rel="shortcut icon" href="%s" type="image/x-icon" />%s', pagelines_option('pagelines_favicon'), "\n");
if(pagelines_option('pagelines_touchicon'))
printf('<link rel="apple-touch-icon" href="%s" />%s', pagelines_option('pagelines_touchicon'), "\n");
if(!apply_filters( 'pagelines_xfn', '' ))
echo '<link rel="profile" href="http://gmpg.org/xfn/11" />'."\n";
// bbPress Header... doesn't support hooks, or they need to be reloaded.
if( pagelines_bbpress_forum() ){
pagelines_load_css( bb_get_stylesheet_uri(), 'pagelines-bbpress', CORE_VERSION);
bb_feed_head();
bb_head();
}
// Get Pro Styles
if(VPRO)
pagelines_load_css_relative('pro/pro.css', 'pagelines-pro');
// Get Main Styles
pagelines_load_css( get_bloginfo('stylesheet_url'), 'pagelines-stylesheet', pagelines_get_style_ver());
// RTL Language Support
if(is_rtl())
pagelines_load_css_relative( 'rtl.css', 'pagelines-rtl');
// Queue Common Javascript Libraries
wp_enqueue_script("jquery");
// Fix IE and special handling
pagelines_fix_ie();
// Cufon replacement
pagelines_font_replacement();
// Headerscripts option > custom code
print_pagelines_option('headerscripts'); // Header Scripts Input Option
}
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:59,代码来源:library.templates.php
示例4: pagelines_register_sections
/**
*
* Register HTML sections for use in the theme.
*
* @package Platform
* @subpackage Config
* @since 1.4.0
*
*/
function pagelines_register_sections(){
// Common WP
pagelines_register_section('PageLinesContent', 'wp', 'content');
pagelines_register_section('PageLinesPostLoop', 'wp', 'postloop');
pagelines_register_section('PageLinesPostNav', 'wp', 'postnav');
pagelines_register_section('PageLinesComments', 'wp', 'comments');
pagelines_register_section('PageLinesPagination', 'wp', 'pagination');
pagelines_register_section('PageLinesShareBar', 'wp', 'sharebar');
pagelines_register_section('PageLinesNoPosts', 'wp', 'noposts');
pagelines_register_section('PageLinesPostAuthor', 'wp', 'postauthor');
pagelines_register_section('PageLinesPostsInfo', 'wp', 'postsinfo');
// In Header
pagelines_register_section('PageLinesNav', 'nav');
pagelines_register_section('PageLinesSecondNav', 'secondnav');
pagelines_register_section('PageLinesBranding', 'wp', 'branding');
pagelines_register_section('BrandNav', 'brandnav', 'brandnav', array('deps'=>'PageLinesNav') );
pagelines_register_section('PageLinesBreadcrumb', 'breadcrumb');
// Sections With Custom Post Types
pagelines_register_section('PageLinesFeatures', 'features'); // 'features'
pagelines_register_section('PageLinesBoxes', 'boxes'); // 'boxes'
pagelines_register_section('PageLinesBanners', 'banners'); // 'boxes'
// Sidebar Sections & Widgets
pagelines_register_section('PrimarySidebar', 'sidebars', 'sb_primary');
pagelines_register_section('SecondarySidebar', 'sidebars', 'sb_secondary');
pagelines_register_section('TertiarySidebar', 'sidebars', 'sb_tertiary');
pagelines_register_section('UniversalSidebar', 'sidebars', 'sb_universal');
pagelines_register_section('FullWidthSidebar', 'sidebars', 'sb_fullwidth');
pagelines_register_section('ContentSidebar', 'sidebars', 'sb_content');
pagelines_register_section('PageLinesMorefoot', 'sidebars', 'morefoot');
pagelines_register_section('PageLinesFootCols', 'sidebars', 'footcols');
// Misc & Dependent Sections
pagelines_register_section('PageLinesSoapbox', 'soapbox');
pagelines_register_section('PageLinesCarousel', 'carousel');
pagelines_register_section('PageLinesHighlight', 'highlight');
pagelines_register_section('PageLinesTwitterBar', 'twitterbar');
pagelines_register_section('PageLinesSimpleFooterNav', 'footer_nav');
pagelines_register_section('PageLinesCallout','callout');
// Do a hook for registering sections
pagelines_register_hook('pagelines_register_sections'); // Hook
}
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:61,代码来源:config.templates.php
示例5: section_template
function section_template()
{
?>
<?php
if (pagelines('twittername')) {
?>
<div class="tbubble">
<?php
if (function_exists('twitter_messages') && pagelines('twittername')) {
?>
<span class="twitter">
<?php
pagelines_register_hook('pagelines_before_twitterbar_text', $this->id);
?>
"<?php
twitter_messages(pagelines('twittername'), 1, false, false, '', false, false, false);
?>
" — <a class="twitteraccount" href="http://www.twitter.com/<?php
echo pagelines('twittername');
?>
"><?php
echo pagelines('twittername');
?>
</a>
</span>
<?php
} else {
?>
<span class="twitter"><?php
_e('Please install and activate the "Twitter for WordPress" plugin to use this section.', 'pagelines');
?>
</span>
<?php
}
?>
</div>
<?php
} else {
?>
<div class="tbubble">
<?php
_e('Set your Twitter account name in your settings to use the TwitterBar Section.', 'pagelines');
?>
</div>
<?php
}
?>
<?php
}
开发者ID:rohans,项目名称:tradeinbooks,代码行数:49,代码来源:section.twitterbar.php
示例6: pl_load_registers
function pl_load_registers()
{
/**
* Load Singleton Globals
*/
$GLOBALS['pl_section_factory'] = new PageLinesSectionFactory();
/**
* Add Extension Handlers
*/
// require_once( PL_INCLUDES . '/class.register.php' );
global $editorsections;
$editorsections->register_sections();
pagelines_register_hook('pagelines_setup');
// Hook
$GLOBALS['render_css'] = new PageLinesRenderCSS();
if (pl_setting('enable_debug')) {
require_once PL_INCLUDES . '/class.debug.php';
}
}
开发者ID:zakikazmi,项目名称:TestGithub,代码行数:19,代码来源:lib.load.php
示例7: section_template
function section_template() {
pagelines_main_logo();
pagelines_register_hook( 'brandnav_after_brand', 'brandnav' ); // Hook
?>
<div class="inline-nav main_nav fix">
<?php
if(function_exists('wp_nav_menu')){
wp_nav_menu( array('menu_class' => 'main-nav'.pagelines_nav_classes(), 'container' => null, 'container_class' => '', 'depth' => 3, 'theme_location'=>'primary', 'fallback_cb'=>'pagelines_nav_fallback') );
}else{ pagelines_nav_fallback(); }
pagelines_register_hook( 'brandnav_after_nav', 'brandnav' ); // Hook
?>
</div>
<?php }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:19,代码来源:section.brandnav.php
示例8: section_template
function section_template()
{
pagelines_register_hook('pagelines_section_before_postnav');
// Hook
?>
<div class="post-nav fix">
<span class="previous"><?php
previous_post_link('%link', '<i class="icon icon-angle-left"></i> %title');
?>
</span>
<span class="next"><?php
next_post_link('%link', '%title <i class="icon icon-angle-right"></i>');
?>
</span>
</div>
<?php
pagelines_register_hook('pagelines_section_after_postnav');
// Hook
}
开发者ID:taeche,项目名称:SoDoEx,代码行数:19,代码来源:section.php
示例9: pagelines_register_hook
// Load the global meta settings tab
/**
* Build Version
*/
require_once PL_INCLUDES . '/version.php';
require_once PL_INCLUDES . '/class.render.css.php';
if (defined('WP_CLI') && WP_CLI) {
require_once PL_INCLUDES . '/cli.commands.php';
}
/**
* Load site actions
*/
require_once PL_INCLUDES . '/actions.site.php';
if (ploption('enable_debug')) {
require_once PL_ADMIN . '/class.debug.php';
}
/**
* Run the pagelines_init Hook
*/
pagelines_register_hook('pagelines_hook_init');
// Hook
if (is_admin()) {
include PL_ADMIN . '/init.admin.php';
}
/**
* Load updater class
*/
//require_once (PL_ADMIN.'/class.updates.php');
//
//if ( is_admin() )
// new PageLinesUpdateCheck( PL_CORE_VERSION );
开发者ID:aaemnnosttv,项目名称:pagelines,代码行数:31,代码来源:init.php
示例10: pagelines_register_sections
/**
* Scans THEMEDIR/sections recursively for section files and auto loads them.
* Child section folder also scanned if found and dependencies resolved.
*
* Section files MUST include a class header and optional depends header.
*
* Example section header:
*
* Section: BrandNav Section
* Author: PageLines
* Description: Branding and Nav Inline
* Version: 1.0.0
* Class Name: BrandNav
* Depends: PageLinesNav
*
* @since 2.0
*/
function pagelines_register_sections($reset = false, $echo = false)
{
global $pl_section_factory;
if ($reset) {
pl_purge_section_cache();
}
/**
* If cache exists load into $sections array
* If not populate array and prime cache
*/
if (!($sections = get_transient('pagelines_sections_cache'))) {
foreach (pl_get_section_dirs() as $type => $dir) {
$sections[$type] = $this->get_sections($dir, $type);
}
// check for deps within the main parent sections, load last if found.
foreach ($sections['parent'] as $key => $section) {
if (!empty($section['depends'])) {
unset($sections['parent'][$key]);
$sections['parent'][$key] = $section;
}
}
set_transient('pagelines_sections_cache', $sections, 86400);
}
if ($echo) {
return $sections;
}
// filter main array containing child, parent and any custom sections
$sections = apply_filters('pagelines_section_admin', $sections);
$disabled = pl_get_disabled_sections();
foreach ($sections as $tkey => $type) {
if (!is_array($type)) {
continue;
}
foreach ($type as $section) {
if (empty($section['loadme'])) {
$section['loadme'] = false;
}
if ('parent' == $section['type'] || !is_multisite()) {
$section['loadme'] = true;
}
/**
* Checks to see if we are a child section, if so disable the parent
* Also if a parent section and disabled, skip.
*/
if ('parent' != $section['type'] && isset($sections['parent'][$section['class']])) {
$disabled['parent'][$section['class']] = true;
}
if (isset($disabled[$section['type']][$section['class']]) && !$section['persistant']) {
continue;
}
// consolidate array vars
$dep = 'parent' != $section['type'] && $section['depends'] ? $section['depends'] : null;
$parent_dep = isset($sections['parent'][$section['depends']]) ? $sections['parent'][$section['depends']] : null;
$dep_data = array('base_dir' => isset($parent_dep['base_dir']) ? $parent_dep['base_dir'] : null, 'base_url' => isset($parent_dep['base_url']) ? $parent_dep['base_url'] : null, 'base_file' => isset($parent_dep['base_file']) ? $parent_dep['base_file'] : null, 'name' => isset($parent_dep['name']) ? $parent_dep['name'] : null);
$section_data = array('base_dir' => $section['base_dir'], 'base_url' => $section['base_url'], 'base_file' => $section['base_file'], 'name' => $section['name']);
// do we have a dependency?
if (isset($dep) && $section['loadme']) {
if (!class_exists($dep) && is_file($dep_data['base_file'])) {
include $dep_data['base_file'];
$pl_section_factory->register($dep, $dep_data);
}
// dep loaded...
if (!class_exists($section['class']) && class_exists($dep) && is_file($section['base_file'])) {
include $section['base_file'];
$pl_section_factory->register($section['class'], $section_data);
}
} else {
if (!class_exists($section['class']) && is_file($section['base_file']) && !isset($disabled['parent'][$section['depends']])) {
include $section['base_file'];
$pl_section_factory->register($section['class'], $section_data);
}
}
}
}
pagelines_register_hook('pagelines_register_sections');
// Hook
}
开发者ID:aaemnnosttv,项目名称:pagelines,代码行数:94,代码来源:class.register.php
示例11: pagelines_register_hook
"> <!-- #site // Wraps #header, #page-main, #footer - closed in footer -->
<?php
pagelines_register_hook('pagelines_before_page');
// Hook
?>
<div id="page"> <!-- #page // Wraps #header, #page-main - closed in footer -->
<div id="page-canvas">
<?php
pagelines_register_hook('pagelines_before_header');
?>
<div id="header" class="container-group fix">
<div class="outline">
<?php
pagelines_template_area('pagelines_header', 'header');
// Hook
?>
</div>
</div>
<?php
pagelines_register_hook('pagelines_before_main');
// Hook
?>
<div id="page-main" class="container-group fix"> <!-- #page-main // closed in footer -->
<div id="dynamic-content" class="outline fix">
<?php
if (pagelines_is_buddypress_page()) {
?>
<div id="buddypress-page" class="fix">
<div class="content fix">
<?php
}
开发者ID:TheTypoMaster,项目名称:akpsibruins,代码行数:31,代码来源:header.php
示例12: pagelines_build_option_interface
/**
*
* @TODO document
*
*/
function pagelines_build_option_interface()
{
pagelines_register_hook('pagelines_before_optionUI');
$args = array('sanitize' => 'pagelines_settings_callback');
$optionUI = new PageLinesOptionsUI($args);
}
开发者ID:aaemnnosttv,项目名称:pagelines,代码行数:11,代码来源:actions.options.php
示例13: pagelines_toolbox
function pagelines_toolbox()
{
?>
<div class="pl-toolbox-pusher"> </div>
<div id="PageLinesToolbox" class="pl-toolbox">
<div class="resizer-handle"></div>
<div class="toolbox-handle fix">
<ul class="unstyled controls">
<li class="el-closer" ><span class="btn-toolbox btn-closer" title="Close [esc]"><i class="icon icon-remove"></i></span></li>
<?php
foreach ($this->get_toolbar_config() as $key => $tab) {
if (!isset($tab['type'])) {
$tab['type'] = 'panel';
}
if ($tab['type'] == 'hidden' || $tab['type'] == 'dropup' && empty($tab['panel'])) {
continue;
}
if ($tab['type'] == 'output') {
echo $tab['output'];
continue;
}
$data = '';
$suffix = '';
$content = '';
$li_class = array();
$li_class[] = 'type-' . $tab['type'];
$li_class[] = 'el-' . $key;
if ($tab['type'] == 'dropup' && !empty($tab['panel'])) {
$data = 'data-toggle="dropdown"';
$suffix = ' <i class="uxi icon icon-caret-right"></i>';
$li_class[] = 'dropup';
$menu = '';
foreach ($tab['panel'] as $key => $i) {
$menu .= sprintf('<li><a href="#" class="btn-action" data-action="%s">%s</a></li>', $key, $i['name']);
}
$content = sprintf('<ul class="dropdown-menu">%s</ul>', $menu);
}
$li_classes = join(' ', $li_class);
$class = array();
$class[] = $tab['type'] == 'panel' ? 'btn-panel' : '';
$class[] = $tab['type'] == 'btn-panel' ? 'btn-panel' : '';
$class[] = $tab['type'] == 'btn' ? 'btn-action' : '';
$class[] = $tab['type'] == 'link' ? 'btn-link' : '';
$class[] = 'btn-' . $key;
$el_type = $tab['type'] == 'link' ? 'a' : 'span';
if ($tab['type'] == 'link') {
$data .= sprintf(' href="%s" target="_blank"', $tab['link']);
}
$classes = join(' ', $class);
$the_name = isset($tab['name']) && $tab['type'] != 'btn-panel' ? $tab['name'] : '';
$name = sprintf('<span class="txt">%s</span>', $the_name);
$icon = isset($tab['icon']) ? sprintf('<i class="uxi icon %s"></i> ', $tab['icon']) : '';
$tip = isset($tab['tip']) && $tab['tip'] != '' ? $tab['tip'] : $the_name;
$title = sprintf('title="%s"', $tip);
printf('<li class="%s"><%s class="btn-toolbox %s" data-action="%s" %s %s>%s%s%s</%s>%s</li>', $li_classes, $el_type, $classes, $key, $data, $title, $icon, $name, $suffix, $el_type, $content);
}
?>
</ul>
<ul class="unstyled controls send-right">
<li class="li-refresh type-btn"><span class="btn-toolbox btn-save btn-refresh" data-mode="pagerefresh" title="<?php
_e('Refresh needed to view changes.', 'pagelines');
?>
"><i class="icon icon-refresh"></i></li>
<li class="li-publish"><span class="btn-toolbox btn-save btn-publish" data-mode="publish" title="<?php
_e('Publish Live', 'pagelines');
?>
(alt+s)"><i class="icon icon-ok"></i> <span class="txt"><?php
_e('Publish', 'pagelines');
?>
</span></li>
</ul>
<ul class="unstyled controls not-btn send-right">
<li class="switch-btn btn-saving"><span class="btn-toolbox not-btn"><i class="icon icon-refresh icon-spin"></i> <span class="txt"><?php
_e('Saving', 'pagelines');
?>
</span></li>
<li class="switch-btn btn-layout-resize"><span class="btn-toolbox not-btn">
<i class="icon icon-fullscreen"></i> <span class="txt"><?php
_e('Width', 'pagelines');
?>
: <span class="resize-px"></span> / <span class="resize-percent"></span></span>
</li>
</ul>
</div>
<?php
pagelines_register_hook('before_toolbox_panel');
// Hook
?>
<div class="toolbox-panel-wrap">
<div class="toolbox-panel">
<div class="toolbox-content fix">
<div class="toolbox-content-pad option-panel">
<?php
foreach ($this->get_toolbar_config() as $key => $tab) {
//.........这里部分代码省略.........
开发者ID:benpeck,项目名称:experticity-fools,代码行数:101,代码来源:editor.interface.php
示例14: section_template
function section_template()
{
?>
<div id="feature_slider" class="fix">
<div id="feature-area">
<div id="cycle">
<?php
global $post;
global $pagelines_layout;
$current_page_post = $post;
$feature_posts = $this->get_feature_posts();
if (!empty($feature_posts) && is_array($feature_posts)) {
foreach ($feature_posts as $post) {
// Setup For Std WP functions
setup_postdata($post);
// Get Feature Style
if (get_post_meta($post->ID, 'feature-style', true)) {
$feature_style = get_post_meta($post->ID, 'feature-style', true);
} else {
$feature_style = 'text-left';
}
if (get_post_meta($post->ID, 'feature-link-text', true)) {
$flink_text = get_post_meta($post->ID, 'feature-link-text', true);
} else {
$flink_text = __('More', 'pagelines');
}
//Get the Thumbnail URL
$feature_background_image = get_post_meta($post->ID, 'feature-background-image', true);
$feature_design = get_post_meta($post->ID, 'feature-design', true) ? get_post_meta($post->ID, 'feature-design', true) : '';
?>
<div id="<?php
echo 'feature_' . $post->ID;
?>
" class="fcontainer <?php
echo $feature_style . ' ' . $feature_design;
?>
fix" >
<div class="feature-wrap wcontent" <?php
if ($feature_background_image) {
?>
style="background: url('<?php
echo $feature_background_image;
?>
') no-repeat top center" <?php
}
?>
>
<div class="feature-pad fix">
<?php
pagelines_register_hook('pagelines_feature_before', $this->id);
// Hook
?>
<div class="fcontent <?php
if (get_post_meta($post->ID, 'fcontent-bg', true)) {
echo get_post_meta($post->ID, 'fcontent-bg', true);
}
?>
">
<div class="dcol-pad fix">
<?php
pagelines_register_hook('pagelines_fcontent_before', $this->id);
?>
<div class="fheading">
<h2 class="ftitle"><?php
the_title();
?>
</h2>
</div>
<div class="ftext">
<?php
pagelines_register_hook('pagelines_feature_text_top', $this->id);
// Hook
?>
<div class="fexcerpt">
<?php
if (pagelines_option('feature_source') == 'posts') {
the_excerpt();
} else {
the_content();
}
?>
</div>
<?php
if (get_post_meta($post->ID, 'feature-link-url', true)) {
?>
<a class="flink" href="<?php
echo get_post_meta($post->ID, 'feature-link-url', true);
?>
"><span class="featurelink" ><?php
echo $flink_text;
?>
</span></a>
<?php
}
?>
<?php
pagelines_register_hook('pagelines_feature_text_bottom', $this->id);
// Hook
?>
//.........这里部分代码省略.........
开发者ID:rohans,项目名称:tradeinbooks,代码行数:101,代码来源:section.features.php
示例15: post_excerpt_markup
/**
* Get post excerpt and markup
*
* @since 2.0.0
*
* @return string the excerpt markup
*/
function post_excerpt_markup($mode = '', $thumbnail = '')
{
ob_start();
pagelines_register_hook('pagelines_loop_before_excerpt', 'theloop');
// Hook
if ($mode == 'left-excerpt' || $mode == 'right-excerpt') {
printf('<aside class="post-excerpt">%s %s</aside>', $thumbnail, get_the_excerpt());
} else {
printf('<aside class="post-excerpt">%s</aside>', get_the_excerpt());
}
if (pagelines_is_posts_page() && !$this->pagelines_show_content(get_the_ID())) {
// 'Continue Reading' link
echo $this->get_continue_reading_link(get_the_ID());
}
pagelines_register_hook('pagelines_loop_after_excerpt', 'theloop');
// Hook
$pagelines_excerpt = ob_get_clean();
return apply_filters('pagelines_excerpt', $pagelines_excerpt);
}
开发者ID:climo,项目名称:PageLines-Framework,代码行数:26,代码来源:class.posts.php
示例16: draw_features
/**
*
* @TODO document
*
*/
function draw_features($f, $class, $clone_id = null)
{
// Setup
global $post;
global $pagelines_ID;
global $pagelines_layout;
$current_page_post = $post;
if (empty($f)) {
echo setup_section_notify($this, __("No Feature posts matched this page's criteria", 'pagelines'));
return;
}
// Options
$feature_source = ploption('feature_source', $this->oset);
$timeout = ploption('timeout', $this->oset);
$playpause = ploption('feature_playpause', $this->oset);
$feature_nav_type = ploption('feature_nav_type', $this->oset);
// Refine
$no_nav = isset($f) && count($f) == 1 ? ' nonav' : '';
$footer_nav_class = $class . ' ' . $feature_nav_type . $no_nav;
$cycle_selector = "fclone" . $clone_id;
?>
<div id="feature_slider" class="<?php
echo $cycle_selector . '_wrap ' . $class;
?>
fix">
<div id="feature-area" class="fset_height">
<div id="cycle" class="<?php
echo $cycle_selector;
?>
">
<?php
foreach ($f as $post) {
// Setup For Std WP functions
setup_postdata($post);
$oset = array('post_id' => $post->ID);
$target = apply_filters('pagelines_features_target', '', $post);
$feature_style = ploption('feature-style', $oset) ? ploption('feature-style', $oset) : 'text-left';
$feature_style = apply_filters('pagelines-feature-style', $feature_style);
$flink_text = ploption('feature-link-text', $oset) ? __(ploption('feature-link-text', $oset)) : __('More', 'pagelines');
if ($feature_source == 'posts' || $feature_source == 'posts_all') {
$feature_background_image = '';
if (plmeta('feature-background-image', $oset)) {
$feature_background_image = plmeta('feature-background-image', $oset);
} elseif (has_post_thumbnail($post->ID)) {
$feature_background_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
$feature_background_image = $feature_background_image[0];
} else {
$feature_background_image = apply_filters('pagelines-feature-cat-default-image', $this->base_url . '/images/feature1.jpg', $post);
}
$background_class = 'bg_cover';
} else {
$feature_background_image = ploption('feature-background-image', $oset);
$background_class = 'bg_cover';
}
$feature_design = ploption('feature-design', $oset) ? ploption('feature-design', $oset) : '';
if ($feature_source == 'posts' || $feature_source == 'posts_all') {
setup_postdata($post);
}
if (plmeta('feature-link-url', $oset)) {
$action = plmeta('feature-link-url', $oset);
} elseif (ploption('feature-link-url', $oset)) {
$action = ploption('feature-link-url', $oset);
} elseif ($feature_source == 'posts' || $feature_source == 'posts_all') {
$action = get_permalink();
} else {
$action = '';
}
$fcontent_class = ploption('fcontent-bg', $oset) ? ploption('feature-bg', $oset) : '';
$media_image = ploption('feature-media-image', $oset);
$feature_media = ploption('feature-media', $oset);
$feature_media_full = ploption('feature-media-full', $oset);
$feature_wrap_markup = $feature_style == 'text-none' && $action ? 'a' : 'div';
$feature_wrap_link = $feature_style == 'text-none' && $action ? sprintf('href="%s"', $action) : '';
$more_link = $feature_style != 'text-none' && $action ? sprintf(' <a %s class="plmore" href="%s" >%s</a>', $target, $action, $flink_text) : '';
$background_css = $feature_background_image ? sprintf('style="background-image: url(\'%s\');"', $feature_background_image) : '';
printf('<div id="%s" class="fcontainer %s %s fix" >', 'feature_' . $post->ID, $feature_style, $feature_design);
printf('<%s class="feature-wrap fset_height %s" %s %s >', $feature_wrap_markup, $background_class, $feature_wrap_link, $background_css);
if ($feature_wrap_markup != 'a') {
if ($feature_media && $feature_media_full) {
echo $feature_media;
} else {
?>
<div class="feature-pad fset_height fix">
<div class="fcontent scale_text fset_height <?php
echo $fcontent_class;
?>
">
<div class="fcontent-pad fix">
<?php
pagelines_register_hook('pagelines_feature_text_top', $this->id);
// Hook
$link = $feature_source == 'posts' || $feature_source == 'posts_all' ? sprintf('<a %s href="%s">%s</a>', $target, $action, $post->post_title) : $post->post_title;
$title = sprintf('<div class="fheading"> <h2 class="ftitle">%s</h2> </div>', $link);
$content = $feature_source == 'posts' || $feature_source == 'posts_all' ? apply_filters('pagelines_feature_output', custom_trim_excerpt(get_the_excerpt(), '30')) : do_shortcode(get_the_content());
//.........这里部分代码省略.........
开发者ID:climo,项目名称:PageLines-Framework,代码行数:101,代码来源:section.php
示例17: section_template
function section_template($clone_id = null)
{
$carousel_class = isset($clone_id) && $clone_id != 1 ? 'crsl' . $clone_id : 'crsl';
// Set Up Variables
$carouselitems = ploption('carousel_items', $this->oset) ? ploption('carousel_items', $this->oset) : 30;
$carousel_post_id = ploption('carousel_post_id', $this->oset) ? ploption('carousel_post_id', $this->oset) : null;
$carousel_image_width = ploption('carousel_image_width', $this->oset) ? ploption('carousel_image_width', $this->oset) : 64;
$carousel_image_height = ploption('carousel_image_height', $this->oset) ? ploption('carousel_image_height', $this->oset) : 64;
$cmode = ploption('carousel_mode', $this->oset) ? ploption('carousel_mode', $this->oset) : null;
$ngen_id = ploption('carousel_ngen_gallery', $this->oset) ? ploption('carousel_ngen_gallery', $this->oset) : 1;
if ($cmode == 'flickr' && !function_exists('get_flickrRSS') || $cmode == 'ngen_gallery' && !function_exists('nggDisplayRandomImages')) {
echo setup_section_notify($this, __("The <strong>plugin</strong> for the selected carousel mode needs to be activated (FlickrRSS or NextGen Gallery).", 'pagelines'), admin_url() . 'plugins.php', 'Setup Plugin');
} else {
?>
<div class="<?php
echo $carousel_class;
?>
thecarousel">
<ul id="mycarousel" class="mycarousel">
<?php
if (function_exists('nggDisplayRandomImages') && $cmode == 'ngen_gallery') {
echo do_shortcode('[nggallery id=' . $ngen_id . ' template=plcarousel]');
} elseif (function_exists('get_flickrRSS') && $cmode == 'flickr') {
if (!function_exists('get_and_delete_option')) {
// fixes instantiation within the function in the plugin :/
get_flickrRSS(array('num_items' => $carouselitems, 'html' => '<li><a href="%flickr_page%" title="%title%"><img src="%image_square%" alt="%title%"/><span class="list-title">%title%</span></a></li>'));
}
} elseif ($cmode == 'hook') {
pagelines_register_hook('pagelines_carousel_list');
} else {
$carousel_post_query = 'numberposts=' . $carouselitems;
if ($carousel_post_id) {
$carousel_post_query .= '&category_name=' . $carousel_post_id;
}
$recentposts = get_posts($carousel_post_query);
foreach ($recentposts as $cid => $c) {
$a = array();
if (has_post_thumbnail($c->ID)) {
$img_data = wp_get_attachment_image_src(get_post_thumbnail_id($c->ID));
$a['img'] = $img_data[0] != '' ? $img_data[0] : $this->base_url . '/post-blank.jpg';
$a['width'] = $img_data[1];
$a['height'] = $img_data[2];
} else {
$a['img'] = $this->base_url . '/post-blank.jpg';
$a['width'] = 100;
$a['height'] = 100;
}
$args = array('title' => $c->post_title, 'link' => get_permalink($c->ID), 'img' => $a['img'], 'maxheight' => $carousel_image_height, 'maxwidth' => $carousel_image_width, 'height' => $a['height'], 'width' => $a['width']);
echo $this->carousel_item($args);
}
}
?>
</ul>
</div>
<?php
}
}
开发者ID:aaemnnosttv,项目名称:pagelines,代码行数:58,代码来源:section.php
示例18: after_section
function after_section($s)
{
$controls_foot = '';
// ( $s->level == 0 ) ? '' : $this->editor->section_controls_footer( $s );
pagelines_register_hook('pagelines_inside_bottom_' . $s->id, $s->id);
printf('</div>%s</section>', $controls_foot);
pagelines_register_hook('pagelines_after_' . $s->id, $s->id);
}
开发者ID:zakikazmi,项目名称:TestGithub,代码行数:8,代码来源:editor.handler.php
示例19: draw_boxes
function draw_boxes($b, $perline = 3, $class = "")
{
global $post;
global $pagelines_ID;
$box_thumb_type = pagelines_option('box_thumb_type', $pagelines_ID) ? pagelines_option('box_thumb_type', $pagelines_ID) : 'inline_thumbs';
$count = $perline;
?>
<div class="dcol_container_<?php
echo $perline;
?>
<?php
echo $class;
?>
fboxes fix">
<?php
foreach ($b as $bpost) {
setup_postdata($bpost);
|
请发表评论