Viewing 1 replies (of 1 total)
  • Thread Starter s3lf

    (@s3lf)

    Here’s a patch, please apply ??

    Thanks ??

    Index: public/wp-content/plugins/category-color/rl_category_color.php
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    — public/wp-content/plugins/category-color/rl_category_color.php (date 1545999820000)
    +++ public/wp-content/plugins/category-color/rl_category_color.php (date 1546000323000)
    @@ -13,6 +13,8 @@
    protected $_meta;
    protected $_taxonomies;
    protected $_fields;
    + protected $js;
    + protected $css;

    function __construct( $meta ){
    if ( !is_admin() )
    @@ -105,7 +107,7 @@
    foreach ( $this->_fields as $field ) {
    echo ‘<tr>’;

    – $meta = !empty( $metas[$field[‘id’]] ) ? $metas[$field[‘id’]] : $field[‘std’];
    + $meta = !empty( $metas[$field[‘id’]] ) ? $metas[$field[‘id’]] : (isset($field[‘std’]) ? $field[‘std’] : null);
    $meta = is_array( $meta ) ? array_map( ‘esc_attr’, $meta ) : esc_attr( $meta );
    call_user_func( array( $this, ‘show_field_’ . $field[‘type’] ), $field, $meta );

    @@ -123,7 +125,7 @@
    }

    function show_field_end( $field, $meta ) {
    – echo $field[‘desc’] ? “<br><span class=’description’>{$field[‘desc’]}</span></td>” : ‘</td>’;
    + echo (isset($field[‘desc’]) && $field[‘desc’]) ? “<br><span class=’description’>{$field[‘desc’]}</span></td>” : ‘</td>’;
    }

    function show_field_color( $field, $meta ){

Viewing 1 replies (of 1 total)
  • The topic ‘Undefined index / undefined property’ is closed to new replies.