本文整理汇总了PHP中td_util::get_option方法的典型用法代码示例。如果您正苦于以下问题:PHP td_util::get_option方法的具体用法?PHP td_util::get_option怎么用?PHP td_util::get_option使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_util
的用法示例。
在下文中一共展示了td_util::get_option方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: td_add_js_typekit
function td_add_js_typekit()
{
$td_fonts_js_buffer = stripcslashes(td_util::get_option('td_fonts_js_buffer'));
if (!empty($td_fonts_js_buffer)) {
echo $td_fonts_js_buffer;
}
}
示例2: render
function render()
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes(array("td_mod_mega_menu"));
?>
">
<div class="td-module-image">
<?php
echo $this->get_image('td_218x150');
?>
<?php
if (td_util::get_option('tds_category_module_mega_menu') == 'yes') {
echo $this->get_category();
}
?>
</div>
<div class="item-details">
<?php
echo $this->get_title(12);
?>
</div>
</div>
<?php
return ob_get_clean();
}
示例3: render
function render($order_no)
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes(array("td-big-grid-post-{$order_no}", "td-big-grid-post", "td-small-thumb"));
?>
">
<?php
echo $this->get_image('td_265x198');
?>
<div class="td-meta-info-container">
<div class="td-meta-align">
<div class="td-big-grid-meta">
<?php
if (td_util::get_option('tds_category_module_mx6') == 'yes') {
echo $this->get_category();
}
?>
<?php
echo $this->get_title();
?>
</div>
</div>
</div>
</div>
<?php
return ob_get_clean();
}
示例4: render
function render()
{
ob_start();
?>
<div class="td_mod_related_posts">
<div class="td-module-image">
<?php
echo $this->get_image('td_238x178');
?>
<?php
if (td_util::get_option('tds_category_module_1') == 'yes') {
echo $this->get_category();
}
?>
</div>
<div class="item-details">
<?php
echo $this->get_title(25);
?>
</div>
</div>
<?php
return ob_get_clean();
}
示例5: render
function render()
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes();
?>
">
<div class="td-module-image">
<?php
echo $this->get_image('td_218x150');
?>
<?php
if (td_util::get_option('tds_category_module_mx4') == 'yes') {
echo $this->get_category();
}
?>
</div>
<?php
echo $this->get_title();
?>
</div>
<?php
return ob_get_clean();
}
示例6: render_posts_to_buffer
/**
* we have to render the block first in the buffer, to avoid two queries.
* - IF there are posts, we already have the buffer with the block's content and we don't have to make another query
* - IF there are no posts, we ignore the buffer and we can also remove the wraps in the child classes of this class
*/
protected function render_posts_to_buffer()
{
// get the global category top posts grid style setting
$td_grid_style = td_util::get_option('tds_category_td_grid_style');
$limit = td_api_category_top_posts_style::_helper_get_posts_shown_in_the_loop();
$block_name = td_api_category_top_posts_style::get_key(get_class($this), 'td_block_name');
// overwrite the $td_grid_style if the setting for this category was changed
$td_grid_style_per_category_setting = td_util::get_category_option(td_global::$current_category_obj->cat_ID, 'tdc_category_td_grid_style');
if ($td_grid_style_per_category_setting != '') {
$td_grid_style = $td_grid_style_per_category_setting;
}
// we have to have a default grid, there seems to be a problem with the grid styles
if (empty($td_grid_style)) {
$td_grid_style = 'td-grid-style-1';
}
//parameters to filter to for big grid
$atts_for_big_grid = array('limit' => $limit, 'category_id' => td_global::$current_category_obj->cat_ID, 'sort' => get_query_var('filter_by'), 'td_grid_style' => $td_grid_style);
//show the big grid
$block_instance = td_global_blocks::get_instance($block_name);
$this->rendered_block_buffer = $block_instance->render($atts_for_big_grid);
$this->rendered_posts_count = $block_instance->td_query->post_count;
if ($this->rendered_posts_count > 0) {
td_global::$custom_no_posts_message = false;
}
// use class_name($this) to get the id :)
}
示例7: render
function render()
{
ob_start();
?>
<div class="td_mod_wrap td_mod8 <?php
echo $this->get_no_thumb_class();
?>
" <?php
echo $this->get_item_scope();
?>
>
<?php
echo $this->get_image('art-big-1col');
?>
<div class="item-details">
<?php
echo $this->get_title(td_util::get_option('tds_mod8_title_excerpt'));
?>
<div class="meta-info">
<?php
//echo $this->get_author();
?>
<?php
echo $this->get_date();
?>
<?php
echo $this->get_commentsAndViews();
?>
</div>
<p><div class="td-post-text-excerpt"><?php
echo $this->get_excerpt(td_util::get_option('tds_mod8_content_excerpt'));
?>
</div></p>
<div class="more-link-wrap wpb_button td_read_more clearfix">
<a href="<?php
echo $this->href;
?>
"><?php
echo __td('Continue', TD_THEME_NAME);
?>
</a>
</div>
</div>
<?php
echo $this->get_item_scope_meta();
?>
</div>
<?php
return ob_get_clean();
}
示例8: render
function render()
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes();
?>
" <?php
echo $this->get_item_scope();
?>
>
<div class="td-module-image">
<?php
echo $this->get_image('td_324x160');
?>
<?php
if (td_util::get_option('tds_category_module_2') == 'yes') {
echo $this->get_category();
}
?>
</div>
<?php
echo $this->get_title();
?>
<div class="td-module-meta-info">
<?php
echo $this->get_author();
?>
<?php
echo $this->get_date();
?>
<?php
echo $this->get_comments();
?>
</div>
<div class="td-excerpt">
<?php
echo $this->get_excerpt();
?>
</div>
<?php
echo $this->get_quotes_on_blocks();
?>
<?php
echo $this->get_item_scope_meta();
?>
</div>
<?php
return ob_get_clean();
}
示例9: render
function render()
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes();
?>
">
<div class="meta-info-container">
<?php
echo $this->get_image('td_696x385');
?>
<div class="td-module-meta-info">
<div class="td-module-meta-holder">
<?php
echo $this->get_title();
?>
<?php
if (td_util::get_option('tds_category_module_14') == 'yes') {
echo $this->get_category();
}
?>
<?php
echo $this->get_author();
?>
<?php
echo $this->get_date();
?>
<?php
echo $this->get_comments();
?>
</div>
</div>
</div>
<div class="td-excerpt">
<?php
echo $this->get_excerpt();
?>
<div class="td-read-more">
<a href="<?php
echo $this->href;
?>
"><?php
echo __td('Read more', TD_THEME_NAME);
?>
</a>
</div>
</div>
</div>
<?php
return ob_get_clean();
}
示例10: render
function render()
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes();
?>
" <?php
echo $this->get_item_scope();
?>
>
<div class="item-details">
<?php
echo $this->get_title();
?>
<div class="td-module-meta-info">
<?php
if (td_util::get_option('tds_category_module_13') == 'yes') {
echo $this->get_category();
}
?>
<?php
echo $this->get_author();
?>
<?php
echo $this->get_date();
?>
<?php
echo $this->get_comments();
?>
</div>
<?php
echo $this->get_image('td_696x0');
?>
<div class="td-read-more">
<a href="<?php
echo $this->href;
?>
"><?php
echo __td('Read more', TD_THEME_NAME);
?>
</a>
</div>
</div>
<?php
echo $this->get_item_scope_meta();
?>
</div>
<?php
return ob_get_clean();
}
示例11: load_setting
function load_setting($name, $append_to_value = '')
{
//echo 'rara1';
$current_customizer_value = td_util::get_option('tds_' . $name);
if (!empty($current_customizer_value)) {
$current_customizer_value .= $append_to_value;
}
$this->load_setting_raw($name, $current_customizer_value);
}
示例12: td_add_fonts_css_buffer
/**
* add td_fonts_css_buffer from database into the source of the page
*
* td_fonts_css_buffer : used to store the css generated for custom font files in the database
*
* used in : @see td_css_generator.php
*/
public static function td_add_fonts_css_buffer()
{
$td_fonts_css_buffer = td_util::get_option('td_fonts_css_buffer');
if (!empty($td_fonts_css_buffer)) {
return $td_fonts_css_buffer . "\n";
} else {
return '';
}
}
示例13: render
function render()
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes(array_merge(get_post_class()));
?>
" <?php
echo $this->get_item_scope();
?>
>
<div class="item-details">
<?php
echo $this->get_title();
?>
<div class="td-module-meta-info">
<?php
if (td_util::get_option('tds_category_module_15') == 'yes') {
echo $this->get_category();
}
?>
<?php
echo $this->get_author();
?>
<?php
echo $this->get_date();
?>
<?php
echo $this->get_comments();
?>
</div>
<?php
echo $this->get_image('td_696x0');
?>
<div class="td-post-text-content td-post-content">
<?php
echo $this->get_content();
?>
</div>
</div>
<?php
echo $this->get_item_scope_meta();
?>
</div>
<?php
return ob_get_clean();
}
示例14: get_comments
function get_comments()
{
$buffy = '';
if (td_util::get_option('tds_p_show_comments') != 'hide') {
$buffy .= '<div class="td-post-comments"><i class="td-icon-comments"></i>';
$buffy .= '<a href="' . get_comments_link($this->post->ID) . '">';
$buffy .= get_comments_number($this->post->ID);
$buffy .= '</a>';
$buffy .= '</div>';
}
return $buffy;
}
示例15: render
function render()
{
ob_start();
?>
<div class="<?php
echo $this->get_module_classes();
?>
" <?php
echo $this->get_item_scope();
?>
>
<?php
echo $this->get_image('td_218x150');
?>
<div class="item-details">
<?php
echo $this->get_title();
?>
<div class="td-module-meta-info">
<?php
if (td_util::get_option('tds_category_module_10') == 'yes') {
echo $this->get_category();
}
?>
<?php
// echo $this->get_author();
?>
<?php
// echo $this->get_date();
?>
<?php
// echo $this->get_comments();
?>
</div>
<div class="td-excerpt">
<?php
echo $this->get_excerpt();
?>
</div>
</div>
<?php
echo $this->get_item_scope_meta();
?>
</div>
<?php
return ob_get_clean();
}