本文整理汇总了PHP中dynamicnews_theme_options函数的典型用法代码示例。如果您正苦于以下问题:PHP dynamicnews_theme_options函数的具体用法?PHP dynamicnews_theme_options怎么用?PHP dynamicnews_theme_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dynamicnews_theme_options函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: child_theme_dynamicnews_css_layout
function child_theme_dynamicnews_css_layout()
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Change Layout to wide if activated
if (isset($theme_options['layout']) and $theme_options['layout'] == 'wide') {
echo '<style type="text/css">
@media only screen and (min-width: 60em) {
#wrapper {
margin: 0;
width: 100%;
max-width: 100%;
background: none;
}
#header {
}
.container {
max-width: 1340px;
width: 92%;
margin: 0 auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#wrap {
padding: 1.5em 0;
}
}
@media only screen and (max-width: 70em) {
.container {
width: 94%;
}
}
@media only screen and (max-width: 65em) {
.container {
width: 96%;
}
#wrapper {
background: #fff;
}
}
@media only screen and (max-width: 60em) {
.container {
width: 100%;
margin: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#wrap {
padding: 1.5em 1.5em 0;
}
}
</style>';
}
}
示例2: dynamicnews_excerpt_more
function dynamicnews_excerpt_more($more)
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Return Excerpt Text
if (isset($theme_options['excerpt_text']) and $theme_options['excerpt_text'] == true) {
return ' [...]';
} else {
return '';
}
}
示例3: dynamicnews_custom_jscript_slider
function dynamicnews_custom_jscript_slider()
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Set Parameters array
$params = array();
// Define Slider Animation
if (isset($theme_options['slider_animation'])) {
$params['animation'] = esc_attr($theme_options['slider_animation']);
}
// Passing Parameters to Javascript
wp_localize_script('dynamicnewslite-jquery-frontpage_slider', 'dynamicnews_slider_params', $params);
}
示例4: dynamicnews_fonts_url
function dynamicnews_fonts_url()
{
$fonts_url = '';
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Only embed Google Fonts if not deactivated
if (!(isset($theme_options['deactivate_google_fonts']) and $theme_options['deactivate_google_fonts'] == true)) {
// Set Default Fonts
$font_families = array('Droid Sans:400,700', 'Francois One');
// Set Google Font Query Args
$query_args = array('family' => urlencode(implode('|', $font_families)), 'subset' => urlencode('latin,latin-ext'));
// Create Fonts URL
$fonts_url = add_query_arg($query_args, '//fonts.googleapis.com/css');
}
return apply_filters('dynamicnews_google_fonts_url', $fonts_url);
}
示例5: dynamicnews_display_post_navigation
function dynamicnews_display_post_navigation()
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
if (true == $theme_options['post_navigation']) {
the_post_navigation(array('prev_text' => '« %title', 'next_text' => '%title »'));
}
}
示例6: get_header
<?php
get_header();
?>
<?php
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
?>
<div id="wrap" class="container clearfix">
<section id="content" class="primary" role="main">
<?php
if (have_posts()) {
?>
<h2 id="search-title" class="archive-title">
<?php
printf(__('Search Results for: %s', 'dynamicnewslite'), '<span>' . get_search_query() . '</span>');
?>
</h2>
<?php
while (have_posts()) {
the_post();
get_template_part('content', $theme_options['posts_length']);
}
dynamicnews_display_pagination();
} else {
?>
示例7: dynamicnews_display_postinfo_single
function dynamicnews_display_postinfo_single()
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Display Date unless user has deactivated it via settings
if (isset($theme_options['meta_tags']) and $theme_options['meta_tags'] == true) {
$tag_list = get_the_tag_list('', ', ');
if ($tag_list) {
?>
<span class="meta-tags">
<?php
printf(__('tagged with %1$s', 'dynamic-news-lite'), $tag_list);
?>
</span>
<?php
}
}
// Display Categories
dynamicnews_display_postinfo_index();
}
示例8: dynamicnews_display_thumbnail_single
function dynamicnews_display_thumbnail_single()
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Display Post Thumbnail if activated
if (isset($theme_options['post_thumbnails_single']) and $theme_options['post_thumbnails_single'] == true) {
the_post_thumbnail('featured_image');
}
}
示例9: dynamicnews_css_layout
function dynamicnews_css_layout()
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
// Change Layout to wide if activated
if (isset($theme_options['layout']) and $theme_options['layout'] == 'wide') {
echo '<style type="text/css">
@media only screen and (min-width: 60em) {
#wrapper {
margin: 0;
width: 100%;
max-width: 100%;
background: none;
}
#header {
padding: 3em 0.5em;
}
.container {
max-width: 1340px;
width: 92%;
margin: 0 auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#wrap {
padding: 1.5em 0;
}
}
@media only screen and (max-width: 70em) {
.container {
width: 94%;
}
}
@media only screen and (max-width: 65em) {
.container {
width: 96%;
}
#wrapper {
background: #fff;
}
}
@media only screen and (max-width: 60em) {
.container {
width: 100%;
margin: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#wrap {
padding: 1.5em 1.5em 0;
}
}
</style>';
}
// Switch Sidebar to left
if (isset($theme_options['sidebar']) and $theme_options['sidebar'] == 'left-sidebar') {
echo '<style type="text/css">
@media only screen and (min-width: 60em) {
#content {
float: right;
padding-right: 0;
padding-left: 1.5em;
}
#sidebar {
float: left;
}
}
</style>';
}
}