Plugin Directory

Changeset 2178780


Ignore:
Timestamp:
10/23/2019 06:17:58 PM (6 years ago)
Author:
graffino
Message:

Fixed undefined variable (thanks @richardshea, @kubik101)

Location:
custom-post-type-maker
Files:
3 deleted
4 edited
7 copied

Legend:

Unmodified
Added
Removed
  • custom-post-type-maker/tags/1.1.8/CHANGELOG.md

    r2129174 r2178780  
    11# Changelog
     2
     3## 1.1.8
     4
     5- Fixes undefined variable (Thanks @richardshea,@kubik101)[#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21), [#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21)
     6
     7### 1.1.7
     8
     9- Makes code compatible with WordPressCore PHP Linter
     10- Marks plugin compatible with future WordPress versions
    211
    312## 1.1.6
  • custom-post-type-maker/tags/1.1.8/README.md

    r2129174 r2178780  
    2626
    2727## Changelog
     28
     29## 1.1.8
     30
     31- Fixes undefined variable (Thanks @richardshea,@kubik101)[#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21), [#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21)
    2832
    2933### 1.1.7
  • custom-post-type-maker/tags/1.1.8/class-cptm.php

    r2129174 r2178780  
    44Plugin URI: https://github.com/Graffino/custom-post-type-maker-ui
    55Description: Custom Post Type Maker lets you create Custom Post Types and custom Taxonomies in a user friendly way.
    6 Version: 1.1.7
     6Version: 1.1.8
    77Author: Graffino
    88Author URI: http://www.graffino.com/
     
    476476
    477477        // text fields
    478         $cptm_name         = isset( $values['cptm_name'] ) ? esc_attr( $values['cptm_name'][0] ) : '';
    479         $cptm_label        = isset( $values['cptm_label'] ) ? esc_attr( $values['cptm_label'][0] ) : '';
    480         $cptm_singular_nam = isset( $values['cptm_singular_name'] ) ? esc_attr( $values['cptm_singular_name'][0] ) : '';
    481         $cptm_description  = isset( $values['cptm_description'] ) ? esc_attr( $values['cptm_description'][0] ) : '';
     478        $cptm_name          = isset( $values['cptm_name'] ) ? esc_attr( $values['cptm_name'][0] ) : '';
     479        $cptm_label         = isset( $values['cptm_label'] ) ? esc_attr( $values['cptm_label'][0] ) : '';
     480        $cptm_singular_name = isset( $values['cptm_singular_name'] ) ? esc_attr( $values['cptm_singular_name'][0] ) : '';
     481        $cptm_description   = isset( $values['cptm_description'] ) ? esc_attr( $values['cptm_description'][0] ) : '';
    482482
    483483        // Custom post icon (uploaded)
     
    874874        $cptm_tax_show_admin_column = isset( $values['cptm_tax_show_admin_column'] ) ? esc_attr( $values['cptm_tax_show_admin_column'][0] ) : '';
    875875
    876         // checkbox fields
    877         $cptm_tax_supports                 = isset( $values['cptm_tax_supports'] ) ? unserialize( $values['cptm_tax_supports'][0] ) : array();
    878         $cptm_tax_supports_title           = ( isset( $values['cptm_tax_supports'] ) && in_array( 'title', $cptm_supports ) ? 'title' : '' );
    879         $cptm_tax_supports_editor          = ( isset( $values['cptm_tax_supports'] ) && in_array( 'editor', $cptm_supports ) ? 'editor' : '' );
    880         $cptm_tax_supports_excerpt         = ( isset( $values['cptm_tax_supports'] ) && in_array( 'excerpt', $cptm_supports ) ? 'excerpt' : '' );
    881         $cptm_tax_supports_trackbacks      = ( isset( $values['cptm_tax_supports'] ) && in_array( 'trackbacks', $cptm_supports ) ? 'trackbacks' : '' );
    882         $cptm_tax_supports_custom_fields   = ( isset( $values['cptm_tax_supports'] ) && in_array( 'custom-fields', $cptm_supports ) ? 'custom-fields' : '' );
    883         $cptm_tax_supports_comments        = ( isset( $values['cptm_tax_supports'] ) && in_array( 'comments', $cptm_supports ) ? 'comments' : '' );
    884         $cptm_tax_supports_revisions       = ( isset( $values['cptm_tax_supports'] ) && in_array( 'revisions', $cptm_supports ) ? 'revisions' : '' );
    885         $cptm_tax_supports_featured_image  = ( isset( $values['cptm_tax_supports'] ) && in_array( 'thumbnail', $cptm_supports ) ? 'thumbnail' : '' );
    886         $cptm_tax_supports_author          = ( isset( $values['cptm_tax_supports'] ) && in_array( 'author', $cptm_supports ) ? 'author' : '' );
    887         $cptm_tax_supports_page_attributes = ( isset( $values['cptm_tax_supports'] ) && in_array( 'page-attributes', $cptm_supports ) ? 'page-attributes' : '' );
    888         $cptm_tax_supports_post_formats    = ( isset( $values['cptm_tax_supports'] ) && in_array( 'post-formats', $cptm_supports ) ? 'post-formats' : '' );
    889 
    890876        $cptm_tax_post_types      = isset( $values['cptm_tax_post_types'] ) ? unserialize( $values['cptm_tax_post_types'][0] ) : array();
    891877        $cptm_tax_post_types_post = ( isset( $values['cptm_tax_post_types'] ) && in_array( 'post', $cptm_tax_post_types ) ? 'post' : '' );
     
    10551041        // update custom post type meta values
    10561042        if ( isset( $_POST['cptm_name'] ) ) {
    1057             update_post_meta( $post_id, 'cptm_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_name'] ) ) );
     1043            update_post_meta( $post_id, 'cptm_name', sanitize_text_field( strtolower( str_replace( ' ', '', $_POST['cptm_name'] ) ) ) );
    10581044        }
    10591045
  • custom-post-type-maker/tags/1.1.8/readme.txt

    r2129174 r2178780  
    33Tags: custom, post, type, custom post type, custom post types, maker, make, cpt, post types, taxonomy, taxonomies, tax, custom taxonomies
    44Requires at least: 3.0.0
    5 Tested up to: 5.2
    6 Stable tag: 1.1.7
     5Tested up to: 5.3
     6Stable tag: 1.1.8
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6767== Changelog ==
    6868
     69= 1.1.8
     70- Fixes undefined variable (Thanks @richardshea,@kubik101)[#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21), [#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21)
     71
    6972= 1.1.7
    7073- Makes code compatible with WordPressCore PHP Linter
  • custom-post-type-maker/trunk/CHANGELOG.md

    r2129174 r2178780  
    11# Changelog
     2
     3## 1.1.8
     4
     5- Fixes undefined variable (Thanks @richardshea,@kubik101)[#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21), [#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21)
     6
     7### 1.1.7
     8
     9- Makes code compatible with WordPressCore PHP Linter
     10- Marks plugin compatible with future WordPress versions
    211
    312## 1.1.6
  • custom-post-type-maker/trunk/README.md

    r2129174 r2178780  
    2626
    2727## Changelog
     28
     29## 1.1.8
     30
     31- Fixes undefined variable (Thanks @richardshea,@kubik101)[#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21), [#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21)
    2832
    2933### 1.1.7
  • custom-post-type-maker/trunk/class-cptm.php

    r2129174 r2178780  
    44Plugin URI: https://github.com/Graffino/custom-post-type-maker-ui
    55Description: Custom Post Type Maker lets you create Custom Post Types and custom Taxonomies in a user friendly way.
    6 Version: 1.1.7
     6Version: 1.1.8
    77Author: Graffino
    88Author URI: http://www.graffino.com/
     
    476476
    477477        // text fields
    478         $cptm_name         = isset( $values['cptm_name'] ) ? esc_attr( $values['cptm_name'][0] ) : '';
    479         $cptm_label        = isset( $values['cptm_label'] ) ? esc_attr( $values['cptm_label'][0] ) : '';
    480         $cptm_singular_nam = isset( $values['cptm_singular_name'] ) ? esc_attr( $values['cptm_singular_name'][0] ) : '';
    481         $cptm_description  = isset( $values['cptm_description'] ) ? esc_attr( $values['cptm_description'][0] ) : '';
     478        $cptm_name          = isset( $values['cptm_name'] ) ? esc_attr( $values['cptm_name'][0] ) : '';
     479        $cptm_label         = isset( $values['cptm_label'] ) ? esc_attr( $values['cptm_label'][0] ) : '';
     480        $cptm_singular_name = isset( $values['cptm_singular_name'] ) ? esc_attr( $values['cptm_singular_name'][0] ) : '';
     481        $cptm_description   = isset( $values['cptm_description'] ) ? esc_attr( $values['cptm_description'][0] ) : '';
    482482
    483483        // Custom post icon (uploaded)
     
    874874        $cptm_tax_show_admin_column = isset( $values['cptm_tax_show_admin_column'] ) ? esc_attr( $values['cptm_tax_show_admin_column'][0] ) : '';
    875875
    876         // checkbox fields
    877         $cptm_tax_supports                 = isset( $values['cptm_tax_supports'] ) ? unserialize( $values['cptm_tax_supports'][0] ) : array();
    878         $cptm_tax_supports_title           = ( isset( $values['cptm_tax_supports'] ) && in_array( 'title', $cptm_supports ) ? 'title' : '' );
    879         $cptm_tax_supports_editor          = ( isset( $values['cptm_tax_supports'] ) && in_array( 'editor', $cptm_supports ) ? 'editor' : '' );
    880         $cptm_tax_supports_excerpt         = ( isset( $values['cptm_tax_supports'] ) && in_array( 'excerpt', $cptm_supports ) ? 'excerpt' : '' );
    881         $cptm_tax_supports_trackbacks      = ( isset( $values['cptm_tax_supports'] ) && in_array( 'trackbacks', $cptm_supports ) ? 'trackbacks' : '' );
    882         $cptm_tax_supports_custom_fields   = ( isset( $values['cptm_tax_supports'] ) && in_array( 'custom-fields', $cptm_supports ) ? 'custom-fields' : '' );
    883         $cptm_tax_supports_comments        = ( isset( $values['cptm_tax_supports'] ) && in_array( 'comments', $cptm_supports ) ? 'comments' : '' );
    884         $cptm_tax_supports_revisions       = ( isset( $values['cptm_tax_supports'] ) && in_array( 'revisions', $cptm_supports ) ? 'revisions' : '' );
    885         $cptm_tax_supports_featured_image  = ( isset( $values['cptm_tax_supports'] ) && in_array( 'thumbnail', $cptm_supports ) ? 'thumbnail' : '' );
    886         $cptm_tax_supports_author          = ( isset( $values['cptm_tax_supports'] ) && in_array( 'author', $cptm_supports ) ? 'author' : '' );
    887         $cptm_tax_supports_page_attributes = ( isset( $values['cptm_tax_supports'] ) && in_array( 'page-attributes', $cptm_supports ) ? 'page-attributes' : '' );
    888         $cptm_tax_supports_post_formats    = ( isset( $values['cptm_tax_supports'] ) && in_array( 'post-formats', $cptm_supports ) ? 'post-formats' : '' );
    889 
    890876        $cptm_tax_post_types      = isset( $values['cptm_tax_post_types'] ) ? unserialize( $values['cptm_tax_post_types'][0] ) : array();
    891877        $cptm_tax_post_types_post = ( isset( $values['cptm_tax_post_types'] ) && in_array( 'post', $cptm_tax_post_types ) ? 'post' : '' );
     
    10551041        // update custom post type meta values
    10561042        if ( isset( $_POST['cptm_name'] ) ) {
    1057             update_post_meta( $post_id, 'cptm_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_name'] ) ) );
     1043            update_post_meta( $post_id, 'cptm_name', sanitize_text_field( strtolower( str_replace( ' ', '', $_POST['cptm_name'] ) ) ) );
    10581044        }
    10591045
  • custom-post-type-maker/trunk/readme.txt

    r2129174 r2178780  
    33Tags: custom, post, type, custom post type, custom post types, maker, make, cpt, post types, taxonomy, taxonomies, tax, custom taxonomies
    44Requires at least: 3.0.0
    5 Tested up to: 5.2
    6 Stable tag: 1.1.7
     5Tested up to: 5.3
     6Stable tag: 1.1.8
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6767== Changelog ==
    6868
     69= 1.1.8
     70- Fixes undefined variable (Thanks @richardshea,@kubik101)[#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21), [#20](https://github.com/Graffino/Custom-Post-Type-Maker/issues/21)
     71
    6972= 1.1.7
    7073- Makes code compatible with WordPressCore PHP Linter
Note: See TracChangeset for help on using the changeset viewer.