本文整理汇总了PHP中as_option函数的典型用法代码示例。如果您正苦于以下问题:PHP as_option函数的具体用法?PHP as_option怎么用?PHP as_option使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了as_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: as_on_add_scripts
function as_on_add_scripts()
{
// enqueue backbonejs, underscore
add_existed_script('backbone');
add_existed_script('underscore');
if (as_option('as_option_smooth_scroll', '1')) {
// Smoothscroll
add_script('smoothscroll', TEMPLATEURL . '/js/smoothscroll.js', array('jquery'));
}
// Modernize
add_script('modernizr', TEMPLATEURL . '/js/libs/modernizr.custom.js', array('jquery'));
// Classie
add_script('classie', TEMPLATEURL . '/js/libs/classie.js', array('jquery'));
if (as_option('as_option_retina_img', '1')) {
// Retina JS
add_script('retina', TEMPLATEURL . '/js/libs/retina.min.js', array('jquery'));
}
// Dialog
add_script('dialog', TEMPLATEURL . '/js/libs/dialogFx.js', array('jquery', 'modernizr', 'classie'));
// Front Js
add_script('front', TEMPLATEURL . '/js/front.js', array('jquery', 'backbone', 'underscore'));
wp_localize_script('front', 'as_globals', array('ajaxURL' => admin_url('admin-ajax.php'), 'imgURL' => get_template_directory_uri() . '/img/'));
// Custom
add_script('main', TEMPLATEURL . '/js/main.js', array('jquery'));
add_script('jquery.appear', TEMPLATEURL . '/js/libs/jquery.appear.js', array('jquery', 'main'));
//video
add_script('video.js', TEMPLATEURL . '/js/libs/video.js', array('jquery', 'main'));
//audio
add_script('audio.js', TEMPLATEURL . '/js/libs/audio.js', array('jquery', 'main'));
}
示例2: woo_columns_body_class
function woo_columns_body_class($classes)
{
if (is_woocommerce()) {
$classes[] = 'columns-' . as_option('woo_listing_column_number');
}
return $classes;
}
示例3: esc_url
if (as_option('as_tumblr_url')) {
echo '<li><a href="' . esc_url(as_option('as_tumblr_url')) . '" ' . $as_target . ' title="Tumblr"><div class="as-social-border-style"></div><span class="dslc-icon dslc-icon-tumblr"></span></a></li>';
}
if (as_option('as_linkedin_url')) {
echo '<li><a href="' . esc_url(as_option('as_linkedin_url')) . '" ' . $as_target . ' title="Linkedin"><div class="as-social-border-style"></div><span class="dslc-icon dslc-icon-linkedin"></span></a></li>';
}
if (as_option('as_instagram_url')) {
echo '<li><a href="' . esc_url(as_option('as_instagram_url')) . '" ' . $as_target . ' title="Instagram"><div class="as-social-border-style"></div><span class="dslc-icon dslc-icon-instagram"></span></a></li>';
}
if (as_option('as_github_url')) {
echo '<li><a href="' . esc_url(as_option('as_github_url')) . '" ' . $as_target . ' title="Github"><div class="as-social-border-style"></div><span class="dslc-icon dslc-icon-github"></span></a></li>';
}
if (as_option('as_dropbox_url')) {
echo '<li><a href="' . esc_url(as_option('as_dropbox_url')) . '" ' . $as_target . ' title="Dropbox"><div class="as-social-border-style"></div><span class="dslc-icon dslc-icon-dropbox"></span></a></li>';
}
if (as_option('as_foursquare_url')) {
echo '<li><a href="' . esc_url(as_option('as_foursquare_url')) . '" ' . $as_target . ' title="Dropbox"><div class="as-social-border-style"></div><span class="dslc-icon dslc-icon-foursquare"></span></a></li>';
}
?>
</ul>
</div>
<!-- List Social / End -->
<?php
}
?>
</div>
</div>
</div>
</footer>
<!-- Footer / End -->
示例4: as_option
* Contains footer content and the closing of the #main and #page div elements.
*
* @author : Alena Studio
*/
?>
<?php
if (!is_page_template('page-blank.php')) {
?>
<!-- Custom Footer
================================================== -->
<?php
if (as_option('as_option_check_footer', '1')) {
?>
<?php
$slug = as_option('as_option_custom_footer', 'default');
//===get slug footer value===//
$as_footer = rwmb_meta('as_footer_menu');
$as_footer_check = rwmb_meta('as_custom_page_metaboxes', 'type=checkbox_list');
if ($as_footer != 0 && in_array('page_footer_options', $as_footer_check)) {
$slug = $as_footer;
}
//===========================//
get_template_part('footers/footer', $slug);
?>
<?php
}
?>
<!-- End / Custom Footer -->
<!-- Search Form
示例5: as_get_pagination
}
}
?>
<!-- Pagination -->
<div class="as-pagination-wrapper">
<?php
echo as_get_pagination();
?>
</div>
<!-- Pagination / End -->
<?php
wp_reset_postdata();
?>
</div><!-- Post Loop / End -->
<?php
if (as_option('as_blog_position_sidebar') == "right") {
?>
<div class="dslc-col dslc-4-col dslc-last-col">
<?php
get_sidebar();
?>
</div><!-- Sidebar / End -->
<?php
}
?>
</div><!-- Wrapper / End -->
</div>
</div>
<!-- Content / End -->
<?php
get_footer();
示例6: as_option
}
//
// get (or set default) options from the database
//
$use_ssl = as_option("get", "use_ssl", "0") === "1" ? true : false;
$additional_urls = as_option("get", "additional_urls", "wp-comments-post.php\nwp-admin/plugins.php?page=akismet-key-config");
$ignore_urls = as_option("get", "ignore_urls", "xmlrpc.php");
$secure_users_only = as_option("get", "secure_users_only", "0") === "1" ? true : false;
if (!isset($config_parent)) {
$config_parent = as_option("get", "config_parent", "plugins.php");
}
if (apache_version(1.3, 1)) {
$default_https_key = "SERVER_PORT";
$default_https_value = "443";
} elseif (apache_version(2)) {
$default_https_key = "HTTPS";
$default_https_value = "on";
}
$https_key = as_option("get", "https_key", $default_https_key);
$https_value = as_option("get", "https_value", $default_https_value);
//
// build secure site url
//
$secure_url = preg_replace("|^https?://|", scheme($use_ssl), get_option("siteurl"));
$secure_url = rtrim(trim($secure_url), "/");
# remove any trailing slashes
//
// log plugin options
//
as_log("HTTPS: " . (is_https() ? "Yes" : "No") . "\n\t\tURL: http" . (is_https() ? "s" : "") . "://" . host() . req_uri() . "\n\n\t\tUse SSL: " . ($use_ssl ? "Yes" : "No") . "\n\t\tSite URL: " . get_option("siteurl") . "\n\t\tSecure URL: {$secure_url}\n\t\tAdditional urls:\n{$additional_urls}\n\t\tIgnore urls:\n{$ignore_urls}\n\t\tSecure users only: " . ($secure_users_only ? "Yes" : "No") . "\n\t\tConfig parent: {$config_parent}");
as_log("\n-- end initialisation, begin functions --\n");
示例7: balanceTags
<div class="dslc-col dslc-6-col dslc-last-col">
<div class="as-context-404">
<p>
<?php
echo balanceTags(as_option('as_option_error_context_404'), true);
?>
</p>
</div>
<div class="as-context-404-button">
<a href="<?php
get_home_url();
?>
" class="as-btn-404-back-home"><?php
_e('BACK TO HOME', AS_DOMAIN);
?>
</a>
<a href="<?php
echo esc_url(as_option('as_option_error_report_url_404'));
?>
" class="as-btn-404-back-home as-btn-report"><?php
_e('REPORT A PROBLEM', AS_DOMAIN);
?>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- 404 PAGE / End -->
<?php
get_footer();
示例8: sprintf
if (class_exists('Woocommerce')) {
global $woocommerce;
?>
<li class="as-icon-shopping">
<a href="javascript:void(0);"><span class="dslc-icon dslc-icon-shopping-cart"></span><span class="as-quatity-item-woo"><?php
echo sprintf(_n('%d', '%d', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);
?>
</span></a>
<div class="widget_shopping_cart_content"></div>
</li>
<?php
}
}
?>
<?php
if (as_option('as_option_check_icon_search_header_1', '1')) {
?>
<li>
<a href="#" class="trigger-search" data-id="search_dialog">
<span class="dslc-icon dslc-icon-search"></span>
</a>
</li>
<?php
}
?>
</ul>
<?php
}
?>
<!-- Icon Shop & Search / End -->
</div>
示例9: esc_attr
" data-id="<?php
echo esc_attr($post->ID);
?>
">
<span class="dslc-icon dslc-icon-heart-empty"></span>
<span class="number-like-heart">
<?php
echo get_post_meta($post->ID, 'as_like_count', true) ? get_post_meta($post->ID, 'as_like_count', true) : 0;
?>
</span>
<?php
_e('like', AS_DOMAIN);
?>
</a>
</div>
<?php
}
?>
<?php
if (as_option('as_blog_post_category', '1')) {
?>
<div class="as-category">
<span class="dslc-icon dslc-icon-folder-open-alt"></span> <?php
the_category(', ');
?>
</div>
<?php
}
?>
</div><!-- Info / End -->
</div>
示例10: the_tags
<div class="as-post-btn-group">
<div class="as-tag-post-wrapper">
<?php
if (has_tag()) {
?>
<span class="dslc-icon dslc-icon-as-pricetags"></span> <?php
the_tags('Tags: ', ', ', '<br />');
?>
<?php
}
?>
</div>
<div class="as-post-social-group">
<?php
if (as_option('as_blog_btn_list_share_social', '1')) {
?>
<div class="as-share-social-list">
<?php
get_template_part('template/share', 'social-blog');
?>
<div class="as-share-btn">
<span class="dslc-icon dslc-icon-share-alt"></span>
<?php
_e('Share', AS_DOMAIN);
?>
</div>
</div>
<?php
}
?>
示例11: esc_html
echo esc_html($breadcrumb_title);
?>
</h1>
<?php
} else {
?>
<h1 class="as-page-title as-breadcrumb-title"><?php
echo esc_html($breadcrumb_title);
?>
</h1>
<?php
}
$as_breadcrumb = rwmb_meta('as_breadcrumb_menu');
$as_header_check = rwmb_meta('as_custom_page_metaboxes', 'type=checkbox_list');
settype($as_header_check, 'array');
if ($as_breadcrumb != 3 | !in_array('page_breadcrumb_options', $as_header_check) && as_option('as_option_breadcrumb_link', '1')) {
?>
<!-- Breadcrumb Content -->
<ul class="as-breadcrumb-link">
<?php
if (!empty($breadcrum_content)) {
$count = 0;
foreach ($breadcrum_content as $link) {
$count++;
echo "<li>";
if (is_array($link)) {
?>
<a href="<?php
echo esc_url($link["url"]);
?>
示例12: get_template_part
get_template_part('footers/footer', $slug);
?>
<?php
}
?>
<!-- End / Custom Footer -->
<!-- Search Form
======================================================================== -->
<?php
get_template_part('template/search', 'form');
?>
<!-- Search Form / End -->
<?php
}
?>
<?php
if (as_option('as_option_scroll_to_top', '1')) {
?>
<!-- Scrool to top
======================================================================== -->
<div class="as-scrollup"><span class="dslc-icon-chevron-up"></span></div>
<!-- Scrool to top / End -->
<?php
}
wp_footer();
?>
</body>
</html>
示例13: esc_html
<div class="dslc-col dslc-5-col">
<?php
if (as_option('as_option_copyright_footer_2')) {
?>
<!-- Copyright -->
<div class="as-copyright-footer"><?php
echo esc_html(as_option('as_option_copyright_footer_2'));
?>
</div>
<!-- Copyright / End -->
<?php
}
?>
</div>
<div class="dslc-col dslc-7-col dslc-last-col">
<?php
if (as_option('as_option_check_menu_footer_2', '2')) {
?>
<!-- Menu -->
<?php
wp_nav_menu(array('container' => false, 'container_class' => 'as-menu', 'menu_class' => 'as-menu-footer-2', 'theme_location' => 'as_footer_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'fallback_cb' => false));
?>
<!-- Menu / End -->
<?php
}
?>
</div>
</div>
</div>
<!-- Footer Bottom & Coppyright / End -->
示例14: esc_url
<?php
/**
* Monalisa the list social icon.
*
* Sets up the share social.
*
* @package WordPress
* @subpackage Monalisa
* @since Monalisa 1.0
*/
?>
<ul class="as-list-social-header-wrapper">
<?php
if (as_option('as_twitter_url')) {
echo '<li><a href="' . esc_url(as_option('as_twitter_url')) . '" title="Twitter" class="as-twitter"><span class="dslc-icon dslc-icon-twitter"></span></a></li>';
}
if (as_option('as_facebook_url')) {
echo '<li><a href="' . esc_url(as_option('as_facebook_url')) . '" title="Facebook" class="as-facebook"><span class="dslc-icon dslc-icon-facebook"></span></a></li>';
}
if (as_option('as_dribbble_url')) {
echo '<li><a href="' . esc_url(as_option('as_dribbble_url')) . '" title="Dribbble" class="as-dribbble"><span class="dslc-icon dslc-icon-dribbble"></span></a></li>';
}
if (as_option('as_google_url')) {
echo '<li><a href="' . esc_url(as_option('as_google_url')) . '" title="Google Plus" class="as-google-plus"><span class="dslc-icon dslc-icon-google-plus"></span></a></li>';
}
if (as_option('as_pinterest_url')) {
echo '<li><a href="' . esc_url(as_option('as_pinterest_url')) . '" title="Pinterest" class="as-pinterest"><span class="dslc-icon dslc-icon-pinterest"></span></a></li>';
}
?>
</ul>
示例15: as_option
======================================================================== -->
<div id="footer-bottom-1">
<?php
if (as_option('as_option_scroll_to_top', '1')) {
?>
<!-- Scrool to top
======================================================================== -->
<div class="as-scrollup"><span class="dslc-icon dslc-icon-double-angle-up"></span></div>
<!-- Scrool to top / End -->
<?php
}
?>
<div class="as-wrapper clearfix">
<div class="dslc-col dslc-12-col dslc-last-col">
<?php
if (as_option('as_option_copyright_footer_1')) {
?>
<!-- Copyright -->
<div class="as-copyright-footer"><?php
echo as_option('as_option_copyright_footer_1');
?>
</div>
<!-- Copyright / End -->
<?php
}
?>
</div>
</div>
</div>
<!-- Footer Bottom & Coppyright / End -->