Plugin Directory

Changeset 1249987


Ignore:
Timestamp:
09/21/2015 04:35:31 AM (11 years ago)
Author:
kopatheme
Message:

Updated

Location:
kopa-nictitate-toolkit/trunk
Files:
48 added
13 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • kopa-nictitate-toolkit/trunk/kopa-nictitate-toolkit.php

    r959011 r1249987  
    44Plugin URI: http://kopatheme.com
    55Description: A specific plugin use in Nictitate Theme to help you register post types and shortcodes.
    6 Version: 1.0.0
     6Version: 1.0.1
    77Author: Kopatheme
    88Author URI: http://kopatheme.com
     
    1313*/
    1414
     15add_action('plugins_loaded', 'kopa_nictitate_toolkit_init');
     16add_action('after_setup_theme', 'kopa_nictitate_toolkit_after_setup_theme');
     17
     18function kopa_nictitate_toolkit_after_setup_theme() {
     19    if (!class_exists('Kopa_Framework'))
     20        return;
     21
     22    #ACTION HOOK
     23    add_action('admin_enqueue_scripts', 'kopa_nictitate_toolkit_admin_enqueue_scripts', 15);
     24
     25    #FILTER HOOK
     26    add_filter('kopa_admin_meta_box_wrap_start', 'kopa_nictitate_toolkit_meta_box_wrap_start', 10, 3);
     27    add_filter('kopa_admin_meta_box_wrap_end', 'kopa_nictitate_toolkit_meta_box_wrap_end', 10, 3);
     28
     29    #REGISTER POST TYPES
     30    require plugin_dir_path( __FILE__ ) . 'posttype/service/service.php';
     31    require plugin_dir_path( __FILE__ ) . 'posttype/service/options_service.php';
     32
     33    require plugin_dir_path( __FILE__ ) . 'posttype/portfolio/portfolio.php';
     34    require plugin_dir_path( __FILE__ ) . 'posttype/portfolio/options_portfolio.php';
     35
     36    require plugin_dir_path( __FILE__ ) . 'posttype/client/client.php';
     37    require plugin_dir_path( __FILE__ ) . 'posttype/client/options_client.php';
     38
     39    require plugin_dir_path( __FILE__ ) . 'posttype/testimonial/testimonial.php';
     40    require plugin_dir_path( __FILE__ ) . 'posttype/testimonial/options_testimonial.php';
     41
     42    require plugin_dir_path( __FILE__ ) . 'posttype/staff/staff.php';
     43    require plugin_dir_path( __FILE__ ) . 'posttype/staff/options_staff.php';
     44
     45    require plugin_dir_path( __FILE__ ) . 'posttype/post/options_post.php';
     46
     47    #METABOX FIELDS
     48    require plugin_dir_path( __FILE__ ) . 'metabox-fields/icon.php';
     49
     50    #REGISTER SHORTCODES
     51    require plugin_dir_path( __FILE__ ) . 'kopa-shortcodes.php';
     52
     53    #REGISTER SHORTCODES
     54    require plugin_dir_path( __FILE__ ) . 'util.php';
     55    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_categories.php';
     56    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_about.php';
     57    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_contact_form.php';
     58    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_sequence_slider.php';
     59    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_portfolios.php';
     60    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_services_intro.php';
     61    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_tagline.php';
     62    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_testimonials.php';
     63    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_skill.php';
     64    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_posts_list.php';
     65    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_flickr.php';
     66    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_subscribe.php';
     67    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_socials.php';
     68    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_posts_carousel.php';
     69    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_staffs.php';
     70    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_services_tabs.php';
     71    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_services.php';
     72    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_clients.php';
     73    require plugin_dir_path( __FILE__ ) . 'widgets/kopa_widget_text.php';
     74}
     75
     76function kopa_nictitate_toolkit_admin_enqueue_scripts(){
     77    global $pagenow;
     78    if(in_array( $pagenow, array('post.php', 'post-new.php', 'widgets.php'))){
     79        wp_enqueue_style('metabox', plugins_url("css/metabox.css", __FILE__), NULL, NULL); 
     80        wp_enqueue_style('kopa-fontawesome', get_template_directory_uri() . '/css/font-awesome.css', array(), NULL);
     81        wp_enqueue_script('metabox', plugins_url("js/metabox/metabox.js", __FILE__), array('jquery'), NULL, TRUE);
     82        wp_enqueue_style('kopa_widget_admin', plugins_url("css/widget.css", __FILE__), NULL, NULL);
     83        wp_enqueue_script('kopa_widget_admin', plugins_url("js/widget/widget.js", __FILE__), array('jquery'), NULL, TRUE);
     84    }
     85}
     86
    1587/*
    1688 * Plugin domain
     
    1991    load_plugin_textdomain( 'kopa-nictitate-toolkit', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    2092}
    21 add_action('plugins_loaded', 'kopa_nictitate_toolkit_init');
    2293
    23 /*
    24  * Register post types
    25  */
    26 require plugin_dir_path( __FILE__ ) . 'posttype/service.php';
    27 require plugin_dir_path( __FILE__ ) . 'posttype/portfolio.php';
    28 require plugin_dir_path( __FILE__ ) . 'posttype/client.php';
    29 require plugin_dir_path( __FILE__ ) . 'posttype/testimonial.php';
    30 require plugin_dir_path( __FILE__ ) . 'posttype/staff.php';
    31 require plugin_dir_path( __FILE__ ) . 'posttype/options_client.php';
    32 require plugin_dir_path( __FILE__ ) . 'posttype/options_testimonial.php';
    33 require plugin_dir_path( __FILE__ ) . 'posttype/options_service.php';
    34 require plugin_dir_path( __FILE__ ) . 'posttype/options_staff.php';
    35 require plugin_dir_path( __FILE__ ) . 'posttype/options_portfolio.php';
     94function kopa_nictitate_toolkit_meta_box_wrap_start($wrap, $value, $loop_index){
     95    if(0 == $loop_index){
     96        $wrap = '<div class="kopa-nictitate-toolkit-metabox-wrap kopa-nictitate-toolkit-metabox-wrap-first kopa-nictitate-toolkit-row">';
     97    }else{
     98        $wrap = '<div class="kopa-nictitate-toolkit-metabox-wrap kopa-nictitate-toolkit-row">';
     99    }
     100   
     101    if ( $value['title'] ) {
     102        $wrap .= '<div class="kopa-nictitate-toolkit-col-3">';
     103        $wrap .= esc_html($value['title']);
     104        $wrap .= '</div>';
     105        $wrap .= '<div class="kopa-nictitate-toolkit-col-9">';
     106    }else{
     107        $wrap .= '<div class="kopa-nictitate-toolkit-col-12">';
     108    }
    36109
    37 /*
    38  * Register shortcodes
    39  */
    40 require plugin_dir_path( __FILE__ ) . 'kopa-shortcodes.php';
     110    return $wrap;
     111}
     112
     113function kopa_nictitate_toolkit_meta_box_wrap_end($wrap, $value, $loop_index){
     114    $wrap = '';
     115
     116    if ( $value['desc'] ) {
     117        $wrap .= '<p class="kopa-nictitate-toolkit-help">'. $value['desc'] . '</p>';       
     118    }
     119
     120    $wrap .= '</div>';
     121    $wrap .= '</div>';
     122
     123    return $wrap;
     124}
  • kopa-nictitate-toolkit/trunk/kopa-shortcodes.php

    r959011 r1249987  
    358358
    359359    $out .= '<p class="input-block clearfix">';
    360     $out .= '<label class="required" for="contact_name">' . __('Name (required):', 'kopa-nictitate-toolkit') . '</label>';
     360    $out .= '<label class="required" for="contact_name">' . esc_html__('Name (required):', 'kopa-nictitate-toolkit') . '</label>';
    361361    $out .= '<input class="valid" type="text" name="name" id="contact_name" value="">';
    362362    $out .= '</p>';
    363363
    364364    $out .= '<p class="input-block clearfix">';
    365     $out .= '<label class="required" for="contact_email">' . __('Email (required):', 'kopa-nictitate-toolkit') . '</label>';
     365    $out .= '<label class="required" for="contact_email">' . esc_html__('Email (required):', 'kopa-nictitate-toolkit') . '</label>';
    366366    $out .= '<input type="email" class="valid" name="email" id="contact_email" value="">';
    367367    $out .= '</p>';
    368368
    369369    $out .= '<p class="input-block clearfix">';
    370     $out .= '<label class="required" for="contact_url">' . __('Website:', 'kopa-nictitate-toolkit') . '</label>';
     370    $out .= '<label class="required" for="contact_url">' . esc_html__('Website:', 'kopa-nictitate-toolkit') . '</label>';
    371371    $out .= '<input type="url" class="valid" name="url" id="contact_url" value="">';
    372372    $out .= '</p>';
    373373
    374374    $out .= '<p class="textarea-block">';
    375     $out .= '<label class="required" for="contact_message">' . __('Message (required):', 'kopa-nictitate-toolkit') . '</label>';
     375    $out .= '<label class="required" for="contact_message">' . esc_html__('Message (required):', 'kopa-nictitate-toolkit') . '</label>';
    376376    $out .= '<textarea id="contact_message" name="message"></textarea>';
    377377    $out .= '</p>';
    378378
    379379    $out .= '<p class="comment-button clearfix">';
    380     $out .= '<input type="submit" id="submit-contact" value="' . __('Send', 'kopa-nictitate-toolkit') . '">';
     380    $out .= '<input type="submit" id="submit-contact" value="' . esc_html__('Send', 'kopa-nictitate-toolkit') . '">';
    381381    $out .= '</p>';
    382382
     
    394394        $out.= '<div class="span6">';
    395395        $out.= '<div id="contact-information">';
    396         $out.= '<h2 class="contact-title">' . __('Contact Information', 'kopa-nictitate-toolkit') . '<span></span></h2>';
     396        $out.= '<h2 class="contact-title">' . esc_html__('Contact Information', 'kopa-nictitate-toolkit') . '<span></span></h2>';
    397397        $out.= '<div class="acc-wrapper">
    398398                    <div class="accordion-title">
    399                         <h3><a href="#">' . __('Where to find Us?', 'kopa-nictitate-toolkit') . '</a></h3>
     399                        <h3><a href="#">' . esc_html__('Where to find Us?', 'kopa-nictitate-toolkit') . '</a></h3>
    400400                        <span>+</span>
    401401                    </div>
     
    481481function kopa_shortcode_pricing_table($atts, $content = '') {
    482482    $atts = shortcode_atts(array(
    483         'title' => __('Pricing Table', 'kopa-nictitate-toolkit'),
     483        'title' => esc_html__('Pricing Table', 'kopa-nictitate-toolkit'),
    484484        'columns' => '3'
    485485            ), $atts);
     
    503503        'first_column' => false,
    504504        'special' => false,
    505         'title' => __('Pricing Column', 'kopa-nictitate-toolkit'),
     505        'title' => esc_html__('Pricing Column', 'kopa-nictitate-toolkit'),
    506506        'currency_symbol' => '$',
    507507        'price' => 1,
    508         'plan' => __('per monthly', 'kopa-nictitate-toolkit'),
    509         'features' => __('feature 1, feature 2, feature 3, ext...', 'kopa-nictitate-toolkit'),
     508        'plan' => esc_html__('per monthly', 'kopa-nictitate-toolkit'),
     509        'features' => esc_html__('feature 1, feature 2, feature 3, ext...', 'kopa-nictitate-toolkit'),
    510510        'button_url' => 'http://kopatheme.com',
    511         'button_text' => __('Sign up', 'kopa-nictitate-toolkit')
     511        'button_text' => esc_html__('Sign up', 'kopa-nictitate-toolkit')
    512512            ), $atts);
    513513
  • kopa-nictitate-toolkit/trunk/readme.txt

    r959011 r1249987  
    33Contributors: Kopatheme
    44Requires at least: 3.8
    5 Tested up to: 3.9.1
    6 Stable tag: 1.0.0
     5Tested up to: 4.3
     6Stable tag: 1.0.1
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1313A specific plugin use in Nictitate Theme to help you register post types and shortcodes.
    1414
     15== Changelog ==
     16
     17*1.0.1 - 9/16/2015
     18- rewrite widgets use Kopa Framework.
     19- update security.
     20
     21*1.0.0
     22- release plugin.
     23
     24
    1525== Screenshots ==
     26
Note: See TracChangeset for help on using the changeset viewer.