Plugin Directory

Changeset 1341128


Ignore:
Timestamp:
02/02/2016 03:54:34 AM (10 years ago)
Author:
kopatheme
Message:

Updated to 1.1.0 version

Location:
kopatheme/trunk
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • kopatheme/trunk/includes/admin/class-kopa-admin-meta-box.php

    r1323880 r1341128  
    217217                        $value['type'] = 'text';
    218218                    }
     219                    $class = 'large-text';
     220                    if( isset( $value['class'] ) && !empty(  $value['class'] )){
     221                        $class = esc_attr(  $value['class'] );
     222                    }                   
    219223
    220224                    $output .= $option_wrap_start;
    221225                    $output .= '<input
    222                         class="large-text"
     226                        class="' . esc_attr( $class ) . '"
    223227                        type="'.esc_attr( $value['type'] ).'"
    224228                        name="'.esc_attr( $value['id'] ).'"
     
    398402                        $output .= $option_wrap_start;
    399403                        $output .= '<input
    400                         class="large-text kopa-framework-datetime"
     404                        class="medium-text kopa-framework-datetime"
    401405                        type="'.esc_attr( $value['type'] ).'"
    402406                        name="'.esc_attr( $value['id'] ).'"
     
    455459                    }
    456460                    break;
     461
     462                case 'color':
     463                    if ( $advanced_field ) {
     464                        $default_color = '';
     465                        $field_class = '';
     466
     467                        if ( 'color' === $value['type'] ) {
     468                            $field_class = ' kopa_color';
     469
     470                            if ( $value['default'] ) {
     471                                $default_color = ' data-default-color="' .esc_attr( $value['default'] ) . '" ';
     472                            } // end check empty option value
     473                        } // end check color type
     474
     475                        $output .= $option_wrap_start;
     476                        $output .= '<input
     477                        class="'.esc_attr( $field_class ).'"
     478                        style="'.esc_attr( $value['css'] ).'"
     479                        type="'.esc_attr( $value['type'] ).'"
     480                        name="'.esc_attr( $value['id'] ).'"
     481                        id="'.esc_attr( $value['id'] ).'"
     482                        value="'.esc_attr( $option_value ).'"'.
     483                            $default_color.'>';
     484                        $output .= $option_wrap_end;
     485                    }
     486                    break;
    457487                default:
    458488                    $output .= apply_filters( 'kopa_admin_meta_box_field_' . $value['type'], '', $option_wrap_start, $option_wrap_end, $value, $option_value);
  • kopatheme/trunk/includes/admin/layouts/class-kopa-layout-post-type.php

    r1208795 r1341128  
    4242     * @access public
    4343     */
    44     public function add_layout_box() {
    45         $args = $this->layout_settings;
    46 
    47         add_meta_box(
    48             'kopa_custom_layout',
    49             __( 'Custom Layout', 'kopa-framework' ),
    50             array( $this, 'output_fields' ),
    51             $args['screen'],
    52             'normal',
    53             'default',
    54             $args
    55         );
    56     }
     44    public function add_layout_box() {
     45        $args = $this->layout_settings;
     46        $enable_custom = apply_filters('kopa_custom_use_page_layout_singular', true);
     47        if ( isset($args['hide_in']) && $args['hide_in'] ) {
     48            $enable_custom = false;
     49        }
     50        if ( $enable_custom ) {
     51            add_meta_box(
     52                'kopa_custom_layout',
     53                __( 'Custom Layout', 'kopa-framework' ),
     54                array( $this, 'output_fields' ),
     55                $args['screen'],
     56                'normal',
     57                'default',
     58                $args
     59            );
     60        }
     61    }
    5762
    5863    /**
  • kopatheme/trunk/includes/admin/layouts/class-kopa-layout-taxonomy.php

    r1208795 r1341128  
    3131     */
    3232    public function __construct( $layout_settings ) {
    33         $this->layout_settings = $layout_settings;
    34         add_action( $layout_settings['screen'] . '_edit_form_fields', array( $this, 'output_fields' ) );
    35         add_action( 'edit_term', array( $this, 'save_fields' ) );
    36         add_action( 'delete_term', array( $this, 'delete_fields' ) );
     33        $this->layout_settings = $layout_settings;
     34        $enable_custom = apply_filters('kopa_custom_use_page_layout_taxonomy', true);
     35        if ( isset($args['hide_in']) && $args['hide_in'] ) {
     36            $enable_custom = false;
     37        }
     38        if ( $enable_custom ) {
     39            add_action( $layout_settings['screen'] . '_edit_form_fields', array( $this, 'output_fields' ) );
     40            add_action( 'edit_term', array( $this, 'save_fields' ) );
     41            add_action( 'delete_term', array( $this, 'delete_fields' ) );
     42        }
    3743    }
    3844
  • kopatheme/trunk/includes/class-kopa-frontend-assets.php

    r989825 r1341128  
    3737    public function register_styles() {
    3838        wp_register_style( 'kopa_font_awesome', KF()->framework_url() . '/assets/css/font-awesome.css', array(), '4.0.3' );
     39        $enable_flaticon = apply_filters('kopa_front_enable_register_flaticon_font', false);
     40        if ( $enable_flaticon ) {
     41            wp_register_style( 'kopa_font_flaticon', KF()->framework_url() . '/assets/css/flaticon.css', array(), KOPA_FRAMEWORK_VERSION );
     42        }
    3943    }
    4044
  • kopatheme/trunk/kopa-framework.php

    r1323880 r1341128  
    33 * Plugin Name: Kopa Framework
    44 * Description: A WordPress framework by Kopatheme.
    5  * Version: 1.0.11
     5 * Version: 1.1.0
    66 * Author: Kopa Theme
    77 * Author URI: http://kopatheme.com
  • kopatheme/trunk/readme.txt

    r1323880 r1341128  
    2121
    2222== Changelog ==
     23
     24= 1.1.0 =
     25* Add: filter 'kopa_front_enable_register_flaticon_font' to enable/disable register flaticon font.
     26* Add param 'hide_in' to enable hide custom layout for 'post type' and 'taxonomy' in edit mode
     27  Example to hide custom layout for post type 'product' in edit mode. You can use:
     28            $args[] = array(
     29                  'screen'   => 'product',
     30                  'taxonomy' => false,
     31                  'layout'   => 'product-single',
     32                  'hide_in' => true
     33            );
    2334
    2435= 1.0.11 =
Note: See TracChangeset for help on using the changeset viewer.