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


PHP get_tarski_option函数代码示例

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


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

示例1: _tarski_list_header_images

/**
 * Return a list of header images, both from the Tarski directory and the child
 * theme (if one is being used).
 *
 * @uses get_tarski_option
 * @uses wp_get_theme
 * @uses get_template_directory_uri
 * @uses get_stylesheet_directory_uri
 *
 * @return array
 */
function _tarski_list_header_images()
{
    $headers = array();
    $dirs = array('Tarski' => get_template_directory());
    $current = get_tarski_option('header');
    $theme = wp_get_theme();
    if (strlen($theme->Template) > 0) {
        $dirs[$theme->Name] = get_stylesheet_directory();
    }
    foreach ($dirs as $theme_name => $dir) {
        $dirpath = $dir . '/headers';
        if (is_dir($dirpath)) {
            $header_dir = dir($dirpath);
        } else {
            continue;
        }
        while ($file = $header_dir->read()) {
            if (preg_match('/^[^.].+\\.(jpg|png|gif)/', $file) && !preg_match('/-thumb\\.(jpg|png|gif)$/', $file)) {
                $name = $theme_name . '/' . $file;
                $id = 'header_' . preg_replace('/[^a-z_]/', '_', strtolower($name));
                $path = $dir == get_template_directory() ? '%1$s' : '%2$s';
                $thumb = preg_replace('/(\\.(?:png|gif|jpg))/', '-thumb\\1', $file);
                $uri = $dir == get_template_directory() ? get_template_directory_uri() : get_stylesheet_directory_uri();
                $is_current = is_string($current) && $current == $file || $current[0] == $theme_name && $current[1] == $file;
                $headers[] = array('name' => $name, 'id' => $id, 'lid' => 'for_' . $id, 'path' => "{$uri}/headers/{$file}", 'current' => $is_current, 'thumb' => "{$uri}/headers/{$thumb}", 'description' => $name, 'url' => "{$path}/headers/{$file}", 'thumbnail_url' => "{$path}/headers/{$thumb}");
            }
        }
    }
    return $headers;
}
开发者ID:aleksking,项目名称:sherrill,代码行数:41,代码来源:core.php

示例2: tarski_doctitle

/**
 * Returns the document title.
 *
 * The order (site name first or last) can be set on the Tarski Options page.
 * While the function ultimately returns a string, please note that filters
 * are applied to an array! This allows plugins to easily alter any aspect
 * of the title. For example, one might write a plugin to change the separator.
 *
 * @since 1.5
 * @deprecated 3.2.0
 *
 * @param string $sep
 * @return string
 *
 * @hook filter tarski_doctitle
 * Filter document titles.
 */
function tarski_doctitle($sep = '·')
{
    _deprecated_function('wp_title', '3.2.0');
    $site_name = get_bloginfo('name');
    $content = trim(wp_title('', false));
    if (is_404()) {
        $content = sprintf(__('Error %s', 'tarski'), '404');
    } elseif (get_option('show_on_front') == 'posts' && is_home()) {
        $content = get_bloginfo('description', 'display');
    } elseif (is_search()) {
        $content = sprintf(__('Search results for %s', 'tarski'), esc_html(get_search_query()));
    } elseif (is_month()) {
        $content = single_month_title(' ', false);
    } elseif (is_tag()) {
        $content = multiple_tag_titles();
    }
    $elements = strlen($content) > 0 ? array('site_name' => $site_name, 'separator' => $sep, 'content' => $content) : array('site_name' => $site_name);
    if (get_tarski_option('swap_title_order')) {
        $elements = array_reverse($elements, true);
    }
    // Filters should return an array
    $elements = apply_filters('tarski_doctitle', $elements);
    // But if they don't, it won't try to implode
    if (is_array($elements)) {
        $doctitle = implode(' ', $elements);
    }
    echo $doctitle;
}
开发者ID:aleksking,项目名称:sherrill,代码行数:45,代码来源:deprecated.php

示例3: tarski_author_posts_link

/**
 * tarski_author_posts_link() - If site has more than one author, output a link to that author's archive page.
 * 
 * @global object $authordata
 * @return string
 */
function tarski_author_posts_link()
{
    global $authordata;
    if (get_tarski_option('show_authors')) {
        printf(__(' by ', 'tarski') . '<span class="vcard author"><a href="%1$s" title="%2$s" class="url fn">%3$s</a></span>', get_author_posts_url($authordata->ID, $authordata->user_nicename), sprintf(__('Articles by %s', 'tarski'), attribute_escape(get_the_author())), get_the_author());
    }
}
开发者ID:jeremylightsmith,项目名称:blog,代码行数:13,代码来源:author_helper.php

示例4: TarskiVersion

 /**
  * TarskiVersion() - constructor for the TarskiVersion class.
  * 
  * @since 2.4
  */
 function TarskiVersion()
 {
     $this->current_version_number();
     $this->messages = array('unchecked' => array('class' => 'disabled', 'body' => sprintf(__('Update notification is disabled, so no attempt was made to access the update server. Your installed version is %s.', 'tarski'), "<strong>{$this->current}</strong>")), 'error' => array('class' => 'problem', 'body' => sprintf(__('An error occurred while attempting to access the update server. Your installed version is %s.', 'tarski'), "<strong>{$this->current}</strong>")), 'no_connection' => array('class' => 'problem', 'body' => sprintf(__('No connection to update server. Your installed version is %s.', 'tarski'), "<strong>{$this->current}</strong>")));
     if (get_tarski_option('update_notification')) {
         $this->version_feed_data();
         $this->latest_version_number();
         $this->latest_version_link();
         $this->version_status();
         $this->latest_version_summary();
         $this->messages = array_merge($this->messages, array('current' => array('class' => '', 'body' => sprintf(__('Your version of Tarski (%s) is up to date.', 'tarski'), "<strong>{$this->current}</strong>")), 'older' => array('class' => 'update-available', 'body' => sprintf(__('Version %1$s of the Tarski theme %2$s. Your installed version is %3$s.', 'tarski'), "<strong>{$this->latest}</strong>", '<a href="' . $this->latest_link . '">' . __('is now available', 'tarski') . '</a>', "<strong>{$this->current}</strong>") . "\n\n{$this->latest_summary}"), 'newer' => array('class' => '', 'body' => sprintf(__('You appear to be running a development version of Tarski (%1$s). Please ensure you %2$s.', 'tarski'), "<strong>{$this->current}</strong>", '<a href="http://tarskitheme.com/help/updates/svn/">' . __('stay updated', 'tarski') . '</a>'))));
     }
 }
开发者ID:nihad,项目名称:tarski,代码行数:18,代码来源:version.php

示例5: stylesheets

 /**
  * Generate links to the various Tarski stylesheets.
  * 
  * @hook filter tarski_style_array
  * Filter the array of stylesheet attributes from which the stylesheet
  * links are generated.
  * 
  * @hook filter tarski_stylesheets
  * Filter the raw stylesheet link elements before they're printed to
  * the document.
  */
 function stylesheets()
 {
     $style_array = array('main' => array('url' => get_bloginfo('stylesheet_url')), 'screen' => array('url' => get_bloginfo('template_directory') . '/library/css/screen.css', 'media' => 'screen,projection'), 'print' => array('url' => get_bloginfo('template_directory') . '/library/css/print.css', 'media' => 'print'));
     if (get_tarski_option('style')) {
         $style_array['alternate'] = array('url' => get_bloginfo('template_directory') . '/styles/' . get_tarski_option('style'));
     }
     $style_array = apply_filters('tarski_style_array', $style_array);
     if (is_array($style_array)) {
         foreach ($style_array as $type => $values) {
             if (is_array($values) && $values['url']) {
                 if (empty($values['media'])) {
                     $values['media'] = 'all';
                 }
                 $stylesheets[$type] = sprintf('<link rel="stylesheet" href="%1$s" type="text/css" media="%2$s" />', $values['url'], $values['media']);
             }
         }
     }
     $this->stylesheets = apply_filters('tarski_stylesheets', $stylesheets);
 }
开发者ID:nihad,项目名称:tarski,代码行数:30,代码来源:asset.php

示例6: load_theme_textdomain

<?php

// Localisation
load_theme_textdomain('tarski');
// Custom header image
define('HEADER_TEXTCOLOR', '');
define('HEADER_IMAGE', '%s/headers/' . get_tarski_option('header'));
// %s is theme directory URI
define('HEADER_IMAGE_WIDTH', 720);
define('HEADER_IMAGE_HEIGHT', 180);
define('NO_HEADER_TEXT', true);
add_custom_image_header('', 'tarski_admin_header_style');
// Widgets
register_sidebar(array('id' => 'sidebar-main', 'name' => __('Main sidebar', 'tarski'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
register_sidebar(array('id' => 'sidebar-post-and-page', 'name' => __('Post and page sidebar', 'tarski'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
register_sidebar(array('id' => 'footer-main', 'name' => __('Footer main widgets', 'tarski'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
register_sidebar(array('id' => 'footer-sidebar', 'name' => __('Footer sidebar widgets', 'tarski'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
// Tarski widgets
register_sidebar_widget(__('Recent Articles', 'tarski'), 'tarski_recent_entries');
// Widget filters
add_filter('widget_text', 'tarski_content_massage');
add_filter('widget_text', 'tarski_widget_text_wrapper');
add_filter('widget_links_args', 'tarski_widget_links_args');
if (is_admin()) {
    // Generate messages
    add_filter('tarski_messages', 'tarski_update_notifier');
    // Output messages on dashboard and options page
    add_action('admin_notices', 'tarski_messages');
    // Tarski Options page
    add_action('admin_print_styles', 'tarski_admin_style');
    add_action('admin_print_scripts-design_page_tarski-options', 'tarski_inject_scripts');
开发者ID:jeremylightsmith,项目名称:blog,代码行数:31,代码来源:launcher.php

示例7: while

<?php

while (have_posts()) {
    the_post();
    ?>
	
	<?php 
    if (get_tarski_option('asidescategory') && in_category(get_tarski_option('asidescategory'))) {
        // Aside loop
        ?>
		
		<div class="aside hentry" id="p-<?php 
        the_ID();
        ?>
">
			
			<div class="content entry-content"><?php 
        the_content(__('Read the rest of this entry &raquo;', 'tarski'));
        ?>
</div>
			
			<p class="meta"><span class="date updated"><?php 
        the_time(get_option('date_format'));
        ?>
</span><?php 
        tarski_author_posts_link();
        ?>
 | <a class="comments-link" rel="bookmark" href="<?php 
        the_permalink();
        ?>
"><?php 
开发者ID:jeremylightsmith,项目名称:blog,代码行数:31,代码来源:loop.php

示例8: tarski_update_notifier

/**
 * tarski_update_notifier() - Performs version checks and outputs the update notifier.
 * 
 * Creates a new Version object, checks the latest and current
 * versions, and lets the user know whether or not their version
 * of Tarski needs updating. The way it displays varies slightly
 * between the WordPress Dashboard and the Tarski Options page.
 * @since 2.0
 * @param string $location
 * @return string
 */
function tarski_update_notifier($messages)
{
    global $plugin_page;
    if (!is_array($messages)) {
        $messages = array();
    }
    $version = new Version();
    $version->current_version_number();
    $svn_link = 'http://tarskitheme.com/help/updates/svn/';
    // Update checking only performed when remote files can be accessed
    if (can_get_remote()) {
        // Only performs the update check when notification is enabled
        if (get_tarski_option('update_notification')) {
            $version->latest_version_number();
            $version->latest_version_link();
            $version->version_status();
            if ($version->status == 'older') {
                $messages[] = sprintf(__('A new version of the Tarski theme, version %1$s %2$s. Your installed version is %3$s.', 'tarski'), "<strong>{$version->latest}</strong>", '<a href="' . $version->latest_link . '">' . __('is now available', 'tarski') . '</a>', "<strong>{$version->current}</strong>");
            } elseif ($plugin_page == 'tarski-options') {
                switch ($version->status) {
                    case 'current':
                        $messages[] = sprintf(__('Your version of Tarski (%s) is up to date.', 'tarski'), "<strong>{$version->current}</strong>");
                        break;
                    case 'newer':
                        $messages[] = sprintf(__('You appear to be running a development version of Tarski (%1$s). Please ensure you %2$s.', 'tarski'), "<strong>{$version->current}</strong>", "<a href=\"{$svn_link}\">" . __('stay updated', 'tarski') . '</a>');
                        break;
                    case 'no_connection':
                    case 'error':
                        $messages[] = sprintf(__('No connection to update server. Your installed version is %s.', 'tarski'), "<strong>{$version->current}</strong>");
                        break;
                }
            }
        } elseif ($plugin_page == 'tarski-options') {
            $messages[] = sprintf(__('Update notification for Tarski is disabled. Your installed version is %s.', 'tarski'), "<strong>{$version->current}</strong>");
        }
    }
    return $messages;
}
开发者ID:jeremylightsmith,项目名称:blog,代码行数:49,代码来源:admin_helper.php

示例9: _e

<select name="asides_category" id="asides_category">
	<option <?php 
if (!get_tarski_option('asidescategory')) {
    echo 'selected="selected" ';
}
?>
value="0"><?php 
_e('Disable asides', 'tarski');
?>
</option>
	<?php 
$asides_cats =& get_categories('hide_empty=0');
if ($asides_cats) {
    foreach ($asides_cats as $cat) {
        if ($cat->cat_ID == get_tarski_option('asidescategory')) {
            $status = 'selected ="selected" ';
        } else {
            $status = false;
        }
        echo '<option ' . $status . 'value="' . $cat->cat_ID . '">' . $cat->cat_name . '</option>';
    }
}
?>
</select>
<p><?php 
echo __('This option will make Tarski display posts from the selected category in the ', 'tarski') . '<a href="http://photomatt.net/2004/05/19/asides/">' . __('Asides', 'tarski') . '</a>' . __(' format. Asides are short posts, usually only a single paragraph, and Tarski displays them in a condensed format without titles.', 'tarski');
?>
</p>
开发者ID:nihad,项目名称:tarski,代码行数:28,代码来源:asides_category.php

示例10: the_content

        </div> <!-- /meta -->
        
        <?php 
        if (get_the_content() != "") {
            ?>
            <div class="content">
                <?php 
            the_content();
            ?>
            </div> <!-- /content -->
        <?php 
        }
        ?>
        <div class="bookmarks">
            <?php 
        wp_list_bookmarks(array('exclude_category' => get_tarski_option('nav_extlinkcat'), 'category_before' => '', 'category_after' => '', 'title_before' => '<h3>', 'title_after' => '</h3>', 'show_images' => 0, 'show_description' => 0));
        ?>
        </div> <!-- /bookmarks -->

        <?php 
        th_postend();
        ?>
    </div> <!-- /primary -->
    
<?php 
    }
}
?>


开发者ID:aleksking,项目名称:sherrill,代码行数:28,代码来源:links.php

示例11: _e

}
if ($style_dir && $styles) {
    ?>
	<select name="alternate_style" id="alternate_style" size="1">
		<option<?php 
    if (!get_tarski_option('style')) {
        echo ' selected="selected"';
    }
    ?>
 value=""><?php 
    _e('Default style', 'tarski');
    ?>
</option>
		<?php 
    foreach ($styles as $style) {
        if (get_tarski_option('style') == $style) {
            $status = ' selected="selected"';
        } else {
            $status = false;
        }
        printf('<option%1$s value="%2$s">%3$s</option>' . "\n", $status, $style, $style);
    }
    ?>
	</select>
<?php 
}
?>

<?php 
if (detectWPMU()) {
    // WPMU users
开发者ID:nihad,项目名称:tarski,代码行数:31,代码来源:alternate_style.php

示例12: tarski_options_block

?>
		</div>
		
		<div class="span">
			<?php 
tarski_options_block('header_images', __('Header Images', 'tarski'));
?>
		</div>
		
		<div class="primary">
			<?php 
tarski_options_fn_block('tarski_miscellaneous_options', __('Miscellaneous Options', 'tarski'));
?>
		</div>
	</form>
	
	<?php 
if (get_option('tarski_options') && !get_tarski_option('deleted')) {
    ?>
		<div class="secondary">
			<?php 
    tarski_options_block('reset_options', __('Reset Options', 'tarski'));
    ?>
		</div>
	<?php 
}
?>
	
	<div class="clearer"></div>
</div>
开发者ID:nihad,项目名称:tarski,代码行数:30,代码来源:options_page.php

示例13: add_post_tags

/**
 * Append tags to posts.
 *
 * @since 2.0
 *
 * @return void
 */
function add_post_tags()
{
    if (is_404()) {
        return;
    }
    $aside = has_post_format('aside') || in_category(get_tarski_option('asidescategory'));
    if (is_singular() || get_tarski_option('tags_everywhere') && !$aside) {
        $tag_html = '<p class="tagdata"><strong>' . __('Tags', 'tarski') . ':</strong> ';
        the_tags($tag_html, ', ', '</p>' . "\n");
    }
}
开发者ID:aleksking,项目名称:sherrill,代码行数:18,代码来源:tag_helper.php

示例14: printf

    ?>
		<?php 
}
?>
	</select>
	<p><?php 
printf(__('You can add or edit links on the %s page. We recommend creating a link category specifically for the links you want displayed in your navbar, but you can use any category.', 'tarski'), '<a href="' . admin_url('link-manager.php') . '">' . __('Manage Links', 'tarski') . '</a>');
?>
</p>
</div>

<div class="option">
	<label for="opt-nav-homename"><?php 
_e('Rename your &#8216;Home&#8217; link', 'tarski');
?>
</label>
	<input type="hidden" name="home_link_name" value="Home" />
	<input class="text" type="text" id="opt-nav-homename" name="home_link_name" value="<?php 
if (get_tarski_option('home_link_name')) {
    echo get_tarski_option('home_link_name');
} else {
    _e('Home', 'tarski');
}
?>
" />
	<p><?php 
_e('This link is not displayed when you have a static front page.', 'tarski');
?>
</p>
</div>
开发者ID:nihad,项目名称:tarski,代码行数:30,代码来源:nav_options.php

示例15: _tarski_list_alternate_styles

<?php

$styles = _tarski_list_alternate_styles();
if (count($styles) > 0) {
    ?>
    <select name="alternate_style" id="alternate_style" size="1">
        <option<?php 
    if (!get_tarski_option('style')) {
        echo ' selected="selected"';
    }
    ?>
 value=""><?php 
    _e('Default style', 'tarski');
    ?>
</option>
        <?php 
    foreach ($styles as $style) {
        printf('<option%1$s value="%2$s">%3$s</option>' . "\n", $style['current'] ? ' selected="selected"' : '', $style['name'], $style['public']);
    }
    ?>
    </select>
<?php 
}
?>

<?php 
if (is_multisite()) {
    // WP Multisite users
    ?>
    <p><?php 
    _e('Tarski allows you to select an alternate style that modifies the default one. Choose from the list above.', 'tarski');
开发者ID:aleksking,项目名称:sherrill,代码行数:31,代码来源:alternate_style.php


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