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


PHP theme::get_option方法代码示例

本文整理汇总了PHP中theme::get_option方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::get_option方法的具体用法?PHP theme::get_option怎么用?PHP theme::get_option使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在theme的用法示例。


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

示例1: esc_url

				<?php 
if ($logo_width != 'zero') {
    ?>
				<div class="<?php 
    echo $logo_width;
    ?>
 wide center aligned column">
					<?php 
    if (theme::get_option('logo_url')) {
        ?>
						<a href="<?php 
        echo esc_url(home_url('/'));
        ?>
" rel="home">
							<img src="<?php 
        echo theme::get_option('logo_url');
        ?>
">
						</a>
						<?php 
    }
    ?>
				</div>
				<?php 
}
// logo width
if ($menu_width != 'zero') {
    ?>
				<div class="<?php 
    echo $menu_width;
    ?>
开发者ID:jw-psychopomp,项目名称:NewOrleansGlassworks-wordpress,代码行数:31,代码来源:header.php

示例2: options

 /**
  * Registers the options page with WordPress, and enqueues style/scripts for
  * the options page in the dashboard. Only visible to users who can edit theme
  * options.
  * 
  * @return void
  */
 public function options()
 {
     if (current_user_can('edit_theme_options')) {
         if (isset($_GET['page']) && ($_GET['page'] == theme::$identifier . '_options' || $_GET['page'] == 'dev_notes')) {
             // Styles
             wp_enqueue_style('semantic');
             wp_enqueue_style('font-awesome');
             wp_enqueue_style('webicons');
             wp_enqueue_style('highlight');
             wp_enqueue_style('theme-options');
             // Scripts
             wp_enqueue_script('webfont');
             wp_enqueue_script('semantic');
             wp_enqueue_script('highlight');
             wp_enqueue_script('mousetrap');
             // There are a few good reasons that you should replace your main.js with
             // the theme-options.js; such as, jQuery is already included in the
             // dashboard and it runs in safe mode.
             wp_enqueue_script('theme-options');
         }
     }
     add_theme_page('Theme Options', 'Theme Options', 'edit_theme_options', theme::$identifier . '_options', array($this, 'options_page'));
     if (theme::get_option('dev_notes')) {
         add_theme_page('Theme Dev Notes', 'Theme Dev Notes', 'edit_theme_options', 'dev_notes', array($this, 'dev_notes_page'));
     }
 }
开发者ID:nemesiscodex,项目名称:Semantic-UI-WordPress,代码行数:33,代码来源:wp_integrations.php

示例3: printf

					<div class="ui toggle checkbox">
						<?php 
printf('<input type="checkbox" value="1" name="%1$s" %2$s>', theme::option_form_name('dev_notes'), theme::get_option('dev_notes') ? 'checked' : '');
?>
						<label>Enable Developer Notes</label>
					</div>
				</div>
				<div class="ui top attached secondary inverted segment">
					
					<h4 class="ui center aligned header">WordPress Theme Editor</h4>
				</div>
				<div class="ui bottom attached stacked segment">
					<strong>WARNING:</strong> Editing a theme via WordPress's file editor is <strong>very dangerious!</strong>
					<br><br>
					Modifying a theme's files without knowing the proper programming languages can often lead to your site going down.
					If you <i>must</i> edit this theme's files, it is highly recommended that you use an IDE.
					<br><br>
					<div class="field">
						<div class="ui toggle checkbox">
							<?php 
printf('<input type="checkbox" value="1" name="%1$s" %2$s>', theme::option_form_name('theme_editor'), theme::get_option('theme_editor') ? 'checked' : '');
?>
							<label>Allow Theme Editor</label>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
开发者ID:jw-psychopomp,项目名称:NewOrleansGlassworks-wordpress,代码行数:30,代码来源:theme-options-general.php

示例4: dynamic_sidebar

						<div class="sixteen wide column">
							<div class="ui three column doubling grid">
								<?php 
    dynamic_sidebar($footer_sidebar);
    ?>
							</div>
						</div>
					</div>
					<?php 
}
?>
				<div class="row">
					<div class="eight wide column">
						<div class="ui center aligned basic segment">
							<?php 
if (theme::get_option('powered_by')) {
    ?>
Proudly Powered By <a class="inverted" href="http://wordpress.org/">WordPress</a> &amp; <a class="inverted" href="http://semantic-ui.com/">Semantic UI</a>.<?php 
}
?>
						</div>
											</div>
					<div class="eight wide column">
						<div class="ui right floated segment">
							&copy; 2015 <a href="http://neworleansglassworks.com" target="_blank">New Orleans School of Glassworks, Inc.</a> All rights reserved.
						</div>

							<?php 
/*
							$copyright_holder     = theme::get_option('copyright_holder');
							$copyright_holder_url = theme::get_option('copyright_holder_url');
开发者ID:jw-psychopomp,项目名称:NewOrleansGlassworks-wordpress,代码行数:31,代码来源:footer.php

示例5: settype

        settype($copyright_year, 'integer');
    } else {
        $copyright_year = (int) date('Y');
    }
} else {
    ?>
								<a class="inverted" href="https://github.com/ProjectCleverWeb" >Nicholas Jordon</a>
								<?php 
    $copyright_year = 2014;
}
if ($copyright_year == (int) date('Y')) {
    echo $copyright_year;
} else {
    echo $copyright_year . ' - ' . date('Y');
}
if (theme::get_option('copyright_extra')) {
    echo ' - All Rights Reserved';
}
?>
						</div>
					</div>
				</div>
			</footer>
		</div>
	</div>
	
	<!-- Modals -->
	
	<!-- /Modals -->
	
	
开发者ID:nemesiscodex,项目名称:Semantic-UI-WordPress,代码行数:29,代码来源:footer.php

示例6: printf

<div class="ui three column doubling grid">
	<div class="column">
		<h4 class="ui center aligned top attached black inverted header">Mobile Meta</h4>
		<div class="ui bottom attached secondary segment">
			<div class="ui form">
				<div class="inline field">
					<div class="ui toggle checkbox">
						<?php 
printf('<input type="checkbox" value="1" name="%1$s" %2$s>', theme::option_form_name('mobile_meta'), theme::get_option('mobile_meta') ? 'checked' : '');
?>
						<label>Use Mobile Meta</label>
					</div>
				</div>
				<div class="field">
					<label>Recommended Mobile Screen Width (without the "px")</label>
					<?php 
printf('<input type="text" placeholder="450" name="%1$s" value="%2$s">', theme::option_form_name('mobile_size'), theme::get_option('mobile_size'));
?>
				</div>
			</div>
		</div>
	</div>
</div>
开发者ID:nemesiscodex,项目名称:Semantic-UI-WordPress,代码行数:23,代码来源:theme-options-meta-tags.php

示例7: bloginfo

</title>

<meta name="description" content="<?php 
bloginfo('description');
?>
" />
<meta name="keywords" content="html5, ui, library, framework, javascript" />
<link rel="shortcut icon" type="image/png" href="/favicon.png"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<?php 
if (theme::get_option('mobile_meta')) {
    ?>
	<!-- Mobile Meta -->
	<meta name="HandheldFriendly" content="True">
	<meta name="MobileOptimized" content="<?php 
    echo theme::get_option('mobile_size');
    ?>
">
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<!-- /Mobile Meta -->
	<?php 
}
?>
<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
">
<script type="text/javascript">
// Use local jQuery if CDN is unavailable
!window.jQuery && document.write('<script src="<?php 
echo theme::$scripts_uri . '/jquery-2.1.1.min.js';
开发者ID:nemesiscodex,项目名称:Semantic-UI-WordPress,代码行数:31,代码来源:head.php

示例8: elseif

<?php

/**
 * Chooses the template to display
 */
if (theme::get_option('first_run')) {
    theme::part('template', 'template', 'first-run');
} elseif (is_front_page() || is_home()) {
    theme::part('template', 'template', 'home');
} else {
    theme::part('template', 'template', 'default');
}
开发者ID:jw-psychopomp,项目名称:NewOrleansGlassworks-wordpress,代码行数:12,代码来源:index.php


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