Plugin Directory

Changeset 1706357


Ignore:
Timestamp:
08/01/2017 01:52:57 PM (9 years ago)
Author:
graffino
Message:

[Bugfix] Make available in when set to (Credit: @cmerrick). Closes: #7(https://github.com/Graffino/Custom-Post-Type-Maker/issues/7)

Location:
custom-post-type-maker
Files:
4 edited
6 copied

Legend:

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

    r1644953 r1706357  
    11## Changelog
     2
     3### 1.1.2
     4- [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7)
    25
    36### 1.1.1
  • custom-post-type-maker/tags/1.1.2/README.md

    r1644993 r1706357  
    2323
    2424## Changelog
     25
     26### 1.1.2
     27- [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7)
    2528
    2629### 1.1.1
  • custom-post-type-maker/tags/1.1.2/custom-post-type-maker.php

    r1644953 r1706357  
    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.1
     6Version: 1.1.2
    77Author: Graffino
    88Author URI: http://www.graffino.com/
     
    2525 * @license     http://www.gnu.org/licenses/gpl-2.0.html GPLv2
    2626 * @package     Custom_Post_Types_Maker
    27  * @version     1.1.1
     27 * @version     1.1.2
    2828 */
    2929
     
    4040 * @since   1.0.0
    4141 */
    42 class Cptm {
    43 
    44     // vars
    45     var $dir,
    46         $path,
    47         $version;
    48 
    49     function __construct() {
    50 
     42class Cptm
     43{
     44   
     45
     46    /** @var string $dir Plugin dir */
     47    private $dir;
     48    /** @var string $path Plugin path */
     49    private $path;
     50    /** @var string $version Plugin version */
     51    private $version;
     52
     53    /**
     54     * Constructor
     55     */
     56    function __construct()
     57    {
    5158        // vars
    5259        $this->dir = plugins_url( '', __FILE__ );
    5360        $this->path = plugin_dir_path( __FILE__ );
    54         $this->version = '1.1.1';
     61        $this->version = '1.1.2';
    5562
    5663        // actions
     
    8087        // set textdomain
    8188        load_plugin_textdomain( 'cptm', false, basename( dirname(__FILE__) ).'/lang' );
    82 
    83     }  // # function __construct()
    84 
    85     public function init() {
    86 
     89    }
     90
     91    /**
     92     * Initialize plugin
     93     */
     94    public function init()
     95    {
    8796        // Create cptm post type
    8897        $labels = array(
     
    147156            add_image_size( 'cptm_icon', 16, 16, true );
    148157        }
    149 
    150     } // # function init()
    151 
    152     public function cptm_admin_menu() {
    153 
     158    }
     159
     160    /**
     161     * Add admin menu items
     162     */
     163    public function cptm_admin_menu()
     164    {
    154165        // add cptm page to options menu
    155166        add_menu_page( __('CPT Maker', 'custom-post-type-maker' ), __('Post Types', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm', '', 'dashicons-layout' );
    156167        add_submenu_page( 'edit.php?post_type=cptm', __('Taxonomies', 'custom-post-type-maker' ), __('Taxonomies', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm_tax' );
    157 
    158     } // # function cptm_admin_menu()
    159 
    160     public function cptm_styles( $hook ) {
    161 
     168    }
     169   
     170    /**
     171     * Register admin styles
     172     *
     173     * @param string $hook Wordpress hook
     174     */
     175    public function cptm_styles( $hook )
     176    {
    162177        // register overview style
    163178        if ( $hook == 'edit.php' && isset($_GET['post_type']) && ( $_GET['post_type'] == 'cptm' || $_GET['post_type'] == 'cptm_tax' ) ) {
     
    182197            wp_enqueue_media();
    183198        }
    184 
    185     } // # function cptm_styles()
    186 
    187     public function cptm_create_custom_post_types() {
    188 
     199    }
     200   
     201    /**
     202     * Create custom post types
     203     */
     204    public function cptm_create_custom_post_types()
     205    {
    189206        // vars
    190207        $cptms = array();
     
    201218
    202219        // create array of post meta
    203         if( $cptm_post_types ) {
    204             foreach( $cptm_post_types as $cptm ) {
     220        if ( $cptm_post_types ) {
     221            foreach ( $cptm_post_types as $cptm ) {
    205222                $cptm_meta = get_post_meta( $cptm->ID, '', true );
    206223
     
    257274                $cptm_rewrite_options     = array();
    258275                if ( $cptm_rewrite )      { $cptm_rewrite_options['slug'] = _x( $cptm_custom_rewrite_slug, 'URL Slug', 'custom-post-type-maker' ); }
    259                 if ( $cptm_withfront )    { $cptm_rewrite_options['with_front'] = $cptm_withfront; }
     276               
     277                $cptm_rewrite_options['with_front'] = $cptm_withfront;
     278
    260279                if ( $cptm_feeds )        { $cptm_rewrite_options['feeds'] = $cptm_feeds; }
    261280                if ( $cptm_pages )        { $cptm_rewrite_options['pages'] = $cptm_pages; }
     
    283302                    'cptm_builtin_taxonomies'  => unserialize( $cptm_builtin_taxonomies ),
    284303                );
    285 
     304               
    286305                // register custom post types
    287306                if ( is_array( $cptms ) ) {
     
    320339                            'taxonomies'          => $cptm_post_type['cptm_builtin_taxonomies']
    321340                        );
    322 
    323                         if( $cptm_post_type['cptm_name'] != 'no_name' )
     341                        var_dump($args); //die();
     342                        if ( $cptm_post_type['cptm_name'] != 'no_name' )
    324343                            register_post_type( $cptm_post_type['cptm_name'], $args);
    325344                    }
     
    338357
    339358        // create array of post meta
    340         if( $cptm_taxonomies ) {
    341             foreach( $cptm_taxonomies as $cptm_tax ) {
     359        if ( $cptm_taxonomies ) {
     360            foreach ( $cptm_taxonomies as $cptm_tax ) {
    342361                $cptm_meta = get_post_meta( $cptm_tax->ID, '', true );
    343362
     
    401420                        );
    402421
    403                         if( $cptm_taxonomy['cptm_tax_name'] != 'no_name' )
     422                        if ( $cptm_taxonomy['cptm_tax_name'] != 'no_name' )
    404423                            register_taxonomy( $cptm_taxonomy['cptm_tax_name'], $cptm_taxonomy['cptm_tax_builtin_taxonomies'], $args );
    405424                    }
     
    407426            }
    408427        }
    409     } // # function cptm_create_custom_post_types()
    410 
    411     public function cptm_create_meta_boxes() {
    412 
     428    }
     429
     430    /**
     431     * Create admin meta boxes
     432     */
     433    public function cptm_create_meta_boxes()
     434    {
    413435        // add options meta box
    414436        add_meta_box(
     
    428450            'high'
    429451        );
    430 
    431     } // # function cptm_create_meta_boxes()
    432 
     452    }
     453   
     454    /**
     455     * Create custom post meta box
     456     *
     457     * @param  object $post Wordpress $post object
     458     */
    433459    public function cptm_meta_box( $post ) {
    434 
    435460        // get post meta values
    436461        $values = get_post_custom( $post->ID );
     
    798823
    799824        <?php
    800 
    801     } // # function cptm_meta_box()
    802 
    803     public function cptm_tax_meta_box( $post ) {
    804 
     825    }
     826
     827    /**
     828     * Create custom post taxonomy meta box
     829     *
     830     * @param  object $post Wordpress $post object
     831     */
     832    public function cptm_tax_meta_box( $post )
     833    {
    805834        // get post meta values
    806835        $values = get_post_custom( $post->ID );
     
    951980        </table>
    952981        <?php
    953 
    954     } // # function cptm_meta_box()
    955 
    956     public function cptm_save_post( $post_id ) {
    957 
     982    }
     983   
     984    /**
     985     * Save custom post
     986     *
     987     * @param  int $post_id Wordpress Post ID
     988     */
     989    public function cptm_save_post( $post_id )
     990    {
    958991        // verify if this is an auto save routine.
    959992        // If it is our form has not been submitted, so we dont want to do anything
     
    962995
    963996        // if our nonce isn't there, or we can't verify it, bail
    964         if( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return;
     997        if ( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return;
    965998
    966999        // update custom post type meta values
    967         if( isset($_POST['cptm_name']) )
     1000        if ( isset($_POST['cptm_name']) )
    9681001            update_post_meta( $post_id, 'cptm_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_name'] ) ) );
    9691002
    970         if( isset($_POST['cptm_label']) )
     1003        if ( isset($_POST['cptm_label']) )
    9711004            update_post_meta( $post_id, 'cptm_label', sanitize_text_field( $_POST['cptm_label'] ) );
    9721005
    973         if( isset($_POST['cptm_singular_name']) )
     1006        if ( isset($_POST['cptm_singular_name']) )
    9741007            update_post_meta( $post_id, 'cptm_singular_name', sanitize_text_field( $_POST['cptm_singular_name'] ) );
    9751008
    976         if( isset($_POST['cptm_description']) )
     1009        if ( isset($_POST['cptm_description']) )
    9771010            update_post_meta( $post_id, 'cptm_description', esc_textarea( $_POST['cptm_description'] ) );
    9781011
    979         if( isset($_POST['cptm_icon_slug']) )
     1012        if ( isset($_POST['cptm_icon_slug']) )
    9801013            update_post_meta( $post_id, 'cptm_icon_slug', esc_textarea( $_POST['cptm_icon_slug'] ) );
    9811014       
    982         if( isset($_POST['cptm_icon_url']) )
     1015        if ( isset($_POST['cptm_icon_url']) )
    9831016            update_post_meta( $post_id, 'cptm_icon_url', esc_textarea( $_POST['cptm_icon_url'] ) );
    9841017
    985         if( isset( $_POST['cptm_public'] ) )
     1018        if ( isset( $_POST['cptm_public'] ) )
    9861019            update_post_meta( $post_id, 'cptm_public', esc_attr( $_POST['cptm_public'] ) );
    9871020
    988         if( isset( $_POST['cptm_show_ui'] ) )
     1021        if ( isset( $_POST['cptm_show_ui'] ) )
    9891022            update_post_meta( $post_id, 'cptm_show_ui', esc_attr( $_POST['cptm_show_ui'] ) );
    9901023
    991         if( isset( $_POST['cptm_has_archive'] ) )
     1024        if ( isset( $_POST['cptm_has_archive'] ) )
    9921025            update_post_meta( $post_id, 'cptm_has_archive', esc_attr( $_POST['cptm_has_archive'] ) );
    9931026
    994         if( isset( $_POST['cptm_exclude_from_search'] ) )
     1027        if ( isset( $_POST['cptm_exclude_from_search'] ) )
    9951028            update_post_meta( $post_id, 'cptm_exclude_from_search', esc_attr( $_POST['cptm_exclude_from_search'] ) );
    9961029
    997         if( isset( $_POST['cptm_capability_type'] ) )
     1030        if ( isset( $_POST['cptm_capability_type'] ) )
    9981031            update_post_meta( $post_id, 'cptm_capability_type', esc_attr( $_POST['cptm_capability_type'] ) );
    9991032
    1000         if( isset( $_POST['cptm_hierarchical'] ) )
     1033        if ( isset( $_POST['cptm_hierarchical'] ) )
    10011034            update_post_meta( $post_id, 'cptm_hierarchical', esc_attr( $_POST['cptm_hierarchical'] ) );
    10021035
    1003         if( isset( $_POST['cptm_rewrite'] ) )
     1036        if ( isset( $_POST['cptm_rewrite'] ) )
    10041037            update_post_meta( $post_id, 'cptm_rewrite', esc_attr( $_POST['cptm_rewrite'] ) );
    10051038
    1006         if( isset( $_POST['cptm_withfront'] ) )
     1039        if ( isset( $_POST['cptm_withfront'] ) )
    10071040            update_post_meta( $post_id, 'cptm_withfront', esc_attr( $_POST['cptm_withfront'] ) );
    10081041
    1009         if( isset( $_POST['cptm_feeds'] ) )
     1042        if ( isset( $_POST['cptm_feeds'] ) )
    10101043            update_post_meta( $post_id, 'cptm_feeds', esc_attr( $_POST['cptm_feeds'] ) );
    10111044
    1012         if( isset( $_POST['cptm_pages'] ) )
     1045        if ( isset( $_POST['cptm_pages'] ) )
    10131046            update_post_meta( $post_id, 'cptm_pages', esc_attr( $_POST['cptm_pages'] ) );
    10141047
    1015         if( isset($_POST['cptm_custom_rewrite_slug']) )
     1048        if ( isset($_POST['cptm_custom_rewrite_slug']) )
    10161049            update_post_meta( $post_id, 'cptm_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_custom_rewrite_slug'] ) );
    10171050
    1018         if( isset( $_POST['cptm_query_var'] ) )
     1051        if ( isset( $_POST['cptm_query_var'] ) )
    10191052            update_post_meta( $post_id, 'cptm_query_var', esc_attr( $_POST['cptm_query_var'] ) );
    10201053       
    1021         if( isset( $_POST['cptm_publicly_queryable'] ) )
     1054        if ( isset( $_POST['cptm_publicly_queryable'] ) )
    10221055            update_post_meta( $post_id, 'cptm_publicly_queryable', esc_attr( $_POST['cptm_publicly_queryable'] ) );
    10231056
    1024         if( isset($_POST['cptm_menu_position']) )
     1057        if ( isset($_POST['cptm_menu_position']) )
    10251058            update_post_meta( $post_id, 'cptm_menu_position', sanitize_text_field( $_POST['cptm_menu_position'] ) );
    10261059
    1027         if( isset( $_POST['cptm_show_in_menu'] ) )
     1060        if ( isset( $_POST['cptm_show_in_menu'] ) )
    10281061            update_post_meta( $post_id, 'cptm_show_in_menu', esc_attr( $_POST['cptm_show_in_menu'] ) );
    10291062
     
    10351068
    10361069        // update taxonomy meta values
    1037         if( isset($_POST['cptm_tax_name']) )
     1070        if ( isset($_POST['cptm_tax_name']) )
    10381071            update_post_meta( $post_id, 'cptm_tax_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_tax_name'] ) ) );
    10391072
    1040         if( isset($_POST['cptm_tax_label']) )
     1073        if ( isset($_POST['cptm_tax_label']) )
    10411074            update_post_meta( $post_id, 'cptm_tax_label', sanitize_text_field( $_POST['cptm_tax_label'] ) );
    10421075
    1043         if( isset($_POST['cptm_tax_singular_name']) )
     1076        if ( isset($_POST['cptm_tax_singular_name']) )
    10441077            update_post_meta( $post_id, 'cptm_tax_singular_name', sanitize_text_field( $_POST['cptm_tax_singular_name'] ) );
    10451078
    1046         if( isset( $_POST['cptm_tax_show_ui'] ) )
     1079        if ( isset( $_POST['cptm_tax_show_ui'] ) )
    10471080            update_post_meta( $post_id, 'cptm_tax_show_ui', esc_attr( $_POST['cptm_tax_show_ui'] ) );
    10481081
    1049         if( isset( $_POST['cptm_tax_hierarchical'] ) )
     1082        if ( isset( $_POST['cptm_tax_hierarchical'] ) )
    10501083            update_post_meta( $post_id, 'cptm_tax_hierarchical', esc_attr( $_POST['cptm_tax_hierarchical'] ) );
    10511084
    1052         if( isset( $_POST['cptm_tax_rewrite'] ) )
     1085        if ( isset( $_POST['cptm_tax_rewrite'] ) )
    10531086            update_post_meta( $post_id, 'cptm_tax_rewrite', esc_attr( $_POST['cptm_tax_rewrite'] ) );
    10541087
    1055         if( isset($_POST['cptm_tax_custom_rewrite_slug']) )
     1088        if ( isset($_POST['cptm_tax_custom_rewrite_slug']) )
    10561089            update_post_meta( $post_id, 'cptm_tax_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_tax_custom_rewrite_slug'] ) );
    10571090
    1058         if( isset( $_POST['cptm_tax_query_var'] ) )
     1091        if ( isset( $_POST['cptm_tax_query_var'] ) )
    10591092            update_post_meta( $post_id, 'cptm_tax_query_var', esc_attr( $_POST['cptm_tax_query_var'] ) );
    10601093
    10611094        $cptm_tax_post_types = isset( $_POST['cptm_tax_post_types'] ) ? $_POST['cptm_tax_post_types'] : array();
    10621095            update_post_meta( $post_id, 'cptm_tax_post_types', $cptm_tax_post_types );
    1063            
     1096
    10641097            // Update plugin saved
    10651098            update_option( 'cptm_plugin_settings_changed', true );
    1066 
    1067     } // # function save_post()
     1099    }
    10681100   
    1069     function cptm_plugin_settings_flush_rewrite() {
     1101    /**
     1102     * Flush rewrite rules
     1103     */
     1104    function cptm_plugin_settings_flush_rewrite()
     1105    {
    10701106    if ( get_option( 'cptm_plugin_settings_changed' ) == true ) {
    10711107        flush_rewrite_rules();
    10721108        update_option( 'cptm_plugin_settings_changed', false );
    10731109    }
    1074     } // # function cptm_plugin_settings_flush_rewrite()
    1075    
    1076 
    1077     function cptm_plugin_activate_flush_rewrite() {
     1110    }
     1111
     1112    /**
     1113     * Flush rewrite rules on plugin activation
     1114     */
     1115    function cptm_plugin_activate_flush_rewrite()
     1116    {
    10781117        $this->cptm_create_custom_post_types();
    10791118        flush_rewrite_rules();
    1080     } // # function cptm_plugin_settings_flush_rewrite()
    1081 
    1082     function cptm_change_columns( $cols ) {
    1083 
     1119    }
     1120   
     1121    /**
     1122     * Modify existing columns
     1123     *
     1124     * @param  array $cols  Post columns
     1125     * @return object       Modified columns
     1126     */
     1127    function cptm_change_columns( $cols )
     1128    {
    10841129        $cols = array(
    10851130            'cb'                    => '<input type="checkbox" />',
     
    10901135        );
    10911136        return $cols;
    1092 
    1093     } // # function cptm_change_columns()
    1094 
    1095     function cptm_sortable_columns() {
    1096 
     1137    }
     1138   
     1139    /**
     1140     * Make columns sortable
     1141     *
     1142     * @return array Sortable array
     1143     */
     1144    function cptm_sortable_columns()
     1145    {
    10971146        return array(
    10981147            'title'                 => 'title'
    10991148        );
    1100 
    1101     } // # function cptm_sortable_columns()
    1102 
    1103     function cptm_custom_columns( $column, $post_id ) {
    1104 
     1149    }
     1150
     1151    /**
     1152     * Insert custom column
     1153     *
     1154     * @param  string $column  Column name
     1155     * @param  int    $post_id Wordpress Post ID
     1156     */
     1157    function cptm_custom_columns( $column, $post_id )
     1158    {
    11051159        switch ( $column ) {
    11061160            case "custom_post_type_name":
     
    11141168                break;
    11151169        }
    1116 
    1117     } // # function cptm_custom_columns()
    1118 
    1119     function cptm_tax_change_columns( $cols ) {
    1120 
     1170    }
     1171   
     1172    /**
     1173     * Modify existing taxonomy columns
     1174     *
     1175     * @param  array $cols Taxonomy columns
     1176     * @return array       Modified taxonomy columns
     1177     */
     1178    function cptm_tax_change_columns( $cols )
     1179    {
    11211180        $cols = array(
    11221181            'cb'                    => '<input type="checkbox" />',
     
    11261185        );
    11271186        return $cols;
    1128 
    1129     } // # function cptm_tax_change_columns()
    1130 
    1131     function cptm_tax_sortable_columns() {
    1132 
     1187    }
     1188   
     1189    /**
     1190     * Make taxonomy columns sortable
     1191     *
     1192     * @return array Sortable array
     1193     */
     1194    function cptm_tax_sortable_columns()
     1195    {
    11331196        return array(
    11341197            'title'                 => 'title'
    11351198        );
    1136 
    1137     } // # function cptm_tax_sortable_columns()
    1138 
    1139     function cptm_tax_custom_columns( $column, $post_id ) {
    1140 
     1199    }
     1200   
     1201    /**
     1202     * Insert custom taxonomy columns
     1203     *
     1204     * @param  string $column  Column name
     1205     * @param  int    $post_id Wordpress Post ID
     1206     */
     1207    function cptm_tax_custom_columns( $column, $post_id )
     1208    {
    11411209        switch ( $column ) {
    11421210            case "custom_post_type_name":
     
    11471215                break;
    11481216        }
    1149 
    1150     } // # function cptm_tax_custom_columns()
    1151 
    1152     function cptm_admin_footer() {
    1153 
     1217    }
     1218   
     1219    /**
     1220     * Insert admin footer
     1221     */
     1222    function cptm_admin_footer()
     1223    {
    11541224        global $post_type;
    11551225        ?>
     
    11791249        </div>
    11801250        <?php
    1181         if( 'cptm' == $post_type ) {
     1251        if ( 'cptm' == $post_type ) {
    11821252
    11831253            // Get all public Custom Post Types
     
    12791349            }
    12801350        }
    1281         if( 'cptm_tax' == $post_type ) {
     1351        if ( 'cptm_tax' == $post_type ) {
    12821352
    12831353            // Get all public custom Taxonomies
     
    13721442            }
    13731443        }
    1374 
    1375     } // # function cptm_admin_footer()
    1376 
    1377     function cptm_post_updated_messages( $messages ) {
    1378 
     1444    }
     1445   
     1446    /**
     1447     * Update messages
     1448     *
     1449     * @param  array $messages Update messages
     1450     * @return array           Update messages
     1451     */
     1452    function cptm_post_updated_messages( $messages )
     1453    {
    13791454        global $post, $post_ID;
    13801455
     
    13951470
    13961471        return $messages;
    1397 
    1398     } // # function cptm_post_updated_messages()
    1399 
     1472    }
     1473   
     1474    /**
     1475     * Prepare attachment for Ajax Upload Request
     1476     * @param  array  $response    Response
     1477     * @param  string $attachment  File contents
     1478     * @param  array  $meta        File meta contents
     1479     *
     1480     * @return array               Modified response
     1481     */
    14001482    function wp_prepare_attachment_for_js( $response, $attachment, $meta )
    14011483    {
    14021484        // only for image
    1403         if( $response['type'] != 'image' )
     1485        if ( $response['type'] != 'image' )
    14041486        {
    14051487            return $response;
    14061488        }
    14071489
    1408 
    14091490        $attachment_url = $response['url'];
    14101491        $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url );
    14111492
    1412         if( isset( $meta['sizes'] ) && is_array($meta['sizes']) )
     1493        if ( isset( $meta['sizes'] ) && is_array($meta['sizes']) )
    14131494        {
    1414             foreach( $meta['sizes'] as $k => $v )
     1495            foreach ( $meta['sizes'] as $k => $v )
    14151496            {
    1416                 if( !isset($response['sizes'][ $k ]) )
     1497                if ( !isset($response['sizes'][ $k ]) )
    14171498                {
    14181499                    $response['sizes'][ $k ] = array(
     
    14271508
    14281509        return $response;
    1429     } // # function wp_prepare_attachment_for_js()
    1430 
     1510    }
    14311511}
    14321512
  • custom-post-type-maker/tags/1.1.2/readme.txt

    r1680040 r1706357  
    44Requires at least: 3.0.0
    55Tested up to: 4.8
    6 Stable tag: 1.1.1
     6Stable tag: 1.1.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6767== Changelog ==
    6868
     69= 1.1.2 =
     70- [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7)
     71
    6972= 1.1.1 =
    7073- [Feature] Auto-flush rewrite rules on: custom post save, plugin activation, plugin deactivation.
  • custom-post-type-maker/trunk/CHANGELOG.md

    r1644953 r1706357  
    11## Changelog
     2
     3### 1.1.2
     4- [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7)
    25
    36### 1.1.1
  • custom-post-type-maker/trunk/README.md

    r1644993 r1706357  
    2323
    2424## Changelog
     25
     26### 1.1.2
     27- [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7)
    2528
    2629### 1.1.1
  • custom-post-type-maker/trunk/custom-post-type-maker.php

    r1644953 r1706357  
    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.1
     6Version: 1.1.2
    77Author: Graffino
    88Author URI: http://www.graffino.com/
     
    2525 * @license     http://www.gnu.org/licenses/gpl-2.0.html GPLv2
    2626 * @package     Custom_Post_Types_Maker
    27  * @version     1.1.1
     27 * @version     1.1.2
    2828 */
    2929
     
    4040 * @since   1.0.0
    4141 */
    42 class Cptm {
    43 
    44     // vars
    45     var $dir,
    46         $path,
    47         $version;
    48 
    49     function __construct() {
    50 
     42class Cptm
     43{
     44   
     45
     46    /** @var string $dir Plugin dir */
     47    private $dir;
     48    /** @var string $path Plugin path */
     49    private $path;
     50    /** @var string $version Plugin version */
     51    private $version;
     52
     53    /**
     54     * Constructor
     55     */
     56    function __construct()
     57    {
    5158        // vars
    5259        $this->dir = plugins_url( '', __FILE__ );
    5360        $this->path = plugin_dir_path( __FILE__ );
    54         $this->version = '1.1.1';
     61        $this->version = '1.1.2';
    5562
    5663        // actions
     
    8087        // set textdomain
    8188        load_plugin_textdomain( 'cptm', false, basename( dirname(__FILE__) ).'/lang' );
    82 
    83     }  // # function __construct()
    84 
    85     public function init() {
    86 
     89    }
     90
     91    /**
     92     * Initialize plugin
     93     */
     94    public function init()
     95    {
    8796        // Create cptm post type
    8897        $labels = array(
     
    147156            add_image_size( 'cptm_icon', 16, 16, true );
    148157        }
    149 
    150     } // # function init()
    151 
    152     public function cptm_admin_menu() {
    153 
     158    }
     159
     160    /**
     161     * Add admin menu items
     162     */
     163    public function cptm_admin_menu()
     164    {
    154165        // add cptm page to options menu
    155166        add_menu_page( __('CPT Maker', 'custom-post-type-maker' ), __('Post Types', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm', '', 'dashicons-layout' );
    156167        add_submenu_page( 'edit.php?post_type=cptm', __('Taxonomies', 'custom-post-type-maker' ), __('Taxonomies', 'custom-post-type-maker' ), 'manage_options', 'edit.php?post_type=cptm_tax' );
    157 
    158     } // # function cptm_admin_menu()
    159 
    160     public function cptm_styles( $hook ) {
    161 
     168    }
     169   
     170    /**
     171     * Register admin styles
     172     *
     173     * @param string $hook Wordpress hook
     174     */
     175    public function cptm_styles( $hook )
     176    {
    162177        // register overview style
    163178        if ( $hook == 'edit.php' && isset($_GET['post_type']) && ( $_GET['post_type'] == 'cptm' || $_GET['post_type'] == 'cptm_tax' ) ) {
     
    182197            wp_enqueue_media();
    183198        }
    184 
    185     } // # function cptm_styles()
    186 
    187     public function cptm_create_custom_post_types() {
    188 
     199    }
     200   
     201    /**
     202     * Create custom post types
     203     */
     204    public function cptm_create_custom_post_types()
     205    {
    189206        // vars
    190207        $cptms = array();
     
    201218
    202219        // create array of post meta
    203         if( $cptm_post_types ) {
    204             foreach( $cptm_post_types as $cptm ) {
     220        if ( $cptm_post_types ) {
     221            foreach ( $cptm_post_types as $cptm ) {
    205222                $cptm_meta = get_post_meta( $cptm->ID, '', true );
    206223
     
    257274                $cptm_rewrite_options     = array();
    258275                if ( $cptm_rewrite )      { $cptm_rewrite_options['slug'] = _x( $cptm_custom_rewrite_slug, 'URL Slug', 'custom-post-type-maker' ); }
    259                 if ( $cptm_withfront )    { $cptm_rewrite_options['with_front'] = $cptm_withfront; }
     276               
     277                $cptm_rewrite_options['with_front'] = $cptm_withfront;
     278
    260279                if ( $cptm_feeds )        { $cptm_rewrite_options['feeds'] = $cptm_feeds; }
    261280                if ( $cptm_pages )        { $cptm_rewrite_options['pages'] = $cptm_pages; }
     
    283302                    'cptm_builtin_taxonomies'  => unserialize( $cptm_builtin_taxonomies ),
    284303                );
    285 
     304               
    286305                // register custom post types
    287306                if ( is_array( $cptms ) ) {
     
    320339                            'taxonomies'          => $cptm_post_type['cptm_builtin_taxonomies']
    321340                        );
    322 
    323                         if( $cptm_post_type['cptm_name'] != 'no_name' )
     341                        var_dump($args); //die();
     342                        if ( $cptm_post_type['cptm_name'] != 'no_name' )
    324343                            register_post_type( $cptm_post_type['cptm_name'], $args);
    325344                    }
     
    338357
    339358        // create array of post meta
    340         if( $cptm_taxonomies ) {
    341             foreach( $cptm_taxonomies as $cptm_tax ) {
     359        if ( $cptm_taxonomies ) {
     360            foreach ( $cptm_taxonomies as $cptm_tax ) {
    342361                $cptm_meta = get_post_meta( $cptm_tax->ID, '', true );
    343362
     
    401420                        );
    402421
    403                         if( $cptm_taxonomy['cptm_tax_name'] != 'no_name' )
     422                        if ( $cptm_taxonomy['cptm_tax_name'] != 'no_name' )
    404423                            register_taxonomy( $cptm_taxonomy['cptm_tax_name'], $cptm_taxonomy['cptm_tax_builtin_taxonomies'], $args );
    405424                    }
     
    407426            }
    408427        }
    409     } // # function cptm_create_custom_post_types()
    410 
    411     public function cptm_create_meta_boxes() {
    412 
     428    }
     429
     430    /**
     431     * Create admin meta boxes
     432     */
     433    public function cptm_create_meta_boxes()
     434    {
    413435        // add options meta box
    414436        add_meta_box(
     
    428450            'high'
    429451        );
    430 
    431     } // # function cptm_create_meta_boxes()
    432 
     452    }
     453   
     454    /**
     455     * Create custom post meta box
     456     *
     457     * @param  object $post Wordpress $post object
     458     */
    433459    public function cptm_meta_box( $post ) {
    434 
    435460        // get post meta values
    436461        $values = get_post_custom( $post->ID );
     
    798823
    799824        <?php
    800 
    801     } // # function cptm_meta_box()
    802 
    803     public function cptm_tax_meta_box( $post ) {
    804 
     825    }
     826
     827    /**
     828     * Create custom post taxonomy meta box
     829     *
     830     * @param  object $post Wordpress $post object
     831     */
     832    public function cptm_tax_meta_box( $post )
     833    {
    805834        // get post meta values
    806835        $values = get_post_custom( $post->ID );
     
    951980        </table>
    952981        <?php
    953 
    954     } // # function cptm_meta_box()
    955 
    956     public function cptm_save_post( $post_id ) {
    957 
     982    }
     983   
     984    /**
     985     * Save custom post
     986     *
     987     * @param  int $post_id Wordpress Post ID
     988     */
     989    public function cptm_save_post( $post_id )
     990    {
    958991        // verify if this is an auto save routine.
    959992        // If it is our form has not been submitted, so we dont want to do anything
     
    962995
    963996        // if our nonce isn't there, or we can't verify it, bail
    964         if( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return;
     997        if ( !isset( $_POST['cptm_meta_box_nonce_field'] ) || !wp_verify_nonce( $_POST['cptm_meta_box_nonce_field'], 'cptm_meta_box_nonce_action' ) ) return;
    965998
    966999        // update custom post type meta values
    967         if( isset($_POST['cptm_name']) )
     1000        if ( isset($_POST['cptm_name']) )
    9681001            update_post_meta( $post_id, 'cptm_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_name'] ) ) );
    9691002
    970         if( isset($_POST['cptm_label']) )
     1003        if ( isset($_POST['cptm_label']) )
    9711004            update_post_meta( $post_id, 'cptm_label', sanitize_text_field( $_POST['cptm_label'] ) );
    9721005
    973         if( isset($_POST['cptm_singular_name']) )
     1006        if ( isset($_POST['cptm_singular_name']) )
    9741007            update_post_meta( $post_id, 'cptm_singular_name', sanitize_text_field( $_POST['cptm_singular_name'] ) );
    9751008
    976         if( isset($_POST['cptm_description']) )
     1009        if ( isset($_POST['cptm_description']) )
    9771010            update_post_meta( $post_id, 'cptm_description', esc_textarea( $_POST['cptm_description'] ) );
    9781011
    979         if( isset($_POST['cptm_icon_slug']) )
     1012        if ( isset($_POST['cptm_icon_slug']) )
    9801013            update_post_meta( $post_id, 'cptm_icon_slug', esc_textarea( $_POST['cptm_icon_slug'] ) );
    9811014       
    982         if( isset($_POST['cptm_icon_url']) )
     1015        if ( isset($_POST['cptm_icon_url']) )
    9831016            update_post_meta( $post_id, 'cptm_icon_url', esc_textarea( $_POST['cptm_icon_url'] ) );
    9841017
    985         if( isset( $_POST['cptm_public'] ) )
     1018        if ( isset( $_POST['cptm_public'] ) )
    9861019            update_post_meta( $post_id, 'cptm_public', esc_attr( $_POST['cptm_public'] ) );
    9871020
    988         if( isset( $_POST['cptm_show_ui'] ) )
     1021        if ( isset( $_POST['cptm_show_ui'] ) )
    9891022            update_post_meta( $post_id, 'cptm_show_ui', esc_attr( $_POST['cptm_show_ui'] ) );
    9901023
    991         if( isset( $_POST['cptm_has_archive'] ) )
     1024        if ( isset( $_POST['cptm_has_archive'] ) )
    9921025            update_post_meta( $post_id, 'cptm_has_archive', esc_attr( $_POST['cptm_has_archive'] ) );
    9931026
    994         if( isset( $_POST['cptm_exclude_from_search'] ) )
     1027        if ( isset( $_POST['cptm_exclude_from_search'] ) )
    9951028            update_post_meta( $post_id, 'cptm_exclude_from_search', esc_attr( $_POST['cptm_exclude_from_search'] ) );
    9961029
    997         if( isset( $_POST['cptm_capability_type'] ) )
     1030        if ( isset( $_POST['cptm_capability_type'] ) )
    9981031            update_post_meta( $post_id, 'cptm_capability_type', esc_attr( $_POST['cptm_capability_type'] ) );
    9991032
    1000         if( isset( $_POST['cptm_hierarchical'] ) )
     1033        if ( isset( $_POST['cptm_hierarchical'] ) )
    10011034            update_post_meta( $post_id, 'cptm_hierarchical', esc_attr( $_POST['cptm_hierarchical'] ) );
    10021035
    1003         if( isset( $_POST['cptm_rewrite'] ) )
     1036        if ( isset( $_POST['cptm_rewrite'] ) )
    10041037            update_post_meta( $post_id, 'cptm_rewrite', esc_attr( $_POST['cptm_rewrite'] ) );
    10051038
    1006         if( isset( $_POST['cptm_withfront'] ) )
     1039        if ( isset( $_POST['cptm_withfront'] ) )
    10071040            update_post_meta( $post_id, 'cptm_withfront', esc_attr( $_POST['cptm_withfront'] ) );
    10081041
    1009         if( isset( $_POST['cptm_feeds'] ) )
     1042        if ( isset( $_POST['cptm_feeds'] ) )
    10101043            update_post_meta( $post_id, 'cptm_feeds', esc_attr( $_POST['cptm_feeds'] ) );
    10111044
    1012         if( isset( $_POST['cptm_pages'] ) )
     1045        if ( isset( $_POST['cptm_pages'] ) )
    10131046            update_post_meta( $post_id, 'cptm_pages', esc_attr( $_POST['cptm_pages'] ) );
    10141047
    1015         if( isset($_POST['cptm_custom_rewrite_slug']) )
     1048        if ( isset($_POST['cptm_custom_rewrite_slug']) )
    10161049            update_post_meta( $post_id, 'cptm_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_custom_rewrite_slug'] ) );
    10171050
    1018         if( isset( $_POST['cptm_query_var'] ) )
     1051        if ( isset( $_POST['cptm_query_var'] ) )
    10191052            update_post_meta( $post_id, 'cptm_query_var', esc_attr( $_POST['cptm_query_var'] ) );
    10201053       
    1021         if( isset( $_POST['cptm_publicly_queryable'] ) )
     1054        if ( isset( $_POST['cptm_publicly_queryable'] ) )
    10221055            update_post_meta( $post_id, 'cptm_publicly_queryable', esc_attr( $_POST['cptm_publicly_queryable'] ) );
    10231056
    1024         if( isset($_POST['cptm_menu_position']) )
     1057        if ( isset($_POST['cptm_menu_position']) )
    10251058            update_post_meta( $post_id, 'cptm_menu_position', sanitize_text_field( $_POST['cptm_menu_position'] ) );
    10261059
    1027         if( isset( $_POST['cptm_show_in_menu'] ) )
     1060        if ( isset( $_POST['cptm_show_in_menu'] ) )
    10281061            update_post_meta( $post_id, 'cptm_show_in_menu', esc_attr( $_POST['cptm_show_in_menu'] ) );
    10291062
     
    10351068
    10361069        // update taxonomy meta values
    1037         if( isset($_POST['cptm_tax_name']) )
     1070        if ( isset($_POST['cptm_tax_name']) )
    10381071            update_post_meta( $post_id, 'cptm_tax_name', sanitize_text_field( str_replace( ' ', '', $_POST['cptm_tax_name'] ) ) );
    10391072
    1040         if( isset($_POST['cptm_tax_label']) )
     1073        if ( isset($_POST['cptm_tax_label']) )
    10411074            update_post_meta( $post_id, 'cptm_tax_label', sanitize_text_field( $_POST['cptm_tax_label'] ) );
    10421075
    1043         if( isset($_POST['cptm_tax_singular_name']) )
     1076        if ( isset($_POST['cptm_tax_singular_name']) )
    10441077            update_post_meta( $post_id, 'cptm_tax_singular_name', sanitize_text_field( $_POST['cptm_tax_singular_name'] ) );
    10451078
    1046         if( isset( $_POST['cptm_tax_show_ui'] ) )
     1079        if ( isset( $_POST['cptm_tax_show_ui'] ) )
    10471080            update_post_meta( $post_id, 'cptm_tax_show_ui', esc_attr( $_POST['cptm_tax_show_ui'] ) );
    10481081
    1049         if( isset( $_POST['cptm_tax_hierarchical'] ) )
     1082        if ( isset( $_POST['cptm_tax_hierarchical'] ) )
    10501083            update_post_meta( $post_id, 'cptm_tax_hierarchical', esc_attr( $_POST['cptm_tax_hierarchical'] ) );
    10511084
    1052         if( isset( $_POST['cptm_tax_rewrite'] ) )
     1085        if ( isset( $_POST['cptm_tax_rewrite'] ) )
    10531086            update_post_meta( $post_id, 'cptm_tax_rewrite', esc_attr( $_POST['cptm_tax_rewrite'] ) );
    10541087
    1055         if( isset($_POST['cptm_tax_custom_rewrite_slug']) )
     1088        if ( isset($_POST['cptm_tax_custom_rewrite_slug']) )
    10561089            update_post_meta( $post_id, 'cptm_tax_custom_rewrite_slug', sanitize_text_field( $_POST['cptm_tax_custom_rewrite_slug'] ) );
    10571090
    1058         if( isset( $_POST['cptm_tax_query_var'] ) )
     1091        if ( isset( $_POST['cptm_tax_query_var'] ) )
    10591092            update_post_meta( $post_id, 'cptm_tax_query_var', esc_attr( $_POST['cptm_tax_query_var'] ) );
    10601093
    10611094        $cptm_tax_post_types = isset( $_POST['cptm_tax_post_types'] ) ? $_POST['cptm_tax_post_types'] : array();
    10621095            update_post_meta( $post_id, 'cptm_tax_post_types', $cptm_tax_post_types );
    1063            
     1096
    10641097            // Update plugin saved
    10651098            update_option( 'cptm_plugin_settings_changed', true );
    1066 
    1067     } // # function save_post()
     1099    }
    10681100   
    1069     function cptm_plugin_settings_flush_rewrite() {
     1101    /**
     1102     * Flush rewrite rules
     1103     */
     1104    function cptm_plugin_settings_flush_rewrite()
     1105    {
    10701106    if ( get_option( 'cptm_plugin_settings_changed' ) == true ) {
    10711107        flush_rewrite_rules();
    10721108        update_option( 'cptm_plugin_settings_changed', false );
    10731109    }
    1074     } // # function cptm_plugin_settings_flush_rewrite()
    1075    
    1076 
    1077     function cptm_plugin_activate_flush_rewrite() {
     1110    }
     1111
     1112    /**
     1113     * Flush rewrite rules on plugin activation
     1114     */
     1115    function cptm_plugin_activate_flush_rewrite()
     1116    {
    10781117        $this->cptm_create_custom_post_types();
    10791118        flush_rewrite_rules();
    1080     } // # function cptm_plugin_settings_flush_rewrite()
    1081 
    1082     function cptm_change_columns( $cols ) {
    1083 
     1119    }
     1120   
     1121    /**
     1122     * Modify existing columns
     1123     *
     1124     * @param  array $cols  Post columns
     1125     * @return object       Modified columns
     1126     */
     1127    function cptm_change_columns( $cols )
     1128    {
    10841129        $cols = array(
    10851130            'cb'                    => '<input type="checkbox" />',
     
    10901135        );
    10911136        return $cols;
    1092 
    1093     } // # function cptm_change_columns()
    1094 
    1095     function cptm_sortable_columns() {
    1096 
     1137    }
     1138   
     1139    /**
     1140     * Make columns sortable
     1141     *
     1142     * @return array Sortable array
     1143     */
     1144    function cptm_sortable_columns()
     1145    {
    10971146        return array(
    10981147            'title'                 => 'title'
    10991148        );
    1100 
    1101     } // # function cptm_sortable_columns()
    1102 
    1103     function cptm_custom_columns( $column, $post_id ) {
    1104 
     1149    }
     1150
     1151    /**
     1152     * Insert custom column
     1153     *
     1154     * @param  string $column  Column name
     1155     * @param  int    $post_id Wordpress Post ID
     1156     */
     1157    function cptm_custom_columns( $column, $post_id )
     1158    {
    11051159        switch ( $column ) {
    11061160            case "custom_post_type_name":
     
    11141168                break;
    11151169        }
    1116 
    1117     } // # function cptm_custom_columns()
    1118 
    1119     function cptm_tax_change_columns( $cols ) {
    1120 
     1170    }
     1171   
     1172    /**
     1173     * Modify existing taxonomy columns
     1174     *
     1175     * @param  array $cols Taxonomy columns
     1176     * @return array       Modified taxonomy columns
     1177     */
     1178    function cptm_tax_change_columns( $cols )
     1179    {
    11211180        $cols = array(
    11221181            'cb'                    => '<input type="checkbox" />',
     
    11261185        );
    11271186        return $cols;
    1128 
    1129     } // # function cptm_tax_change_columns()
    1130 
    1131     function cptm_tax_sortable_columns() {
    1132 
     1187    }
     1188   
     1189    /**
     1190     * Make taxonomy columns sortable
     1191     *
     1192     * @return array Sortable array
     1193     */
     1194    function cptm_tax_sortable_columns()
     1195    {
    11331196        return array(
    11341197            'title'                 => 'title'
    11351198        );
    1136 
    1137     } // # function cptm_tax_sortable_columns()
    1138 
    1139     function cptm_tax_custom_columns( $column, $post_id ) {
    1140 
     1199    }
     1200   
     1201    /**
     1202     * Insert custom taxonomy columns
     1203     *
     1204     * @param  string $column  Column name
     1205     * @param  int    $post_id Wordpress Post ID
     1206     */
     1207    function cptm_tax_custom_columns( $column, $post_id )
     1208    {
    11411209        switch ( $column ) {
    11421210            case "custom_post_type_name":
     
    11471215                break;
    11481216        }
    1149 
    1150     } // # function cptm_tax_custom_columns()
    1151 
    1152     function cptm_admin_footer() {
    1153 
     1217    }
     1218   
     1219    /**
     1220     * Insert admin footer
     1221     */
     1222    function cptm_admin_footer()
     1223    {
    11541224        global $post_type;
    11551225        ?>
     
    11791249        </div>
    11801250        <?php
    1181         if( 'cptm' == $post_type ) {
     1251        if ( 'cptm' == $post_type ) {
    11821252
    11831253            // Get all public Custom Post Types
     
    12791349            }
    12801350        }
    1281         if( 'cptm_tax' == $post_type ) {
     1351        if ( 'cptm_tax' == $post_type ) {
    12821352
    12831353            // Get all public custom Taxonomies
     
    13721442            }
    13731443        }
    1374 
    1375     } // # function cptm_admin_footer()
    1376 
    1377     function cptm_post_updated_messages( $messages ) {
    1378 
     1444    }
     1445   
     1446    /**
     1447     * Update messages
     1448     *
     1449     * @param  array $messages Update messages
     1450     * @return array           Update messages
     1451     */
     1452    function cptm_post_updated_messages( $messages )
     1453    {
    13791454        global $post, $post_ID;
    13801455
     
    13951470
    13961471        return $messages;
    1397 
    1398     } // # function cptm_post_updated_messages()
    1399 
     1472    }
     1473   
     1474    /**
     1475     * Prepare attachment for Ajax Upload Request
     1476     * @param  array  $response    Response
     1477     * @param  string $attachment  File contents
     1478     * @param  array  $meta        File meta contents
     1479     *
     1480     * @return array               Modified response
     1481     */
    14001482    function wp_prepare_attachment_for_js( $response, $attachment, $meta )
    14011483    {
    14021484        // only for image
    1403         if( $response['type'] != 'image' )
     1485        if ( $response['type'] != 'image' )
    14041486        {
    14051487            return $response;
    14061488        }
    14071489
    1408 
    14091490        $attachment_url = $response['url'];
    14101491        $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url );
    14111492
    1412         if( isset( $meta['sizes'] ) && is_array($meta['sizes']) )
     1493        if ( isset( $meta['sizes'] ) && is_array($meta['sizes']) )
    14131494        {
    1414             foreach( $meta['sizes'] as $k => $v )
     1495            foreach ( $meta['sizes'] as $k => $v )
    14151496            {
    1416                 if( !isset($response['sizes'][ $k ]) )
     1497                if ( !isset($response['sizes'][ $k ]) )
    14171498                {
    14181499                    $response['sizes'][ $k ] = array(
     
    14271508
    14281509        return $response;
    1429     } // # function wp_prepare_attachment_for_js()
    1430 
     1510    }
    14311511}
    14321512
  • custom-post-type-maker/trunk/readme.txt

    r1680040 r1706357  
    44Requires at least: 3.0.0
    55Tested up to: 4.8
    6 Stable tag: 1.1.1
     6Stable tag: 1.1.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6767== Changelog ==
    6868
     69= 1.1.2 =
     70- [Bugfix] Make `with_front` available in `register_post` when set to `false` (Credit: @cmerrick). Closes: [#7](https://github.com/Graffino/Custom-Post-Type-Maker/issues/7)
     71
    6972= 1.1.1 =
    7073- [Feature] Auto-flush rewrite rules on: custom post save, plugin activation, plugin deactivation.
Note: See TracChangeset for help on using the changeset viewer.