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


PHP kopa_get_domain函数代码示例

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


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

示例1: __construct

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 public function __construct($id_base, $name, $widget_options = array(), $control_options = array())
 {
     parent::__construct($id_base, $name, $widget_options, $control_options);
     $g_style = array('size' => 4, 'fields' => array());
     $g_style['fields']['title'] = array('type' => 'text', 'id' => 'title', 'name' => 'title', 'default' => '', 'classes' => array(), 'label' => __('Title', kopa_get_domain()), 'help' => NULL);
     $g_style['fields']['posts_per_page'] = array('type' => 'number', 'id' => 'posts_per_page', 'name' => 'posts_per_page', 'default' => 4, 'classes' => array(), 'label' => __('Number of posts', kopa_get_domain()), 'help' => NULL);
     $g_style['fields']['excerpt_character_limit'] = array('type' => 'number', 'id' => 'excerpt_character_limit', 'name' => 'excerpt_character_limit', 'default' => 100, 'classes' => array(), 'label' => __('Excerpt character limit', kopa_get_domain()), 'help' => NULL);
     $g_style['fields']['is_hide_title'] = array('type' => 'checkbox', 'id' => 'is_hide_title', 'name' => 'is_hide_title', 'default' => 'false', 'classes' => array(), 'label' => __('Is hide title', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_style['fields']['is_hide_excerpt'] = array('type' => 'checkbox', 'id' => 'is_hide_excerpt', 'name' => 'is_hide_excerpt', 'default' => 'false', 'classes' => array(), 'label' => __('Is hide excerpt', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_style['fields']['is_hide_created_date'] = array('type' => 'checkbox', 'id' => 'is_hide_created_date', 'name' => 'is_hide_created_date', 'default' => 'false', 'classes' => array(), 'label' => __('Is hide created date', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_style['fields']['is_hide_comments'] = array('type' => 'checkbox', 'id' => 'is_hide_comments', 'name' => 'is_hide_comments', 'default' => 'false', 'classes' => array(), 'label' => __('Is hide comments', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_style['fields']['is_hide_views'] = array('type' => 'checkbox', 'id' => 'is_hide_views', 'name' => 'is_hide_views', 'default' => 'false', 'classes' => array(), 'label' => __('Is hide views', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_style['fields']['is_hide_likes'] = array('type' => 'checkbox', 'id' => 'is_hide_likes', 'name' => 'is_hide_likes', 'default' => 'false', 'classes' => array(), 'label' => __('Is hide likes', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_style['fields']['is_hide_readmore'] = array('type' => 'checkbox', 'id' => 'is_hide_readmore', 'name' => 'is_hide_readmore', 'default' => 'false', 'classes' => array(), 'label' => __('Is hide readmore', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_query = array('size' => 8, 'fields' => array());
     $g_query['fields']['category'] = array('type' => 'taxonomy', 'id' => 'category', 'name' => 'category', 'default' => '', 'classes' => array(), 'label' => __('Categories', kopa_get_domain()), 'help' => NULL, 'taxonomy' => 'category', 'attributes' => array('multiple' => 'multiple'));
     $g_query['fields']['post_tag'] = array('type' => 'taxonomy', 'id' => 'post_tag', 'name' => 'post_tag', 'default' => '', 'classes' => array(), 'label' => __('Tags', kopa_get_domain()), 'help' => NULL, 'taxonomy' => 'post_tag', 'attributes' => array('multiple' => 'multiple'));
     $g_query['fields']['post_tag'] = array('type' => 'taxonomy', 'id' => 'post_tag', 'name' => 'post_tag', 'default' => '', 'classes' => array(), 'label' => __('Tags', kopa_get_domain()), 'help' => NULL, 'taxonomy' => 'post_tag', 'attributes' => array('multiple' => 'multiple'));
     $g_query['fields']['post_format'] = array('type' => 'taxonomy', 'id' => 'post_format', 'name' => 'post_format', 'default' => '', 'classes' => array(), 'label' => __('Post Format', kopa_get_domain()), 'help' => NULL, 'taxonomy' => 'post_format', 'attributes' => array('multiple' => 'multiple'));
     $g_query['fields']['orderby'] = array('type' => 'select', 'id' => 'orderby', 'name' => 'orderby', 'default' => 'date', 'classes' => array(), 'label' => __('Order by', kopa_get_domain()), 'help' => NULL, 'options' => array('date' => __('Latest news', kopa_get_domain()), 'popular' => __('Popular by view count', kopa_get_domain()), 'comment_count' => __('Most comments', kopa_get_domain()), 'rand' => __('Random', kopa_get_domain())));
     $g_query['fields']['relation'] = array('type' => 'checkbox', 'id' => 'relation', 'name' => 'relation', 'default' => 'false', 'classes' => array(), 'label' => __('Is combine condition by <i>Tags</i>, <i>Categories</i>, <i>Format</i>', kopa_get_domain()), 'help' => NULL, 'is_append_label_before_control' => false);
     $g_query['fields']['timestamp'] = array('type' => 'select', 'id' => 'timestamp', 'name' => 'timestamp', 'default' => '', 'classes' => array(), 'label' => __('Timestamp (ago)', kopa_get_domain()), 'help' => NULL, 'options' => array('' => __('-- Select --', kopa_get_domain()), '-1 week' => __('1 week', kopa_get_domain()), '-2 week' => __('2 weeks', kopa_get_domain()), '-3 week' => __('3 weeks', kopa_get_domain()), '-1 month' => __('1 months', kopa_get_domain()), '-2 month' => __('2 months', kopa_get_domain()), '-3 month' => __('3 months', kopa_get_domain()), '-4 month' => __('4 months', kopa_get_domain()), '-5 month' => __('5 months', kopa_get_domain()), '-6 month' => __('6 months', kopa_get_domain()), '-7 month' => __('7 months', kopa_get_domain()), '-8 month' => __('8 months', kopa_get_domain()), '-9 month' => __('9 months', kopa_get_domain()), '-10 month' => __('10 months', kopa_get_domain()), '-11 month' => __('11 months', kopa_get_domain()), '-1 year' => __('1 year', kopa_get_domain()), '-2 year' => __('2 years', kopa_get_domain()), '-3 year' => __('3 years', kopa_get_domain()), '-4 year' => __('4 years', kopa_get_domain()), '-5 year' => __('5 years', kopa_get_domain()), '-6 year' => __('6 years', kopa_get_domain()), '-7 year' => __('7 years', kopa_get_domain()), '-8 year' => __('8 years', kopa_get_domain()), '-9 year' => __('9 years', kopa_get_domain()), '-10 year' => __('10 years', kopa_get_domain())));
     $this->groups['col-1'] = $g_style;
     $this->groups['col-2'] = $g_query;
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:34,代码来源:posts.widget.class.php

示例2: kopa_options_contact

/**
 * 
 * @package Kopa
 * @subpackage Core
 * @author thethangtran <tranthethang@gmail.com>
 * @since 1.0.0
 *      
 */
function kopa_options_contact()
{
    $groups['info'] = array('icon' => '', 'title' => __('Contact Infomation', kopa_get_domain()), 'fields' => array());
    $groups['info']['fields'][] = array('type' => 'text', 'id' => 'contact_info_caption', 'name' => 'contact_info_caption', 'label' => __('Caption', kopa_get_domain()), 'help' => '', 'classes' => array('linedtextarea'), 'default' => __('Contact information', kopa_get_domain()));
    $groups['info']['fields'][] = array('type' => 'textarea', 'id' => 'contact_info_description', 'name' => 'contact_info_description', 'label' => __('Descripton', kopa_get_domain()), 'help' => '', 'classes' => array('linedtextarea'), 'attributes' => array('rows' => 10), 'default' => '');
    $groups['info']['fields'][] = array('type' => 'text', 'id' => 'contact_phone', 'name' => 'contact_phone', 'label' => __('Phone number', kopa_get_domain()), 'default' => '');
    $groups['info']['fields'][] = array('type' => 'text', 'id' => 'contact_fax', 'name' => 'contact_fax', 'label' => __('Fax number', kopa_get_domain()), 'default' => '');
    $groups['info']['fields'][] = array('type' => 'text', 'id' => 'contact_email', 'name' => 'contact_email', 'label' => __('Email(s)', kopa_get_domain()), 'default' => '');
    $groups['info']['fields'][] = array('type' => 'text', 'id' => 'contact_address', 'name' => 'contact_address', 'label' => __('Address', kopa_get_domain()), 'default' => '');
    $groups['info']['fields'][] = array('type' => 'text', 'id' => 'contact_map', 'name' => 'contact_map', 'label' => __('Google Map', kopa_get_domain()), 'help' => sprintf('Enter your google map code <code>latitude,longitude</code>. Example: <code>40.722868,-73.99739</code>. %s <a target="_blank" href="https://db.tt/p77FqjZC">%s</a>.', __('How to get it? Click', kopa_get_domain()), __('here', kopa_get_domain())), 'default' => '40.722868,-73.99739');
    $groups['info']['fields'][] = array('type' => 'media', 'id' => 'contact_map_marker', 'name' => 'contact_map_marker', 'label' => __('Gmap Marker', kopa_get_domain()), 'help' => __('You can download, and edit marker image from PSD file. Download <a href="https://db.tt/qssyQ4pY" target="_blank">here</a>', kopa_get_domain()), 'default' => get_template_directory_uri() . '/images/marker.png');
    /*
     * --------------------------------------------------
     * CONTACT FORM
     * --------------------------------------------------
     */
    $groups['form'] = array('icon' => '', 'title' => __('Contact Form', kopa_get_domain()), 'fields' => array());
    $groups['form']['fields'][] = array('type' => 'text', 'id' => 'contact_form_caption', 'name' => 'contact_form_caption', 'label' => __('Caption', kopa_get_domain()), 'help' => '', 'classes' => array('linedtextarea'), 'default' => __('Contact form', kopa_get_domain()));
    $groups['form']['fields'][] = array('type' => 'textarea', 'id' => 'contact_form_description', 'name' => 'contact_form_description', 'label' => __('Descripton', kopa_get_domain()), 'help' => '', 'classes' => array('linedtextarea'), 'attributes' => array('rows' => 10), 'default' => '');
    $groups['form']['fields'][] = array('type' => 'group', 'id' => 'recaptcha', 'name' => 'recaptcha', 'label' => __('reCaptcha', kopa_get_domain()), 'default' => '', 'sub_fields' => array(array('type' => 'select', 'id' => 'recaptcha_skin', 'name' => 'recaptcha_skin', 'label' => __('<code>SKIN</code>', kopa_get_domain()), 'help' => __('To view skins preview, click <a target="_blank" href="https://db.tt/cYvusoxp">here</a>.<br/>To create your public & private key, click <a target="_blank" href="http://www.google.com/recaptcha/whyrecaptcha">here</a>', kopa_get_domain()), 'default' => 'clean', 'value' => KopaOptions::get_option('recaptcha_skin', 'clean'), 'options' => array('off' => __('-- Hide --', kopa_get_domain()), 'clean' => __('Clean', kopa_get_domain()), 'red' => __('Red', kopa_get_domain()), 'white' => __('White', kopa_get_domain()), 'blackglass' => __('Black glass', kopa_get_domain())), 'classes' => array('kopa_sub_field_control', 'kopa_recaptcha_skin'), 'wrap_begin' => '<div class="kopa_sub_field_wrap">', 'wrap_end' => '</div>', 'label_begin' => '<div>', 'label_end' => '</div>', 'attributes' => array('onchange' => 'KopaThemeOptions.onChangeReCaptchaSkin(event, jQuery(this));')), array('type' => 'text', 'id' => 'recaptcha_public_key', 'name' => 'recaptcha_public_key', 'value' => KopaOptions::get_option('recaptcha_public_key'), 'default' => '6Lc6ou4SAAAAAF2yR3zRLTSljpTCPpdFRqWD5wXt', 'label' => __('<code>PUBLIC KEY</code>', kopa_get_domain()), 'classes' => array('kopa_sub_field_control'), 'wrap_begin' => '<div class="kopa_sub_field_wrap">', 'wrap_end' => '</div>'), array('type' => 'text', 'id' => 'recaptcha_private_key', 'name' => 'recaptcha_private_key', 'value' => KopaOptions::get_option('recaptcha_private_key'), 'default' => '6Lc6ou4SAAAAAO1_5edZqUythRWLGxgHGyDTYRUJ', 'label' => __('<code>PRIVATE KEY</code>', kopa_get_domain()), 'classes' => array('kopa_sub_field_control'), 'wrap_begin' => '<div class="kopa_sub_field_wrap">', 'wrap_end' => '</div>')));
    $groups['form']['fields'][] = array('type' => 'textarea', 'id' => 'contact_reply_template', 'name' => 'contact_reply_template', 'label' => __('Mail Reply Template', kopa_get_domain()), 'help' => 'Variable: <code>[contact_name]</code>, <code>[contact_email]</code>, <code>[contact_message]</code>', 'classes' => array('linedtextarea'), 'attributes' => array('rows' => 10), 'default' => '<p>Aloha!</p>
<p>You have a new message from  [contact_name] ([contact_email])</p>
<div>[contact_message]</div>
<p>Thanks!</p>');
    return apply_filters('kopa_options_contact', $groups);
}
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:34,代码来源:contact.php

示例3: get_control

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 protected function get_control()
 {
     $this->classes[] = 'kopa-ui-sidebar-manager';
     $this->classes[] = 'clearfix';
     $this->set_attribute('autocomplete', 'off');
     $html = sprintf('<div class="%s">', implode(' ', $this->classes));
     $html .= sprintf('<p class="kopa-sidebar-sub-caption">%s</p>', __('Add your sidebars below and then you can assign one of these sidebars from the individual posts, pages or archive, ..', kopa_get_domain()));
     $html .= '<p>';
     $html .= '<input type="text" class="form-control txt_sidebar_name" name="txt_sidebar_name" id="txt_sidebar_name" autocomplete="off">';
     $html .= sprintf('<a href="#" class="btn btn-primary btn-add-sidebar" onclick="KopaSidebar.add(event, jQuery(this), jQuery(\'#txt_sidebar_name\'));"><span>%s</span></a>', __('Add sidebar', kopa_get_domain()));
     $html .= '</p>';
     $html .= '<table class="table table-responsive table-hover table-list-sidebar">';
     $html .= '<thead>';
     $html .= '<tr>';
     $html .= sprintf('<th class="col-xs-10">%s</th>', __('Sidebar name', kopa_get_domain()));
     $html .= sprintf('<th class="col-xs-1">%s</th>', __('Rename', kopa_get_domain()));
     $html .= sprintf('<th class="col-xs-1">%s</th>', __('Remove', kopa_get_domain()));
     $html .= '</tr>';
     $html .= '</thead>';
     $html .= '<tbody>';
     foreach ($this->value as $slug => $title) {
         if ('sidebar_hide' != $slug) {
             $html .= '<tr>';
             $html .= sprintf('<td><span>%s<span></td>', $title);
             $html .= sprintf('<td><a href="#" onclick="KopaSidebar.rename(event, jQuery(this),\'%s\');" class="btn btn-success btn-sm"><i class="dashicons dashicons-edit"></i></a></td>', $slug);
             $html .= sprintf('<td><a href="#" onclick="KopaSidebar.remove(event, jQuery(this),\'%s\',\'%s\');" class="btn btn-danger btn-sm"><i class="dashicons dashicons-no-alt"></i></a></td>', $slug, $title);
             $html .= '</tr>';
         }
     }
     $html .= '</tbody>';
     $html .= '</table>';
     $html .= '</div>';
     return $html;
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:43,代码来源:sidebar.manager.ui.class.php

示例4: get_title

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 public static function get_title()
 {
     $title = '';
     $pattern = '';
     if (is_main_query() && 'true' == KopaOptions::get_option('seo_status', 'true')) {
         $pattern = '[site_name] - [site_desc]';
         if (is_archive()) {
             if (is_tag() || is_category()) {
                 $pattern = KopaOptions::get_option('seo_title_taxonomy', '[term_type] - [term_name] - [pagination_paged] - [site_name]');
             } else {
                 if (is_author()) {
                     $pattern = KopaOptions::get_option('seo_title_author', 'Posts created by [author_name] - [site_name]');
                 }
             }
         } else {
             if (is_search()) {
                 $pattern = KopaOptions::get_option('seo_title_search', 'Search pages: You searched for [search_phrase] return [search_result_count] results - [site_name]');
             } else {
                 if (is_singular()) {
                     if (is_page()) {
                         $pattern = KopaOptions::get_option('seo_title_page', '[page_name] - [site_name]');
                         if (is_front_page()) {
                             $pattern = KopaOptions::get_option('seo_title_front_page', '[site_name] - [site_desc]');
                         }
                     } else {
                         if (is_single()) {
                             $pattern = KopaOptions::get_option('seo_title_post', '[post_name] - Created by [post_author_name] - In category: [post_cats] - Tagged with: [post_tags] - [site_name] - [site_desc]');
                         }
                     }
                 } else {
                     if (is_404()) {
                         $pattern = KopaOptions::get_option('seo_title_404', 'Oops! 404 Page not found - [site_name] - [site_desc]');
                     } else {
                         if (is_home()) {
                             $pattern = KopaOptions::get_option('seo_title_home_page', 'Latest News - [pagination_paged] - [site_name] - [site_desc]');
                         }
                     }
                 }
             }
         }
     }
     if (empty($pattern)) {
         global $page, $paged;
         $title = wp_title('|', FALSE, 'right');
         $title .= get_bloginfo('name');
         $site_description = get_bloginfo('description', 'display');
         if ($site_description && (is_home() || is_front_page())) {
             $title .= " | {$site_description}";
         }
         if ($paged >= 2 || $page >= 2) {
             $title .= ' | ' . sprintf(__('Page %s', kopa_get_domain()), max($paged, $page));
         }
     } else {
         $title = do_shortcode($pattern);
     }
     return apply_filters('kopa_seo_get_title', $title);
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:66,代码来源:seo.class.php

示例5: get_control

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 protected function get_control()
 {
     $this->classes[] = 'kopa-ui-taxonomy';
     $terms = get_terms($this->taxonomy);
     $this->options[''] = __('-- Select --', kopa_get_domain());
     foreach ($terms as $term) {
         $this->options[$term->term_id] = $term->name;
     }
     return parent::get_control();
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:19,代码来源:taxonomy.ui.class.php

示例6: __construct

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 public function __construct($args = array())
 {
     parent::__construct($args);
     $this->options = array();
     $pages = get_pages(array('sort_order' => 'ASC', 'sort_column' => 'post_title', 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'meta_key' => '', 'meta_value' => '', 'authors' => '', 'child_of' => 0, 'parent' => -1, 'exclude_tree' => '', 'number' => '', 'offset' => 0, 'post_type' => 'page', 'post_status' => 'publish'));
     $this->options[0] = __('-- Select Page --', kopa_get_domain());
     foreach ($pages as $page) {
         $this->options[$page->ID] = $page->post_title;
     }
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:19,代码来源:list.page.ui.class.php

示例7: kopa_shortcode_pagination_paged

/**
 * 
 *
 * @package Kopa
 * @subpackage Core
 * @author thethangtran <tranthethang@gmail.com>
 * @since 1.0.0
 *      
 */
function kopa_shortcode_pagination_paged($atts, $content = null)
{
    $pagination_paged = '';
    if (is_archive() || is_home()) {
        global $page, $paged;
        $current_page = (int) max($paged, $page);
        $pagination_paged = sprintf(__('Page %s', kopa_get_domain()), $current_page > 0 ? $current_page : 1);
    }
    return apply_filters('kopa_shortcode_pagination_paged', $pagination_paged);
}
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:19,代码来源:pagination_paged.php

示例8: kopa_options_color_scheme

/**
 * 
 * @package Kopa
 * @subpackage Core
 * @author thethangtran <tranthethang@gmail.com>
 * @since 1.0.0
 *      
 */
function kopa_options_color_scheme()
{
    $groups['main-color'] = array('icon' => '', 'title' => __('Pre defined colors', kopa_get_domain()), 'fields' => array());
    $groups['main-color']['fields'][] = array('type' => 'color-swatches-single', 'id' => 'colors', 'name' => 'colors', 'label' => NULL, 'help' => '', 'default' => '#D40202', 'control_begin' => '<div class="col-xs-12">', 'control_end' => '</div>', 'colors' => array(array('primary' => '#D40202', 'label' => NULL, 'classes' => array()), array('primary' => 'customize', 'label' => '<i class="dashicons dashicons-plus"></i>', 'classes' => array('color-swatches-single-custom'))));
    /**
     * CUSTOM COLORS
     */
    $groups['custom-color'] = array('icon' => '', 'title' => __('Custom colors', kopa_get_domain()), 'fields' => array());
    $groups['custom-color']['fields'][] = array('type' => 'color', 'id' => 'primary_color', 'name' => 'primary_color', 'label' => __('Primary color', kopa_get_domain()), 'help' => '', 'default' => '#D40202', 'classes' => array('mc-primary'));
    return apply_filters('kopa_options_styling', $groups);
}
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:19,代码来源:color-scheme.php

示例9: kopa_options_social_links

/**
 * 
 * @package Kopa
 * @subpackage Core
 * @author thethangtran <tranthethang@gmail.com>
 * @since 1.0.0
 *      
 */
function kopa_options_social_links()
{
    $groups['social-links'] = array('icon' => '', 'title' => __('Social Links', kopa_get_domain()), 'fields' => array());
    $social_icons = KopaInit::get_social_icons();
    if ($social_icons) {
        foreach ($social_icons as $slug => $info) {
            $groups['social-links']['fields'][] = array('type' => 'text', 'id' => "social_link_{$slug}", 'name' => "social_link_{$slug}", 'label' => sprintf('%s <i class="%s kps-iconmoon pull-right" style="color:%s"></i>', $info['title'], $info['icon'], $info['color']), 'help' => isset($info['help']) ? $info['help'] : '', 'default' => '');
        }
    }
    return apply_filters('kopa_options_social_links', $groups);
}
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:19,代码来源:social-links.php

示例10: widget

    public function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        $instance['orderby'] = 'popular';
        $instance['posts_per_page'] = 5;
        $query = $this->build_query($instance);
        $posts = new WP_Query($query);
        if ($posts->have_posts()) {
            ?>
            <div class="widget-content">
                <ul class="list-unstyled">
                    <?php 
            $loop_index = 0;
            while ($posts->have_posts()) {
                $posts->the_post();
                $post_id = get_the_ID();
                $percent = 100 - $loop_index * 10;
                ?>
                        <li>
                            <div class="item clearfix" style="width: <?php 
                echo $percent;
                ?>
%;">
                                <h4 class="post-title" ><a href="<?php 
                echo get_permalink();
                ?>
"><?php 
                echo get_the_title();
                ?>
</a></h4>
                                <span><?php 
                echo KopaUtil::get_views($post_id);
                ?>
</span>
                            </div>
                        </li>
                        <?php 
                $loop_index++;
            }
            ?>
                </ul>
            </div>
            <?php 
        } else {
            _e('Posts not found. Pleae config this widget again!', kopa_get_domain());
        }
        wp_reset_postdata();
        echo $after_widget;
    }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:54,代码来源:most-reviews.php

示例11: get_control

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 protected function get_control()
 {
     $html = '';
     if ($this->template_hierarchy) {
         $this->value = is_array($this->value) ? $this->value : unserialize($this->value);
         $html = KopaLayout::get_form($this->template_hierarchy, $this->value, $this->name);
     } else {
         $html = __('Parameter template_hierarchy is missing.', kopa_get_domain());
     }
     return $html;
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:20,代码来源:layout.ui.class.php

示例12: kopa_options_elements

/**
 * 
 * @package Kopa
 * @subpackage Core
 * @author thethangtran <tranthethang@gmail.com>
 * @since 1.0.0
 *      
 */
function kopa_options_elements()
{
    $groups['lightbox'] = array('icon' => '', 'title' => __('Lightbox (Pretty Photo)', kopa_get_domain()), 'fields' => array());
    $groups['lightbox']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_play_video_on_lightbox', 'name' => 'is_play_video_on_lightbox', 'label' => __('Play video on lighbox', kopa_get_domain()), 'help' => NULL, 'default' => 'true', 'true' => __('Yes', kopa_get_domain()), 'false' => __('No', kopa_get_domain()));
    $groups['lightbox']['fields'][] = array('type' => 'select', 'id' => 'lightbox_skin', 'name' => 'lightbox_skin', 'label' => __('Skin', kopa_get_domain()), 'help' => NULL, 'default' => 'pp_default', 'options' => array('pp_default' => __('Default', kopa_get_domain()), 'facebook' => __('Facebook', kopa_get_domain()), 'dark_rounded' => __('Dark rounded', kopa_get_domain()), 'dark_square' => __('Dark square', kopa_get_domain()), 'light_rounded' => __('Light rounded', kopa_get_domain()), 'light_square' => __('Light square', kopa_get_domain())));
    $groups['lightbox']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_lightbox_modal_mode', 'name' => 'is_lightbox_modal_mode', 'label' => __('Modal mode', kopa_get_domain()), 'help' => __('If set to Yes, only the close button will close the window', kopa_get_domain()), 'default' => 'true', 'true' => __('Enable', kopa_get_domain()), 'false' => __('Disable', kopa_get_domain()));
    $groups['lightbox']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_lightbox_show_title', 'name' => 'is_lightbox_show_title', 'label' => __('Title', kopa_get_domain()), 'default' => 'true', 'true' => __('Show', kopa_get_domain()), 'false' => __('Hide', kopa_get_domain()));
    $groups['lightbox']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_lightbox_social_tools', 'name' => 'is_lightbox_social_tools', 'label' => __('Sharing with Facebook, Twitter', kopa_get_domain()), 'default' => 'true', 'true' => __('Show', kopa_get_domain()), 'false' => __('Hide', kopa_get_domain()));
    $groups['lightbox']['fields'][] = array('type' => 'select-number', 'id' => 'lightbox_opacity', 'name' => 'lightbox_opacity', 'label' => __('Overlay Opacity', kopa_get_domain()), 'help' => __('Value between 0% and 100%', kopa_get_domain()), 'default' => 70, 'min' => 0, 'max' => 100, 'step' => 5, 'suffix' => '%');
    return apply_filters('kopa_options_lightbox', $groups);
}
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:19,代码来源:elements.php

示例13: kopa_options_blog_posts

/**
 * 
 * @package Kopa
 * @subpackage Core
 * @author thethangtran <tranthethang@gmail.com>
 * @since 1.0.0
 *      
 */
function kopa_options_blog_posts()
{
    $groups['archive'] = array('icon' => '', 'title' => __('Blog post', kopa_get_domain()), 'fields' => array());
    $groups['archive']['fields'][] = array('type' => 'radio-list', 'id' => 'exceprt_type', 'name' => 'exceprt_type', 'label' => __('For each article in list, show', kopa_get_domain()), 'default' => 'excerpt', 'help' => '', 'options' => array(array('value' => 'excerpt', 'label' => __('Excerpt', kopa_get_domain())), array('value' => 'full', 'label' => __('Full content', kopa_get_domain())), array('value' => 'limit', 'label' => __('Limit number characters', kopa_get_domain()), 'sub_fields' => array(array('type' => 'number', 'id' => 'excerpt_limit', 'name' => 'excerpt_limit', 'default' => 200, 'value' => KopaOptions::get_option('excerpt_limit', 200))))), 'option_args' => array('wrap_begin' => '<div class="row cleafix"><div class="col-xs-12">', 'wrap_end' => '</div></div>', 'label_begin' => '', 'label_end' => '', 'control_begin' => '', 'control_end' => ''));
    $groups['archive']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_display_blog_post_format', 'name' => 'is_display_blog_post_format', 'value' => 'false', 'default' => 'false', 'label' => __('Display content formatted', kopa_get_domain()), 'help_classes' => '', 'help' => __('If value is <code>Yes</code>, thumbnails has been replaced by video, audio or gallery shortcode', kopa_get_domain()), 'true' => __('Yes', kopa_get_domain()), 'false' => __('No', kopa_get_domain()));
    $groups['archive']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_display_created_date', 'name' => 'is_display_created_date', 'value' => 'true', 'default' => 'true', 'label' => __('Created Date', kopa_get_domain()), 'help_classes' => array(), 'true' => __('Show', kopa_get_domain()), 'false' => __('Hide', kopa_get_domain()));
    $groups['archive']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_display_comments', 'name' => 'is_display_comments', 'value' => 'true', 'default' => 'true', 'label' => __('Number of comments', kopa_get_domain()), 'help_classes' => array(), 'true' => __('Show', kopa_get_domain()), 'false' => __('Hide', kopa_get_domain()));
    $groups['archive']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_display_views', 'name' => 'is_display_views', 'value' => 'true', 'default' => 'true', 'label' => __('Number of views', kopa_get_domain()), 'help_classes' => array(), 'true' => __('Show', kopa_get_domain()), 'false' => __('Hide', kopa_get_domain()));
    $groups['archive']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_display_likes', 'name' => 'is_display_likes', 'value' => 'true', 'default' => 'true', 'label' => __('Number of likes', kopa_get_domain()), 'help_classes' => array(), 'true' => __('Show', kopa_get_domain()), 'false' => __('Hide', kopa_get_domain()));
    $groups['archive']['fields'][] = array('type' => 'radio-truefalse', 'id' => 'is_display_readmore', 'name' => 'is_display_readmore', 'value' => 'true', 'default' => 'true', 'label' => __('Read more button', kopa_get_domain()), 'help_classes' => array(), 'true' => __('Show', kopa_get_domain()), 'false' => __('Hide', kopa_get_domain()));
    return apply_filters('kopa_options_blog_posts', $groups);
}
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:20,代码来源:blog-posts.php

示例14: get_control

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 protected function get_control()
 {
     $this->classes[] = 'kopa-ui-icon';
     $this->classes[] = 'form-control';
     $this->set_attribute('autocomplete', 'off');
     $html = sprintf('<input type="hidden" id="%s" name="%s" class="%s" value="%s" %s/>', $this->id, $this->name, implode(' ', $this->classes), $this->value, $this->unserialize_attributes());
     if ($this->value) {
         $html .= sprintf('<i class="kopa-ui-icon-preview %s"></i>', $this->value);
     }
     $html .= sprintf('<a class="btn btn-sm btn-warning kopa-ui-icon-remove" onclick="KopaUI.remove_icon(event, jQuery(this));" style="display: %s;">%s</a>', $this->value ? 'inline-block' : 'none;', __('Remove', kopa_get_domain()));
     $html .= sprintf('<a href="#" class="btn btn-sm btn-primary kopa-ui-icon-select" onclick="KopaUI.open_iconList(event, jQuery(this));" style="display: %s;">%s</a>', $this->value ? 'none' : 'inline-block;', __('Select', kopa_get_domain()));
     return $html;
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:22,代码来源:icon.ui.class.php

示例15: _clone

 /**
  * 
  *
  * @package Kopa
  * @subpackage Core
  * @author thethangtran <tranthethang@gmail.com>
  * @since 1.0.0
  *      
  */
 private function _clone($id = '', $value = '')
 {
     $id = empty($id) ? 'multi-text-index-' . wp_generate_password(10, false, false) : $id;
     $out = '<li class="multi-text-element clearfix">';
     $out .= sprintf('<i class="btn btn-xs btn-primary multi-text-drag kopa-sortable-handle">%s</i>', __('drag', kopa_get_domain()));
     $out .= sprintf('<span class="btn btn-primary multi-text-add btn-xs" onclick="KopaUI.add_multitext(event, jQuery(this));">%1$s</span>', __('add', kopa_get_domain()));
     $out .= sprintf('<span class="btn btn-danger multi-text-del btn-xs" onclick="KopaUI.del_multitext(event, jQuery(this));">%1$s</span>', __('del', kopa_get_domain()));
     $out .= '<div class="clearfix"></div>';
     $out .= sprintf('<input type="hidden" class="id" name="%1$s[id][]" value="%2$s" autocomplete="off"/>', $this->name, $id);
     $out .= sprintf('<input type="text" class="form-control multi-text-value" name="%1$s[value][]" value="%2$s" autocomplete="off"/>', $this->name, $value);
     $out .= '</li>';
     return $out;
 }
开发者ID:dgordon86,项目名称:breakbiodark,代码行数:22,代码来源:multi.text.ui.class.php


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