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


PHP oxy_get_option函数代码示例

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


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

示例1: oxy_create_logo_css

function oxy_create_logo_css()
{
    // check if we using a logo
    $css = '';
    $header_height = oxy_get_option('header_height');
    switch (oxy_get_option('logo_type')) {
        case 'image':
            $img_id = oxy_get_option('logo_image');
            $img = wp_get_attachment_image_src($img_id, 'full');
            $logo_width = $img[1];
            $logo_height = $img[2];
            $retina = '';
            // check for retina logo
            if ('on' == oxy_get_option('logo_retina')) {
                // set brand logo to be half width & height
                $retina .= 'width:' . $logo_width / 2 . 'px;height:' . $logo_height / 2 . 'px;';
                // use half logo height to calculate header size
                $logo_height = $logo_height / 2;
            }
            $css = oxy_create_header_css($header_height, $logo_height . 'px', $logo_width . 'px', $retina);
            break;
        case 'text':
            $css = oxy_create_header_css($header_height, 36, 'auto');
            break;
    }
    update_option(THEME_SHORT . '-header-css', $css);
}
开发者ID:vanie3,项目名称:appland,代码行数:27,代码来源:backend.php

示例2: current_screen

 public function current_screen($current_screen)
 {
     if ('nav-menus' === $current_screen->base) {
         wp_enqueue_style('oxy-mega-menu', OXY_MEGA_MENU_URI . 'assets/css/oxy-mega-menu.css');
         if ('on' === oxy_get_option('ajax_menu_save')) {
             wp_enqueue_script('oxy-ajax-save-menu', OXY_MEGA_MENU_URI . 'assets/js/ajax-save-menu.js', array('jquery'));
         }
         // Make sure Mega Menu is installed
         $menus = get_posts(array('post_type' => 'oxy_mega_menu'));
         if (count($menus) === 0) {
             // Create post object
             $my_post = array('post_title' => 'Mega Menu', 'post_content' => '', 'post_status' => 'publish', 'post_type' => 'oxy_mega_menu');
             // Insert the post into the database
             wp_insert_post($my_post);
         }
         $menus = get_posts(array('post_type' => 'oxy_mega_columns'));
         if (count($menus) === 0) {
             $columns = array('col-md-3' => __('One Quarter Column (1/4)', 'lambda-admin-td'), 'col-md-4' => __('One Third Column (1/3)', 'lambda-admin-td'));
             foreach ($columns as $content => $title) {
                 // Create post object
                 $column_post = array('post_title' => $title, 'post_content' => $content, 'post_status' => 'publish', 'post_type' => 'oxy_mega_columns');
                 // Insert the post into the database
                 wp_insert_post($column_post);
             }
         }
     }
 }
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:27,代码来源:OxygennaMegaMenu.php

示例3: oxy_sign_up

function oxy_sign_up()
{
    if (isset($_POST['nonce'])) {
        if (wp_verify_nonce($_POST['nonce'], 'oxygenna-sign-me-up-nonce')) {
            header('Content-Type: application/json');
            $resp = new stdClass();
            $user_email = $_POST['email'];
            $resp->email = $user_email;
            if (filter_var($user_email, FILTER_VALIDATE_EMAIL) !== false) {
                //create the API from the stored key
                $api = new MCAPI(oxy_get_option('api_key'));
                // The list the user will subscribe to
                $list_id = oxy_get_option('list_id');
                $api->listSubscribe($list_id, $user_email);
                if ($api->errorCode) {
                    $resp->status = 'error';
                    $resp->message = __('Error registering', THEME_FRONT_TD);
                } else {
                    $resp->status = 'ok';
                    $resp->message = __('Registered', THEME_FRONT_TD);
                }
            } else {
                $resp->status = 'error';
                $resp->message = __('Invalid email', THEME_FRONT_TD);
            }
            echo json_encode($resp);
            die;
        }
    }
}
开发者ID:vanie3,项目名称:appland,代码行数:30,代码来源:mailchimp.php

示例4: current_screen

 public function current_screen($current_screen)
 {
     if ('nav-menus' === $current_screen->base) {
         wp_enqueue_style('oxy-mega-menu', OXY_MEGA_MENU_URI . 'assets/css/oxy-mega-menu.css');
         if ('on' === oxy_get_option('ajax_menu_save')) {
             wp_enqueue_script('oxy-ajax-save-menu', OXY_MEGA_MENU_URI . 'assets/js/ajax-save-menu.js', array('jquery'));
         }
     }
 }
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:9,代码来源:OxygennaMegaMenu.php

示例5: load_select_data

 function load_select_data($database)
 {
     // get data
     $data = array();
     switch ($database) {
         case 'taxonomy':
             if (isset($this->_field['taxonomy'])) {
                 if (isset($this->_field['blank_label'])) {
                     $this->_field['blank'] = $this->_field['blank_label'];
                 }
                 $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0', 'taxonomy' => $this->_field['taxonomy']));
             }
             break;
         case 'slideshow':
             $this->_field['blank'] = __('Select a Slideshow', THEME_ADMIN_TD);
             $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0', 'taxonomy' => 'oxy_slideshow_categories'));
             break;
         case 'get_option':
             $options = get_option(THEME_SHORT . '-options');
             if (isset($options['unregistered'][$this->_field['option']])) {
                 $data = oxy_get_option($this->_field['option']);
                 $unregistered = oxy_get_option('unregistered');
                 $data = $options['unregistered'][$this->_field['option']];
             } else {
                 $data = null;
             }
             break;
         case 'staff_featured':
             $this->_field['blank'] = __('Select a Staff member', THEME_ADMIN_TD);
             $posts = get_posts("showposts=-1&post_type=oxy_staff");
             foreach ($posts as $staff) {
                 $data[$staff->post_title] = $staff->ID;
             }
             break;
         case 'social_icons':
             $data = (include OPTIONS_DIR . 'icons/social.php');
             break;
         case 'categories':
             $this->_field['blank'] = __('all categories', THEME_ADMIN_TD);
             $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0'));
             break;
         case 'portfolios':
             $this->_field['blank'] = __('Select a Portfolio', THEME_ADMIN_TD);
             $data = get_categories(array('orderby' => 'name', 'hide_empty' => '0', 'taxonomy' => 'oxy_portfolio_categories'));
             break;
         default:
             $data = array();
             break;
     }
     return $data;
 }
开发者ID:vanie3,项目名称:appland,代码行数:51,代码来源:select.php

示例6: get_header

<?php

/**
 * Displays the archive for oxy_portfolio_image custom post type
 *
 * @package Lambda
 * @subpackage Frontend
 * @since 0.1
 *
 * @copyright (c) 2015 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.17.0
 */
get_header();
$page = oxy_get_option('portfolio_archive_page');
if (!empty($page)) {
    global $post;
    $post = get_post($page);
    setup_postdata($post);
    oxy_page_header($post->ID);
    get_template_part('partials/content', 'page');
    wp_reset_postdata();
}
get_footer();
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:24,代码来源:archive-oxy_portfolio_image.php

示例7: oxy_get_option

<?php

/**
 * Adds navigation for single post
 *
 * @package Omega
 * @subpackage Admin
 * @since 0.1
 *
 * @copyright (c) 2014 Oxygenna.com
 * @license **LICENSE**
 * @version 1.7.3
 */
$extra_post_class = oxy_get_option('blog_post_icons') == 'on' ? 'post-showinfo' : '';
?>
<nav id="nav-below" class="post-navigation <?php 
echo $extra_post_class;
?>
">
    <ul class="pager">
        <?php 
if (get_previous_post()) {
    ?>
            <li class="previous">
                <a class="btn btn-primary btn-icon btn-icon-left" rel="prev" href="<?php 
    echo get_permalink(get_adjacent_post(false, '', true));
    ?>
">
                    <i class="fa fa-angle-left"></i>
                    <?php 
    _e('Previous', 'omega-td');
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:31,代码来源:nav-single.php

示例8: the_author

 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.2.2
 */
?>
<small class="post-extras">

    <i class="icon-user"></i>
    <?php 
the_author();
?>
    <i class="icon-calendar"></i>
    <?php 
the_time(get_option('date_format'));
?>
    <?php 
if (has_tag() && oxy_get_option('blog_tags') == 'on') {
    ?>
    <i class="icon-tags"></i>
    <?php 
    the_tags($before = null, $sep = ', ', $after = '');
    ?>
    <?php 
}
?>
    <?php 
if (has_category()) {
    ?>
    <i class="icon-bookmark"></i>
    <?php 
    the_category(', ');
    ?>
开发者ID:vanie3,项目名称:appland,代码行数:31,代码来源:post-extras.php

示例9: oxy_get_option

}
$allow_comments = oxy_get_option('site_comments');
?>

<?php 
if (oxy_get_option('related_portfolio_items') === 'on') {
    ?>
    <?php 
    get_template_part('partials/portfolio/portfolio-related');
}
?>


<?php 
if ($allow_comments === 'portfolio' || $allow_comments === 'all') {
    ?>
<section class="section <?php 
    echo oxy_get_option('portfolio_comments_swatch');
    ?>
">
    <div class="container">
        <div class="row element-normal-top element-normal-bottom">
            <?php 
    comments_template('', true);
    ?>
        </div>
    </div>
</section>
<?php 
}
get_footer();
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:31,代码来源:single-oxy_portfolio_image.php

示例10: oxy_get_option

<?php

$margin_top = oxy_get_option('template_margin');
?>

<section class="section">
    <div class="container">
        <div class="row element-top-<?php 
echo $margin_top;
?>
">
            <div class="col-md-8 col-md-offset-2">

开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:12,代码来源:global-page-top-fullwidth.php

示例11: get_user_by

 * Displays the main body of the theme
 *
 * @package Omega
 * @subpackage Frontend
 * @since 0.1
 *
 * @copyright (c) 2014 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.7.3
 */
// get the author name
if (get_query_var('author_name')) {
    $author = get_user_by('slug', get_query_var('author_name'));
} else {
    $author = get_userdata(get_query_var('author'));
}
get_header();
oxy_blog_header(get_the_author_meta('display_name', $author->ID), null);
// if masonry option set then use masonry option for name otherwise use blog style
$name = oxy_get_option('blog_masonry') === 'no-masonry' ? oxy_get_option('blog_style') : oxy_get_option('blog_masonry');
?>
<section class="section <?php 
echo oxy_get_option('blog_swatch');
?>
">
    <?php 
get_template_part('partials/blog/list', $name);
?>
</section>
<?php 
get_footer();
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:31,代码来源:author.php

示例12: oxy_read_more_link

function oxy_read_more_link($more_link, $more_link_text)
{
    // remove #more
    $more_link = preg_replace('|#more-[0-9]+|', '', $more_link);
    return str_replace($more_link_text, oxy_get_option('blog_readmore'), $more_link);
}
开发者ID:vanie3,项目名称:appland,代码行数:6,代码来源:frontend.php

示例13: oxy_get_option

    echo oxy_get_option('product_directionnav');
    ?>
" data-flex-directions-type="<?php 
    echo oxy_get_option('product_directionnavtype');
    ?>
" data-flex-speed="<?php 
    echo oxy_get_option('product_speed');
    ?>
" data-flex-controls="<?php 
    echo oxy_get_option('product_showcontrols');
    ?>
" data-flex-slideshow="<?php 
    echo oxy_get_option('product_autostart');
    ?>
" data-flex-duration="<?php 
    echo oxy_get_option('product_duration');
    ?>
">
        <ul class="slides product-gallery">
            <?php 
    foreach ($image_ids as $image_id) {
        $thumb = wp_get_attachment_image_src($image_id, 'shop_thumbnail');
        $single = wp_get_attachment_image_src($image_id, 'shop_single');
        $full = wp_get_attachment_image_src($image_id, 'full');
        ?>
                <li data-thumb="<?php 
        echo $thumb[0];
        ?>
">
                    <figure>
                        <img src="<?php 
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:product-image.php

示例14: get_post_meta

 * @copyright (c) 2015 Oxygenna.com
 * @license **LICENSE**
 * @version 1.17.0
 */
global $post;
$image = get_post_meta($post->ID, THEME_SHORT . '_masonry_image', true);
if (empty($image)) {
    $image_attachment = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
    if (isset($image_attachment[0])) {
        $image = $image_attachment[0];
    }
}
$width = get_post_meta($post->ID, THEME_SHORT . '_masonry_width', true);
$item_style = oxy_get_option('blog_masonry_style');
$text_align = oxy_get_option('blog_masonry_text_align');
$title_tag = oxy_get_option('blog_masonry_title_tag');
$format = get_post_format();
if ($format !== 'quote' && $format !== 'link') {
    $format = 'standard';
}
?>
<div class="post-masonry masonry-item masonry-<?php 
echo esc_attr($width);
?>
" data-menu-order="<?php 
echo esc_attr($masonry_count);
?>
">
    <div class="post-masonry-inner <?php 
echo esc_attr(implode(' ', $classes));
?>
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:post.php

示例15: get_permalink

                    <a href="<?php 
    echo get_permalink($prev->ID);
    ?>
">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
                            <g>
                                <polyline fill="none" stroke-width="3" stroke-miterlimit="10" points="68.692,16.091 33.146,50 68.692,83.906   "/>
                            </g>
                        </svg>
                    </a>
                </li>
            <?php 
}
?>
            <?php 
$page = oxy_get_option('portfolio_page');
?>
            <?php 
if (!empty($page)) {
    ?>
                <li>
                    <a href="<?php 
    echo get_permalink($page);
    ?>
">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
                                <g>
                                    <rect x="15.958" y="15" fill="none" stroke-width="3" stroke-miterlimit="10" width="70" height="70"/>
                                    <line fill="none" stroke-width="3" stroke-miterlimit="10" x1="15.958" y1="61.655" x2="85.958" y2="61.655"/>
                                    <line fill="none" stroke-width="3" stroke-miterlimit="10" x1="15.958" y1="38.345" x2="85.958" y2="38.345"/>
                                    <line fill="none" stroke-width="3" stroke-miterlimit="10" x1="62.632" y1="15" x2="62.632" y2="85"/>
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:heading-portfolio.php


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