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


PHP apply_atomic函数代码示例

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


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

示例1: miss_get_sidebar

 /**
  *
  */
 function miss_get_sidebar()
 {
     wp_reset_query();
     global $wp_query;
     if (is_404()) {
         return;
     }
     $sidebar = true;
     if (is_singular()) {
         $type = get_post_type();
         $post_obj = $wp_query->get_queried_object();
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         if ($_layout == 'full_width') {
             $sidebar = false;
         }
         if ($type == 'portfolio' && empty($_layout)) {
             $sidebar = false;
         }
         if ($template == 'templates/template-wiki.php') {
             $sidebar = false;
         }
         if (strpos($post_obj->post_content, '[portfolio') !== false && empty($_layout)) {
             $sidebar = false;
         }
     }
     if (is_front_page() && !is_active_sidebar('home')) {
         $sidebar = false;
     }
     $sidebar = apply_atomic('get_sidebar', $sidebar);
     if ($sidebar == true) {
         get_sidebar();
     }
 }
开发者ID:schiz,项目名称:scrollax,代码行数:37,代码来源:sidebars.php

示例2: hybrid_get_content_template

/**
 * Loads a post content template based off the post type and/or the post format.  This functionality is 
 * not feasible with the WordPress get_template_part() function, so we have to rely on some custom logic 
 * and locate_template().
 *
 * Note that using this function assumes that you're creating a content template to handle attachments. 
 * This filter must be removed since we're bypassing the WP template hierarchy and focusing on templates 
 * specific to the content.
 *
 * @since  1.6.0
 * @access public
 * @return string
 */
function hybrid_get_content_template()
{
    /* Set up an empty array and get the post type. */
    $templates = array();
    $post_type = get_post_type();
    /* Assume the theme developer is creating an attachment template. */
    if ('attachment' == $post_type) {
        remove_filter('the_content', 'prepend_attachment');
    }
    /* If the post type supports 'post-formats', get the template based on the format. */
    if (post_type_supports($post_type, 'post-formats')) {
        /* Get the post format. */
        $post_format = get_post_format() ? get_post_format() : 'standard';
        /* Template based off post type and post format. */
        $templates[] = "content-{$post_type}-{$post_format}.php";
        /* Template based off the post format. */
        $templates[] = "content-{$post_format}.php";
    }
    /* Template based off the post type. */
    $templates[] = "content-{$post_type}.php";
    /* Fallback 'content.php' template. */
    $templates[] = 'content.php';
    /* Apply filters and return the found content template. */
    include apply_atomic('content_template', locate_template($templates, false, false));
}
开发者ID:RA2WP,项目名称:RA2WP,代码行数:38,代码来源:template.php

示例3: hybrid_list_comments_args

/**
 * Arguments for the wp_list_comments_function() used in comments.php. Users can set up a 
 * custom comments callback function by changing $callback to the custom function.  Note that 
 * $style should remain 'ol' since this is hardcoded into the theme and is the semantically correct
 * element to use for listing comments.
 *
 * @since 0.7.0
 * @access public
 * @return array $args Arguments for listing comments.
 */
function hybrid_list_comments_args()
{
    /* Set the default arguments for listing comments. */
    $args = array('style' => 'ol', 'type' => 'all', 'avatar_size' => 80, 'callback' => 'hybrid_comments_callback', 'end-callback' => 'hybrid_comments_end_callback');
    /* Return the arguments and allow devs to overwrite them. */
    return apply_atomic('list_comments_args', $args);
}
开发者ID:nukulb,项目名称:bugsbounty-blog,代码行数:17,代码来源:comments.php

示例4: shandora_search_title_field

/**
 * Used to output title field in search panel
 * 
 * @since 1.2
 * @return string
 * @param string $value
 *
 */
function shandora_search_title_field($value = array(), $class, $is_widget = false)
{
    $o = apply_atomic('search_title_field', '', $value, $class, $is_widget);
    if ($o != '') {
        return $o;
    }
    global $bon;
    $form = $bon->form();
    $o = $form->form_label(__('Title', 'bon'), 'title');
    $o .= $form->form_input('title', $value['title'], 'placeholder="' . __('Type listing title here', 'bon') . '" class="' . $class . '"');
    return apply_atomic('search_title_field_output', $o);
}
开发者ID:VadimSid,项目名称:thinkgreek,代码行数:20,代码来源:search-fields.php

示例5: hybrid_attachment

/**
 * Loads the correct function for handling attachments.  Checks the attachment mime type to call 
 * correct function. Image attachments are not loaded with this function.  The functionality for them 
 * should be handled by the theme's attachment or image attachment file.
 *
 * Ideally, all attachments would be appropriately handled within their templates. However, this could 
 * lead to messy template files.
 *
 * @since 0.5.0
 * @access public
 * @uses get_post_mime_type() Gets the mime type of the attachment.
 * @uses wp_get_attachment_url() Gets the URL of the attachment file.
 * @return void
 */
function hybrid_attachment()
{
    $file = wp_get_attachment_url();
    $mime = get_post_mime_type();
    $mime_type = explode('/', $mime);
    /* Loop through each mime type. If a function exists for it, call it. Allow users to filter the display. */
    foreach ($mime_type as $type) {
        if (function_exists("hybrid_{$type}_attachment")) {
            $attachment = call_user_func("hybrid_{$type}_attachment", $mime, $file);
        }
        $attachment = apply_atomic("{$type}_attachment", $attachment);
    }
    echo apply_atomic('attachment', $attachment);
}
开发者ID:JunnLearning,项目名称:dk,代码行数:28,代码来源:media.php

示例6: miss_nav_search_box

 /**
  * Navigation Search Box
  * @since 1.5
  */
 function miss_nav_search_box($items, $args)
 {
     $disable_searchbox = apply_atomic('disable_searchbox', miss_get_setting('disable_searchbox'));
     if (!empty($disable_searchbox)) {
         return $items;
     }
     if ($args->theme_location == 'primary-menu') {
         ob_start();
         get_search_form();
         $searchform = ob_get_contents();
         ob_end_clean();
         $items .= '<li class="nav-search-box">' . $searchform . '<a class="search-button inactive" data-state="inactive">' . __("Search", MISS_TEXTDOMAIN) . '</a></li>';
     }
     return $items;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:19,代码来源:function.php

示例7: hybrid_register_scripts

/**
 * Registers JavaScript files for the framework.  This function merely registers scripts with WordPress using
 * the wp_register_script() function.  It does not load any script files on the site.  If a theme wants to register 
 * its own custom scripts, it should do so on the 'wp_enqueue_scripts' hook.
 *
 * @since 1.2.0
 * @access private
 * @return void
 */
function hybrid_register_scripts()
{
    /* Supported JavaScript. */
    $supports = get_theme_support('hybrid-core-scripts');
    /* Use the .min script if SCRIPT_DEBUG is turned off. */
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    /* Register the 'drop-downs' script if the current theme supports 'drop-downs'. */
    if (isset($supports[0]) && in_array('drop-downs', $supports[0])) {
        wp_register_script('drop-downs', esc_url(apply_atomic('drop_downs_script', trailingslashit(HYBRID_JS) . "drop-downs{$suffix}.js")), array('jquery'), '20110920', true);
    }
    /* Register the 'nav-bar' script if the current theme supports 'nav-bar'. */
    if (isset($supports[0]) && in_array('nav-bar', $supports[0])) {
        wp_register_script('nav-bar', esc_url(apply_atomic('nav_bar_script', trailingslashit(HYBRID_JS) . "nav-bar{$suffix}.js")), array('jquery'), '20111008', true);
    }
}
开发者ID:JunnLearning,项目名称:dk,代码行数:24,代码来源:scripts.php

示例8: the_ID

					<div id="post-<?php 
        the_ID();
        ?>
" class="<?php 
        hybrid_entry_class();
        ?>
">

						<?php 
        do_atomic('open_entry');
        // trending_open_entry
        ?>

						<?php 
        echo apply_atomic('entry_avatar', get_avatar(get_the_author_meta('user_email'), '100', '', get_the_author_meta('display_name')));
        ?>

						<?php 
        echo apply_atomic_shortcode('entry_title', '[entry-title]');
        ?>

						<?php 
        echo apply_atomic_shortcode('byline', '<div class="byline">' . __('By [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', hybrid_get_textdomain()) . '</div>');
        ?>

						<?php 
        if (has_excerpt()) {
            ?>

							<div class="entry-summary">
开发者ID:ralf-rojahn,项目名称:badalexandersbad,代码行数:30,代码来源:post.php

示例9: shandora_get_search_listing_form

function shandora_get_search_listing_form($is_widget = false)
{
    global $bon;
    $values = array();
    $values['property_type'] = isset($_COOKIE['property_type']) ? $_COOKIE['property_type'] : '';
    $values['title'] = isset($_COOKIE['title']) ? $_COOKIE['title'] : '';
    $values['property_location'] = isset($_COOKIE['property_location']) ? $_COOKIE['property_location'] : '';
    $values['property_location_level1'] = isset($_COOKIE['property_location_level1']) ? $_COOKIE['property_location_level1'] : '';
    $values['property_location_level2'] = isset($_COOKIE['property_location_level2']) ? $_COOKIE['property_location_level2'] : '';
    $values['property_location_level3'] = isset($_COOKIE['property_location_level3']) ? $_COOKIE['property_location_level3'] : '';
    $values['dealer_location_level1'] = isset($_COOKIE['dealer_location_level1']) ? $_COOKIE['dealer_location_level1'] : '';
    $values['dealer_location_level2'] = isset($_COOKIE['dealer_location_level2']) ? $_COOKIE['dealer_location_level2'] : '';
    $values['dealer_location_level3'] = isset($_COOKIE['dealer_location_level3']) ? $_COOKIE['dealer_location_level3'] : '';
    $values['property_status'] = isset($_COOKIE['property_status']) ? $_COOKIE['property_status'] : '';
    $values['property_bath'] = isset($_COOKIE['property_bath']) ? $_COOKIE['property_bath'] : '';
    $values['property_bed'] = isset($_COOKIE['property_bed']) ? $_COOKIE['property_bed'] : '';
    $values['max_price'] = isset($_COOKIE['max_price']) ? $_COOKIE['max_price'] : '';
    $values['min_price'] = isset($_COOKIE['min_price']) ? $_COOKIE['min_price'] : '';
    $values['max_lotsize'] = isset($_COOKIE['max_lotsize']) ? $_COOKIE['max_lotsize'] : '';
    $values['min_lotsize'] = isset($_COOKIE['min_lotsize']) ? $_COOKIE['min_lotsize'] : '';
    $values['max_buildingsize'] = isset($_COOKIE['max_buildingsize']) ? $_COOKIE['max_buildingsize'] : '';
    $values['min_buildingsize'] = isset($_COOKIE['min_buildingsize']) ? $_COOKIE['min_buildingsize'] : '';
    $values['property_mls'] = isset($_COOKIE['property_mls']) ? $_COOKIE['property_mls'] : '';
    $values['property_zip'] = isset($_COOKIE['property_zip']) ? $_COOKIE['property_zip'] : '';
    $values['property_feature'] = isset($_COOKIE['property_feature']) ? $_COOKIE['property_feature'] : '';
    $values['property_agent'] = isset($_COOKIE['property_agent']) ? $_COOKIE['property_agent'] : '';
    $values['property_floor'] = isset($_COOKIE['property_floor']) ? $_COOKIE['property_floor'] : '';
    $values['property_basement'] = isset($_COOKIE['property_basement']) ? $_COOKIE['property_basement'] : '';
    $values['property_garage'] = isset($_COOKIE['property_garage']) ? $_COOKIE['property_garage'] : '';
    $values['property_mortgage'] = isset($_COOKIE['property_mortgage']) ? $_COOKIE['property_mortgage'] : '';
    $values['reg_number'] = isset($_COOKIE['reg_number']) ? $_COOKIE['reg_number'] : '';
    $values['dealer_location'] = isset($_COOKIE['dealer_location']) ? $_COOKIE['dealer_location'] : '';
    $values['car_feature'] = isset($_COOKIE['car_feature']) ? $_COOKIE['car_feature'] : '';
    $values['body_type'] = isset($_COOKIE['body_type']) ? $_COOKIE['body_type'] : '';
    $values['manufacturer'] = isset($_COOKIE['manufacturer']) ? $_COOKIE['manufacturer'] : '';
    $values['manufacturer_level1'] = isset($_COOKIE['manufacturer_level1']) ? $_COOKIE['manufacturer_level1'] : '';
    $values['manufacturer_level2'] = isset($_COOKIE['manufacturer_level2']) ? $_COOKIE['manufacturer_level2'] : '';
    $values['manufacturer_level3'] = isset($_COOKIE['manufacturer_level3']) ? $_COOKIE['manufacturer_level3'] : '';
    $values['car_status'] = isset($_COOKIE['car_status']) ? $_COOKIE['car_status'] : '';
    $values['fuel_type'] = isset($_COOKIE['fuel_type']) ? $_COOKIE['fuel_type'] : '';
    $values['transmission'] = isset($_COOKIE['transmission']) ? $_COOKIE['transmission'] : '';
    $values['ancap'] = isset($_COOKIE['ancap']) ? $_COOKIE['ancap'] : '';
    $values['min_mileage'] = isset($_COOKIE['min_mileage']) ? $_COOKIE['min_mileage'] : '';
    $values['max_mileage'] = isset($_COOKIE['max_mileage']) ? $_COOKIE['max_mileage'] : '';
    $values['exterior_color'] = isset($_COOKIE['exterior_color']) ? $_COOKIE['exterior_color'] : '';
    $values['interior_color'] = isset($_COOKIE['interior_color']) ? $_COOKIE['interior_color'] : '';
    $values['yearbuilt'] = isset($_COOKIE['yearbuilt']) ? $_COOKIE['yearbuilt'] : '';
    $values['min_yearbuilt'] = isset($_COOKIE['min_yearbuilt']) ? $_COOKIE['min_yearbuilt'] : '';
    $values['max_yearbuilt'] = isset($_COOKIE['max_yearbuilt']) ? $_COOKIE['max_yearbuilt'] : '';
    $output = apply_atomic('search_listing_form', '', $values, $is_widget);
    if (!empty($output)) {
        return $output;
    }
    $button_color = bon_get_option('search_button_color', 'red');
    $form = $bon->form();
    $ro = '<div class="row search-listing-form">';
    // row open
    $rc = '</div>';
    // row close
    $cc = $rc;
    //column close
    if (!$is_widget) {
        $co = '<div class="large-4 column form-column small-11 small-centered large-uncentered">';
        // column open
    } else {
        $co = '<div class="large-12 column form-column small-11 small-centered large-uncentered">';
    }
    $row_1 = bon_get_option('search_row_1');
    $row_2 = bon_get_option('search_row_2');
    $row_3 = bon_get_option('search_row_3');
    $row_count = 3;
    if (!$row_1 && !$row_2 && !$row_3) {
        return '<p style="margin-top: 50px">' . __('Please setup your search fields in Shandora > Theme Settings > Listing Settings > Custom Search Field', 'bon') . '</p>';
    }
    $search_permalink = shandora_get_search_page_url();
    $output = $form->form_open($search_permalink, 'method="get" class="custom" id="search-listing-form"');
    $output .= $ro;
    if (!$is_widget) {
        $output .= '<div class="column large-10 small-12 large-uncentered small-centered">';
    } else {
        $output .= '<div class="column large-12 small-12 large-uncentered small-centered">';
    }
    for ($row_i = 1; $row_i <= $row_count; $row_i++) {
        if (${"row_{$row_i}"}) {
            for ($col_i = 1; $col_i <= 3; $col_i++) {
                if ($col_i == 1) {
                    $output .= $ro;
                }
                $field_type = bon_get_option('search_row_' . $row_i . '_col_' . $col_i);
                if ($field_type != 'none') {
                    $func = "shandora_search_" . $field_type . "_field";
                } else {
                    $func = '';
                }
                $class = '';
                $select_field = array('status', 'location', 'location_level1', 'location_level2', 'location_level3', 'dealer_location_level1', 'dealer_location_level2', 'dealer_location_level3', 'feature', 'mortgage', 'type', 'agent', 'car_status', 'dealer_location', 'body_type', 'car_feature', 'manufacturer', 'transmission', 'manufacturer_level1', 'manufacturer_level2', 'manufacturer_level3', 'yearbuilt', 'fuel_type');
                if (!$is_widget) {
                    if ($row_i >= 3) {
                        $class = 'no-mbot';
                    }
//.........这里部分代码省略.........
开发者ID:VadimSid,项目名称:thinkgreek,代码行数:101,代码来源:theme-actions.php

示例10: portfolio_grid

 /**
  *
  */
 function portfolio_grid($atts)
 {
     if ($atts == 'generator') {
         $option = array('name' => __('Portfolio Grid', MYSITE_ADMIN_TEXTDOMAIN), 'value' => 'portfolio_grid', 'options' => array(array('name' => __('Number of Columns', MYSITE_ADMIN_TEXTDOMAIN), 'desc' => __('Select the number of columns you would like your posts to display in.', MYSITE_ADMIN_TEXTDOMAIN), 'id' => 'column', 'default' => '', 'options' => array('1' => __('One Column', MYSITE_ADMIN_TEXTDOMAIN), '2' => __('Two Column', MYSITE_ADMIN_TEXTDOMAIN), '3' => __('Three Column', MYSITE_ADMIN_TEXTDOMAIN), '4' => __('Four Column', MYSITE_ADMIN_TEXTDOMAIN)), 'type' => 'select'), array('name' => __('Number of Portfolio Posts', MYSITE_ADMIN_TEXTDOMAIN), 'desc' => __('Select the number of posts you would like to display on each page.', MYSITE_ADMIN_TEXTDOMAIN), 'id' => 'showposts', 'default' => '', 'options' => array_combine(range(1, 40), array_values(range(1, 40))), 'type' => 'select'), array('name' => __('Portfolio Categories <small>(optional)</small>', MYSITE_ADMIN_TEXTDOMAIN), 'desc' => __('Select which portfolio categories you would like to display.', MYSITE_ADMIN_TEXTDOMAIN), 'id' => 'cat', 'default' => array(), 'target' => 'portfolio_category', 'type' => 'multidropdown'), array('name' => __('Offset Portfolio Posts <small>(optional)</small>', MYSITE_ADMIN_TEXTDOMAIN), 'desc' => __('This will skip a number of posts at the beginning.<br /><br />Useful if you are using multiple portfolio shortcodes on the same page.', MYSITE_ADMIN_TEXTDOMAIN), 'id' => 'offset', 'default' => '', 'options' => array_combine(range(1, 10), array_values(range(1, 10))), 'type' => 'select'), array('name' => __('Fancy Layout <small>(optional)</small>', MYSITE_ADMIN_TEXTDOMAIN), 'desc' => sprintf(__('%1$s comes with an additional fancy portfolio layout.', MYSITE_ADMIN_TEXTDOMAIN), THEME_NAME), 'id' => 'fancy_layout', 'options' => array('true' => __('Enable Fancy Layout', MYSITE_ADMIN_TEXTDOMAIN)), 'default' => '', 'type' => defined('FANCY_PORTFOLIO') ? 'checkbox' : ''), array('name' => __('Disable Portfolio Elements <small>(optional)</small>', MYSITE_ADMIN_TEXTDOMAIN), 'desc' => __('You can hide certain elements from displaying here.', MYSITE_ADMIN_TEXTDOMAIN), 'id' => 'disable', 'options' => array('image' => __('Disable Post Image', MYSITE_ADMIN_TEXTDOMAIN), 'title' => __('Disable Post Title', MYSITE_ADMIN_TEXTDOMAIN), 'excerpt' => __('Disable Post Excerpt', MYSITE_ADMIN_TEXTDOMAIN), 'date' => __('Disable Date', MYSITE_ADMIN_TEXTDOMAIN), 'more' => __('Disable Read More', MYSITE_ADMIN_TEXTDOMAIN), 'visit' => __('Disable Visit Site', MYSITE_ADMIN_TEXTDOMAIN), 'pagination' => __('Disable Pagination', MYSITE_ADMIN_TEXTDOMAIN)), 'default' => '', 'type' => 'checkbox'), 'shortcode_has_atts' => true));
         return $option;
     }
     extract(shortcode_atts(array('column' => '4', 'showposts' => '8', 'cat' => '', 'offset' => '', 'disable' => ''), $atts));
     $out = '';
     $portfolio_query = new WP_Query();
     global $post, $wp_rewrite, $wp_query, $mysite;
     $column = trim($column);
     $showposts = trim($showposts);
     $cat = trim($cat);
     $offset = trim($offset);
     if (is_front_page()) {
         $_layout = mysite_get_setting('homepage_layout');
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $post_obj = $wp_query->get_queried_object();
         $dependencies = get_post_meta($post_obj->ID, '_dependencies', true);
         $dependencies = empty($dependencies) ? get_post_meta($post_obj->ID, '_' . THEME_SLUG . '_dependencies', true) : $dependencies;
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $_layout = empty($_layout) ? 'full_width' : $_layout;
         $images = (strpos($dependencies, 'fancy_portfolio') !== false || apply_atomic('fancy_portfolio', false) == true) && !isset($mysite->responsive) ? 'additional_images' : ($_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images'));
     }
     $paged = mysite_get_page_query();
     $gallery_post = $post->post_name;
     if ($post->post_parent) {
         $parent_query = get_post($post->post_parent);
         $gallery_parent = $parent_query->ID;
     }
     if (is_numeric($offset) && strpos($disable, 'pagination') === false) {
         $mysite->offset = $offset;
         $mysite->posts_per_page = $showposts;
         add_filter('post_limits', 'my_post_limit');
     }
     if (strpos($disable, 'pagination') === false) {
         if (!empty($cat)) {
             $portfolio_query->query(array('post_type' => 'portfolio', 'posts_per_page' => $showposts, 'tax_query' => array('relation' => 'IN', array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => explode(',', $cat))), 'offset' => $offset, 'paged' => $paged));
         } else {
             $portfolio_query->query(array('post_type' => 'portfolio', 'posts_per_page' => $showposts, 'offset' => $offset, 'paged' => $paged));
         }
     } else {
         if (!empty($cat)) {
             $portfolio_query->query(array('post_type' => 'portfolio', 'posts_per_page' => $showposts, 'tax_query' => array('relation' => 'IN', array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => explode(',', $cat))), 'offset' => $offset, 'nopaging' => 0));
         } else {
             $portfolio_query->query(array('post_type' => 'portfolio', 'posts_per_page' => $showposts, 'offset' => $offset, 'nopaging' => 0));
         }
     }
     if ($portfolio_query->have_posts()) {
         $img_sizes = $mysite->layout[$images];
         $img_group = 'portfolio_img_group_' . rand(1, 1000);
         $width = '';
         $height = '';
         switch ($column) {
             case 1:
                 $main_class = 'post_grid one_column_portfolio';
                 $width = $img_sizes['one_column_portfolio'][0];
                 $height = $img_sizes['one_column_portfolio'][1];
                 break;
             case 2:
                 $main_class = 'post_grid two_column_portfolio';
                 $column_class = 'one_half';
                 $width = $img_sizes['two_column_portfolio'][0];
                 $height = $img_sizes['two_column_portfolio'][1];
                 break;
             case 3:
                 $main_class = 'post_grid three_column_portfolio';
                 $column_class = 'one_third';
                 $width = $img_sizes['three_column_portfolio'][0];
                 $height = $img_sizes['three_column_portfolio'][1];
                 break;
             case 4:
                 $main_class = 'post_grid four_column_portfolio';
                 $column_class = 'one_fourth';
                 $width = $img_sizes['four_column_portfolio'][0];
                 $height = $img_sizes['four_column_portfolio'][1];
                 break;
         }
         $out .= '<div class="' . $main_class . '">';
         $i = 1;
         while ($portfolio_query->have_posts()) {
             $portfolio_query->the_post();
             $id = get_the_ID();
             $image_id = get_post_thumbnail_id();
             $custom_fields = get_post_custom($id);
             foreach ($custom_fields as $key => $value) {
                 ${$key}[$id] = $value[0];
                 if (is_serialized(${$key}[$id])) {
                     ${$key}[$id] = unserialize(${$key}[$id]);
                 }
             }
             if (has_post_thumbnail() || !empty($_image[$id]) || !empty($_featured_video[$id])) {
                 if (has_post_thumbnail()) {
                     $img = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'full', true);
                 } else {
                     $img[0] = !empty($_image[$id]) ? $_image[$id] : '';
//.........这里部分代码省略.........
开发者ID:joshuatomasgarcia,项目名称:my-site-my-way-shortcodes,代码行数:101,代码来源:15-portfolio.php

示例11: the_permalink

 * Can be overwritten in a Child theme via {loop-status.php}
 */
if (has_post_format('status')) {
    ?>

			<div class="entry-content">
				<div class="note">
					<a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title_attribute();
    ?>
">
						<?php 
    echo get_avatar(get_the_author_meta('ID'), apply_atomic('status_avatar', '48'));
    ?>
					</a>

					<?php 
    the_content(__('Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo'));
    ?>
				</div>
				<?php 
    wp_link_pages(array('before' => '<p class="page-links">' . __('Pages:', 'cakifo'), 'after' => '</p>'));
    ?>
			</div> <!-- .entry-content -->

		<?php 
    /**
     * Quote, Image or Gallery format
开发者ID:JerryXie96,项目名称:PBSMUNC2013WebSite,代码行数:31,代码来源:loop.php

示例12: hybrid_profile_uri

/**
 * @since 0.6.0
 * @deprecated 1.0.0
 */
function hybrid_profile_uri()
{
    _deprecated_function(__FUNCTION__, '1.0.0', '');
    echo apply_atomic('profile_uri', 'http://gmpg.org/xfn/11');
}
开发者ID:rdbartlett,项目名称:kellyspencer.co.nz,代码行数:9,代码来源:deprecated.php

示例13: apply_atomic_shortcode

/**
 * Wraps the output of apply_atomic() in a call to do_shortcode(). This allows developers to use 
 * context-aware functionality alongside shortcodes. Rather than adding a lot of code to the 
 * function itself, developers can create individual functions to handle shortcodes.
 *
 * @since 0.7.0
 * @access public
 * @param string $tag Usually the location of the hook but defines what the base hook is.
 * @param mixed $value The value to be filtered.
 * @return mixed $value The value after it has been filtered.
 */
function apply_atomic_shortcode($tag = '', $value = '')
{
    return do_shortcode(apply_atomic($tag, $value));
}
开发者ID:JerryXie96,项目名称:PBSMUNC2013WebSite,代码行数:15,代码来源:core.php

示例14: shandora_listing_entry_meta

/**
 * Get Entry Meta
 *
 * @since 1.3.5
 * @return void
 *
 */
function shandora_listing_entry_meta()
{
    if (isset($_GET['view']) && $_GET['view'] == 'list') {
        return '';
    }
    $meta = shandora_entry_meta();
    echo apply_atomic('listing_entry_meta', $meta);
}
开发者ID:VadimSid,项目名称:thinkgreek,代码行数:15,代码来源:theme-hooks.php

示例15: dschool_site_title

/**
 * Custom site title (include logo)
 *
 * @since 0.1.0
 */
function dschool_site_title()
{
    $tag = is_front_page() ? 'h1' : 'div';
    $template_url = get_bloginfo('stylesheet_directory');
    if ($title = get_bloginfo('name')) {
        $title = '<' . $tag . ' id="site-title"><a href="' . home_url() . '" title="' . esc_attr($title) . '" rel="home"><img src="' . $template_url . '/images/logo.png" alt="' . $title . '" /> <span>' . $title . '</span></a></' . $tag . '>';
    }
    echo apply_atomic('site_title', $title);
}
开发者ID:nixter,项目名称:d.school,代码行数:14,代码来源:functions.php


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