本文整理汇总了PHP中load_option函数的典型用法代码示例。如果您正苦于以下问题:PHP load_option函数的具体用法?PHP load_option怎么用?PHP load_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了load_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sevenleague_header_class
function sevenleague_header_class()
{
$style = str_replace(" ", "_", load_option("header_style"));
if (strpos($style, 'not_fixed') !== false) {
} else {
$style .= " fixed_header";
}
return $style;
}
示例2: portfolio_grid_slider
function portfolio_grid_slider($atts = "", $content = null)
{
$secondary_button = load_option("secondary_button");
$primary_button = load_option("primary_button");
$showfilter = "";
$term_list_gen = "";
$cols = "";
$clear = "";
$echo = "";
$post_per_page = "";
$showheadline = "";
$content = "";
// LENGTH OF CONTENT
$showreadmore = "";
extract(shortcode_atts(array('cols' => '3', 'post_per_page' => '9', 'pages' => '2', 'content' => '200'), $atts));
$col = "2";
$ixxx = 0;
switch ($cols) {
case 1:
$col = "one_";
break;
case 2:
$col = "one_half";
break;
case 3:
$col = "one_third";
break;
case 4:
$col = "one_fourth";
break;
}
$echo .= '<div class="group portfolio_grid_slider">
<div class="portfolio-itemlist-col2 portfolio_grid_slider frame" id="pgridslider_wrap">';
$echo .= '<ul class="template_ul" id="pgridslider"><li class="group-itemlist-' . $cols . '">';
$ix = 1;
query_posts(array('post_type' => 'portfolio', 'paged' => get_query_var('paged'), 'posts_per_page' => $post_per_page * $pages));
if (have_posts()) {
while (have_posts()) {
the_post();
$ix++;
$ixxx++;
if ($ixxx > $post_per_page) {
$ixxx = 1;
$echo .= "</li><li class='group-itemlist-" . $cols . "'>";
}
if ($ix > $cols) {
$column = $col . "_last";
$clear = "<div class='clear'></div>";
$ix = 1;
} else {
$column = $col;
$clear = "";
}
$title = str_ireplace('"', '', trim(get_the_title()));
$desc = str_ireplace('"', '', trim(get_the_content()));
$terms = wp_get_object_terms(get_the_id(), 'project-type');
$term_list = "";
$count = count($terms);
$i = 0;
if ($count > 0) {
foreach ($terms as $term) {
$i++;
$term_list .= "portfolio-{$term->name} ";
}
}
$echo .= '<div class="' . $column . ' portfolio-lists-item ' . $term_list . '">';
ob_start();
get_template_part("portfolio-entry");
$echo .= ob_get_contents();
ob_end_clean();
$clear = "";
$echo .= '</div>' . $clear;
}
}
$echo .= '</li></ul>';
$echo .= "";
$echo .= "</div>\t\r\r\n\t\t\t\t<a class='btn prev'>Prev</a>\r\r\n\t\t\t\t<a class='btn next'>Next</a>\r\r\n\t\t\t\t<div class='clear'></div>\r\r\n\t\t\t\t</div><!-- group-->";
wp_reset_query();
$echo .= "<script type='text/javascript'>\r\r\n\t\tjQuery(document).ready(function()\r\r\n\t\t\t{\r\r\n\t\t\t(function () \r\r\n\t\t\t\t{\r\r\n\t\t\t\tvar jQueryframe = jQuery('#pgridslider_wrap');\r\r\n\t\t\t\tvar jQuerywrap = jQueryframe.parent();\r\r\n\t\t\t\tjQueryframe.sly({\r\r\n\t\t\t\t\thorizontal: 1,\r\r\n\t\t\t\t\titemNav: 'forceCentered',\r\r\n\t\t\t\t\tsmart: 1,\r\r\n\t\t\t\t\tactivateMiddle: 1,\r\r\n\t\t\t\t\tmouseDragging: 1,\r\r\n\t\t\t\t\ttouchDragging: 1,\r\r\n\t\t\t\t\treleaseSwing: 1,\r\r\n\t\t\t\t\tstartAt: 0,\r\r\n\t\t\t\t\tscrollBar: jQuerywrap.find('.scrollbar'),\r\r\n\t\t\t\t\tscrollBy: 3,\r\r\n\t\t\t\t\tspeed: 300,\r\r\n\t\t\t\t\telasticBounds: 1,\r\r\n\t\t\t\t\teasing: 'easeOutExpo',\r\r\n\t\t\t\t\tdragHandle: 1,\r\r\n\t\t\t\t\tdynamicHandle: 1,\r\r\n\t\t\t\t\tclickBar: 1,\r\r\n\t\t\t\t\tprev: jQuerywrap.parent().find('.prev'),\r\r\n\t\t\t\t\tnext: jQuerywrap.parent().find('.next')\r\r\n\t\t\t\t\t});\r\r\n\t\t\t\t}());\r\r\n\t\t\t});\r\r\n\t\t</script>";
return $echo;
}
示例3: get_the_date
echo $client[0];
}
if ($site[0] != "") {
?>
</a></p><?php
}
?>
<p class="work-details-p work-date"><span>Created:</span><?php
echo get_the_date();
?>
</p>
</div>
<div class="clear"></div>
<?php
if (load_option("portfolio_show_nav") == "on") {
?>
<div class="pagination">
<?php
if (previous_post_link_plus(array('post_type' => ' "portfolio" ', 'return' => 'id'))) {
?>
<span class="page-numbers"><?php
previous_post_link_plus(array('post_type' => ' "portfolio" '));
?>
</span>
<?php
}
if (next_post_link_plus(array('post_type' => ' "portfolio" ', 'return' => 'id'))) {
?>
示例4: register_sidebar
<?php
global $options;
register_sidebar(array('name' => 'Left Sidebar', 'id' => 'sidebar-1', 'before_widget' => '<aside id="%1$s" class="left widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => 'Right Sidebar', 'id' => 'sidebar-2', 'before_widget' => '<aside id="%1$s" class="right widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
// FOOTER SIDEBARS
register_sidebar(array('name' => 'Footer 1 Sidebar', 'id' => 'sidebar-11', 'before_widget' => '<aside id="%1$s" class="footer-first-sidebar widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => 'Footer 2 Sidebar', 'id' => 'sidebar-12', 'before_widget' => '<aside id="%1$s" class="footer-second-sidebar widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => 'Footer 3 Sidebar', 'id' => 'sidebar-13', 'before_widget' => '<aside id="%1$s" class="footer-third-sidebar widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => 'Footer 4 Sidebar', 'id' => 'sidebar-14', 'before_widget' => '<aside id="%1$s" class="footer-fourth-sidebar widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
/* CUSTOM SIDEBARS */
$my_sidebars = load_option("sidebars");
if (isset($my_sidebars)) {
for ($i = 0; $i < count($my_sidebars); $i++) {
$ix = $i + 20;
if (isset($my_sidebars[$i])) {
if ($my_sidebars[$i] != "") {
register_sidebar(array('name' => 'Sidebar ' . $my_sidebars[$i], 'id' => 'sidebar-' . $ix, 'before_widget' => '<aside id="%1$s" class="' . $my_sidebars[$i] . '-sidebar widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
}
}
}
}
示例5: print_option
[class*="icon-"], p.contact_widget + span, ol#filters li.active a, h1 strong, h2 strong, h3 strong h4 strong, h5 strong, h6 strong { <?php
print_option("color:", load_option("ui_bgcolor"), " !important;");
?>
}
<?php
do_action("sevenleague_after_customstyle");
?>
<?php
if (load_option("responsive") == "on") {
?>
/*
**
** RESPONSIVE DESIGNS
**
*/
/* <980px */
@media only screen and (max-width: 1039px)
{
.main-inner {padding-left:0px; padding-right:0px;}
示例6: home_url
<header id="headline" class="transition04 ">
<div class="orangeFill"></div>
<div id="headmenu">
<div id="nav_gradient">
<div id="navline_wrap">
<div id="nav" class="page">
<div class="inner">
<div id="brand" class="transition04"> <a href="<?php
echo home_url();
?>
"> <?php
echo load_logo();
?>
</a> </div>
<div id="navleft" class="transition04 <?php
if (load_option("anim_menu") == "on") {
echo "anim-menu";
}
?>
">
<?php
if (has_nav_menu('main_menu_1')) {
$walker = new Menu_With_Description();
wp_nav_menu(array('container' => 'nav', 'walker' => $walker, 'fallback_cb' => 'wp_page_menu', 'theme_location' => 'main_menu_1', 'menu_id' => 'menu', 'menu_class' => 'main-menu main-menu-1 sf-menu sf-js-enabled sf-shadow'));
} else {
echo "<div class='alert alert_red'>PLEASE DEFINE A MENU</div>";
//wp_page_menu(array('menu_class' => 'main-menu main-menu-1 sf-menu sf-js-enabled sf-shadow')); //wp_list_pages();
}
?>
</div>
<div class="clear"></div>
示例7: load_option
if (isset($commentError)) {
?>
<p class="error"><?php
echo $commentError;
?>
</p>
<?php
}
?>
<div class="clear"></div>
<input type="hidden" name="submitted" id="submitted" value="true" />
<input type="hidden" name="ajaxType" id="ajaxType" />
<label for="contact-go"></label><input id="contact-go" class="sc_button medium <?php
echo load_option("primary_button");
?>
" name="contact-go" type="submit" value=" Send message " />
<div class="clear"></div>
</form>
<?php
}
?>
<?php
}
}
?>
<?php
the_adminbar();
示例8: the_template
?>
<div id="<?php
echo the_template();
?>
" <?php
post_class();
?>
>
<div id="content" class="equal_height">
<?php
get_template_part('format', 'standard');
?>
<?php
if (load_option("disable_comments") == "false") {
comments_template('', true);
}
?>
</div><!-- content -->
<?php
}
?>
<?php
}
?>
<!-- end single.php -->
示例9: function
{
filters.push('#tiles li');
}
filter = filters.join(', ');
if(oldFilter !== filter)
{
refresh();
}
};
var onClickFilter = function(event)
{
var item = jQuery(event.currentTarget);
jQuery('#filters li').removeClass('active');
item.toggleClass('active');
updateFilters();
return false;
};
jQuery('#filters li').click(onClickFilter);
updateFilters();
return false;
});
<?php
echo stripslashes(load_option("extra_js"));
// HOOK SOME ACTIONS
do_action("sevenleague_custom_js");
示例10: sevenleague_call_custom_scripts
function sevenleague_call_custom_scripts()
{
if (load_option("google_webmaster")) {
echo stripslashes(load_option("google_webmaster") . "\n");
}
}
示例11: load_option
$i++;
$term_list_gen .= "<li>";
$term_list_gen .= "<a href='#' class='portfolio-filter small sc_button " . load_option("secondary_button") . "' data-pfilter='portfolio-" . $term->name . "'>" . $term->name . "</a>";
$term_list_gen .= "</li>";
}
}
$term_list_gen .= "</ul>";
if (load_option("portfolio1_showfilter") == "on") {
echo $term_list_gen;
}
?>
<div class="group">
<div class="portfolio-itemlist-col1">
<?php
$ix = 0;
query_posts(array('post_type' => 'portfolio', 'paged' => get_query_var('paged'), 'posts_per_page' => load_option("portfolio1_numbers"), 'project-type' => $group_cat));
?>
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<?php
$title = str_ireplace('"', '', trim(get_the_title()));
$desc = str_ireplace('"', '', trim(get_the_content()));
$ix++;
$terms = wp_get_object_terms($post->ID, 'project-type');
$term_list = "";
$count = count($terms);
$i = 0;
示例12: get_template_directory
// 7League FRAMEWORK BY 7THEME.NET
// VERSION 1.1
require_once get_template_directory() . '/7league/7league_functions.php';
require_once get_template_directory() . '/7league/profile_presets.php';
require_once get_template_directory() . '/7league/webfonts.php';
require_once get_template_directory() . '/7league/config.php';
require_once get_template_directory() . '/7league/options.php';
require_once get_template_directory() . '/7league/profile.php';
require_once get_template_directory() . '/7league/options-page.php';
require_once get_template_directory() . '/7league/crop.php';
require_once get_template_directory() . '/7league/shortcodes.php';
require_once get_template_directory() . '/7league/widgets.php';
require_once get_template_directory() . '/7league/sidebars.php';
require_once get_template_directory() . '/7league/allslider/allslider.php';
require_once get_template_directory() . '/7league/allslider/allslider_settings.php';
require_once get_template_directory() . '/7league/allslider/allslider_settings_page.php';
require_once get_template_directory() . '/7league/cufon.php';
require_once get_template_directory() . '/7league/callscripts.php';
require_once get_template_directory() . '/7league/posttype-client.php';
require_once get_template_directory() . '/7league/posttype-testimonial.php';
require_once get_template_directory() . '/7league/posttype-team.php';
require_once get_template_directory() . '/7league/posttype-portfolio.php';
require_once get_template_directory() . '/7league/posttype-mapr.php';
if (load_option("hide_wp") == "on") {
require_once get_template_directory() . '/7league/anonym.php';
}
if (load_option("reduce_css") == "on") {
add_action("sevenleague_before_customstyle", "sevenleague_load_cssfile");
add_action('wp_print_styles', 'sevenleague_deregister_styles', 100);
}
示例13: get_post_custom
$clear = "";
$post_per_page = "12";
$group_cat = "";
$cols = "3";
$custom = get_post_custom($post->ID);
if ($custom['group_items'][0] != "") {
$post_per_page = $custom['group_items'][0];
}
if ($custom['group_columns'][0] != "") {
$cols = $custom['group_columns'][0];
}
if ($custom['group_cat'][0] != "") {
$group_cat = $custom['group_cat'][0];
}
$page_type_class = load_option("team2_sidebar");
$team2_content = load_option("team2_content");
?>
<div id="<?php
echo the_template();
?>
">
<!-- team-grid -->
<div id="content" class="equal_height">
<div class="group">
<div class="team-itemlist-col<?php
echo $cols;
?>
group-itemlist-<?php
echo $cols;
?>
示例14: custom_pagination
</div><!-- portfolio-itemlist-col1 -->
<div class="clear"></div>
</div><!-- group-->
<div class="pagination">
<?php
custom_pagination();
?>
</div>
<?php
wp_reset_query();
?>
<?php
echo the_adminbar();
?>
</div>
<?php
if ($page_type_class != "page-sidebar-no-sidebar") {
?>
<div class="sidebar equal_height">
<div id="sidebar-body">
<?php
load_sidebar(load_option("portfolio_tax_sidebar1"), 'sidebar-1');
?>
</div>
</div>
<div class="clear"></div>
</div>
<?php
}
get_footer();
示例15: sevenleague_custom_styles
function sevenleague_custom_styles()
{
if (load_option("extra_css")) {
echo stripslashes(load_option("extra_css"));
}
}