cap ) or empty( $post_type_object->cap->create_posts ) ) { return false; } if( strpos( $post_type_object->cap->create_posts , 'edit_' ) === false ) { return false; } $exclude = array( 'custom_css' ); if( in_array( $post_type , $exclude ) ) { return false; } $setting_data = self::get_setting_data(); if( empty( $setting_data['change_cap_create_posts'] ) ) { return false; } $post_type_object->cap->create_posts = str_replace( 'edit_' , 'create_' , $post_type_object->cap->create_posts ); self::after_do_function( __FUNCTION__ ); } } MywpControllerModuleSitePostType::init(); endif;