Changeset 1946407
- Timestamp:
- 09/24/2018 09:59:32 PM (8 years ago)
- Location:
- ultimate-cms
- Files:
-
- 3 added
- 16 edited
-
assets (added)
-
assets/banner-772x250.png (added)
-
assets/icon-128x128.png (added)
-
trunk/class-xydac-ultimate-cms-core.php (modified) (1 diff)
-
trunk/index.php (modified) (1 diff)
-
trunk/modules/post-type/class-xydac-post-type-manager.php (modified) (2 diffs)
-
trunk/modules/post-type/class-xydac-post-type-use.php (modified) (1 diff)
-
trunk/modules/post-type/class-xydac-post-type.php (modified) (2 diffs)
-
trunk/modules/taxonomy/class-xydac-taxonomy-type-manager.php (modified) (2 diffs)
-
trunk/modules/taxonomy/class-xydac-taxonomy-type.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/screenshot-1.jpg (modified) (previous)
-
trunk/screenshot-2.jpg (modified) (previous)
-
trunk/screenshot-3.jpg (modified) (previous)
-
trunk/screenshot-4.jpg (modified) (previous)
-
trunk/screenshot-5.jpg (modified) (previous)
-
trunk/screenshot-6.jpg (modified) (previous)
-
trunk/screenshot-7.jpg (modified) (previous)
-
trunk/screenshot-8.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
ultimate-cms/trunk/class-xydac-ultimate-cms-core.php
r1942060 r1946407 307 307 308 308 if(!empty($this->xydac_core_message)) { 309 echo '<div id="message" class=" updated below-h2"><p>'.$this->xydac_core_message.'</p></div>';309 echo '<div id="message" class="notice updated below-h2 is-dismissible"><p>'.$this->xydac_core_message.'</p></div>'; 310 310 } 311 311 312 312 if(!empty($this->xydac_core_error) && is_wp_error($this->xydac_core_error)) { 313 echo '<div id="error" class=" error below-h2"><p>'.$this->xydac_core_error->get_error_message().'</p></div>';313 echo '<div id="error" class="notice error below-h2 is-dismissible"><p>'.$this->xydac_core_error->get_error_message().'</p></div>'; 314 314 } 315 315 ?> -
ultimate-cms/trunk/index.php
r1942060 r1946407 6 6 Author: XYDAC 7 7 Author URI: http://xydac.com/ 8 Version: 2.0. 08 Version: 2.0.1 9 9 License: GPL2*/ 10 10 -
ultimate-cms/trunk/modules/post-type/class-xydac-post-type-manager.php
r1942060 r1946407 76 76 add_action('xydac_core_insert_update',array($this,'xydac_core_insert_update')); 77 77 add_action('xydac_core_rightfoot',array($this,'xydac_core_rightfoot')); 78 79 add_action('xydac_core_head',array($this,'xydac_core_head')); 78 80 79 81 … … 94 96 $fields = xydac()->modules->post_type->get_field($this->xydac_editdata['name']); 95 97 echo '<div class="editbox">'; 96 echo '<h3>'.__("Available Short codes" ).'</h3>';98 echo '<h3>'.__("Available Short codes", XYDAC_CMS_NAME).'</h3>'; 97 99 foreach($fields as $k=>$field){ 98 100 echo '<pre>[xydac_field]'.$field['field_name'].'[/xydac_field]</pre>';// 99 101 } 100 102 echo '</div>'; 103 } 104 } 105 106 function xydac_core_head($data){ 107 if($data->xydac_core_editmode && ($data->xydac_editdata[$data->namefield_name] == 'post' || $data->xydac_editdata[$data->namefield_name] == 'page')){ 108 $data->xydac_core_error = new WP_Error('error',$data->xydac_editdata[$data->namefield_name]. __(' can not be edited',XYDAC_CMS_NAME)); 109 $data->xydac_core_editmode = false; 101 110 } 102 111 } -
ultimate-cms/trunk/modules/post-type/class-xydac-post-type-use.php
r1942060 r1946407 11 11 add_action('save_post',array($this,'custom_meta_save')); 12 12 add_action('wp_ajax_xydac_cms_post_type', array($this,'xydac_cms_ajax' )); 13 13 14 } 15 14 16 15 17 function xydac_cms_ajax() -
ultimate-cms/trunk/modules/post-type/class-xydac-post-type.php
r1942060 r1946407 34 34 new xydac_post_type_functions(); 35 35 36 //- Future Enhacement for add ing custom rest endpoint 37 //add_action('rest_api_init',array($this,'rest_api_init')); 38 39 } 40 //- Future Enhacement for add ing custom rest endpoint 41 /* 42 function getData($request){ 43 /*var_dump($request->get_method()); 44 var_dump($request->get_query_params()); 45 var_dump($request->get_route());* / 46 $data = get_posts( array( 47 'post_type' => 'cars', 48 'post_status' => 'publish', 49 'posts_per_page' => 20, 50 ) ); 51 52 foreach($data as $k=>$d){ 53 $data[$k]->{'meta'} = get_post_meta($d->ID); 54 } 36 55 56 // @TODO do your magic here 57 return new WP_REST_Response( $data, 200 ); 37 58 } 59 60 61 function rest_api_init(){ 62 $cpts = stripslashes_deep($this->get_active()); 63 if (is_array($cpts) && !empty($cpts)) 64 foreach ($cpts as $k=>$cpt ) 65 { 66 if($cpt['name'] !='post' && $cpt['name'] !='page'){ 67 register_rest_route( 'xydac/v1', $cpt['name'], array( 68 'methods' => 'GET', 69 'callback' => array($this, 'getData') 70 )); 71 } 72 } 73 74 } 75 */ 38 76 39 77 function init(){ … … 42 80 foreach ($cpts as $k=>$cpt ) 43 81 { 44 $xy_cpt['name'] = $cpt['name']; 45 $xy_cpt['args']['label'] = !empty($cpt['args']['label']) ? $cpt['args']['label'] : $xy_cpt['name']; 46 $xy_cpt['args']['labels']['name'] = !empty($cpt['args']['labels']['name']) ? $cpt['args']['labels']['name'] : __($xy_cpt['args']['label']); 47 $xy_cpt['args']['labels']['singular_name'] = !empty($cpt['args']['labels']['singular_name']) ? $cpt['args']['labels']['singular_name'] : __($xy_cpt['args']['labels']['name']); 48 $xy_cpt['args']['labels']['add_new'] = !empty($cpt['args']['labels']['add_new']) ? $cpt['args']['labels']['add_new'] : __('Add New'); 49 $xy_cpt['args']['labels']['add_new_item'] = !empty($cpt['args']['labels']['add_new_item']) ? $cpt['args']['labels']['add_new_item'] : __('Add New '.$xy_cpt['args']['label']); 50 $xy_cpt['args']['labels']['edit_item'] = !empty($cpt['args']['labels']['edit_item']) ? $cpt['args']['labels']['edit_item'] : __('Edit '.$xy_cpt['args']['label']); 51 $xy_cpt['args']['labels']['new_item'] = !empty($cpt['args']['labels']['new_item']) ? $cpt['args']['labels']['new_item'] : __('New '.$xy_cpt['args']['label']); 52 $xy_cpt['args']['labels']['view_item'] = !empty($cpt['args']['labels']['view_item']) ? $cpt['args']['labels']['view_item'] : __('View '.$xy_cpt['args']['label']); 53 $xy_cpt['args']['labels']['view_items'] = !empty($cpt['args']['labels']['view_items']) ? $cpt['args']['labels']['view_items'] : __('Views '.$xy_cpt['args']['label']);//Added in WP 4.7 54 $xy_cpt['args']['labels']['search_item'] = !empty($cpt['args']['labels']['search_item']) ? $cpt['args']['labels']['search_item'] : __('Search '.$xy_cpt['args']['label']); 55 $xy_cpt['args']['labels']['not_found'] = !empty($cpt['args']['labels']['not_found']) ? $cpt['args']['labels']['not_found'] : __('No '.$xy_cpt['args']['label'].' found'); 56 $xy_cpt['args']['labels']['not_found_in_trash'] = !empty($cpt['args']['labels']['not_found_in_trash']) ? $cpt['args']['labels']['not_found_in_trash'] : __('No '.$xy_cpt['args']['label'].' found in Thrash'); 57 $xy_cpt['args']['labels']['parent_item_colon'] = !empty($cpt['args']['labels']['parent_item_colon']) ? $cpt['args']['labels']['parent_item_colon'] : __('Parent '.$xy_cpt['args']['label']); 58 $xy_cpt['args']['labels']['menu_name'] = !empty($cpt['args']['labels']['menu_name']) ? $cpt['args']['labels']['menu_name'] : $xy_cpt['name']; 59 $xy_cpt['args']['description'] = !empty($cpt['args']['description']) ? $cpt['args']['description'] : ''; 60 $xy_cpt['args']['public'] = $this->xydac_checkbool($cpt['args']['public']); 61 $xy_cpt['args']['publicly_queryable'] = $this->xydac_checkbool($cpt['args']['publicly_queryable']); 62 $xy_cpt['args']['exclude_from_search'] = $this->xydac_checkbool($cpt['args']['exclude_from_search']); 63 $xy_cpt['args']['show_ui'] = $this->xydac_checkbool($cpt['args']['show_ui']); 64 $xy_cpt['args']['capability_type'] = !empty($cpt['args']['capability_type']) ? $cpt['args']['capability_type'] : 'post'; 65 $xy_cpt['args']['hierarchical'] = $this->xydac_checkbool($cpt['args']['hierarchical']); 66 $xy_cpt['args']['supports'] = array(); 67 if($this->xydac_checkbool($cpt['args']['supports']['title'])) array_push($xy_cpt['args']['supports'],'title'); 68 if($this->xydac_checkbool($cpt['args']['supports']['editor'])) array_push($xy_cpt['args']['supports'],'editor'); 69 if($this->xydac_checkbool($cpt['args']['supports']['author'])) array_push($xy_cpt['args']['supports'],'author'); 70 if($this->xydac_checkbool($cpt['args']['supports']['thumbnail'])) array_push($xy_cpt['args']['supports'],'thumbnail'); 71 if($this->xydac_checkbool($cpt['args']['supports']['excerpt'])) array_push($xy_cpt['args']['supports'],'excerpt'); 72 if($this->xydac_checkbool($cpt['args']['supports']['trackbacks'])) array_push($xy_cpt['args']['supports'],'trackbacks'); 73 if($this->xydac_checkbool($cpt['args']['supports']['custom-fields'])) array_push($xy_cpt['args']['supports'],'custom-fields'); 74 if($this->xydac_checkbool($cpt['args']['supports']['comments'])) array_push($xy_cpt['args']['supports'],'comments'); 75 if($this->xydac_checkbool($cpt['args']['supports']['revisions'])) array_push($xy_cpt['args']['supports'],'revisions'); 76 if($this->xydac_checkbool($cpt['args']['supports']['page-attributes'])) array_push($xy_cpt['args']['supports'],'page-attributes'); 77 $xy_cpt['args']['register_meta_box_cb'] = !empty($cpt['args']['register_meta_box_cb']) ? $cpt['args']['register_meta_box_cb'] : ''; 78 $xy_cpt['args']['menu_position'] = intval($cpt['args']['menu_position']); 79 $xy_cpt['args']['menu_icon'] = !empty($cpt['args']['menu_icon']) ? $cpt['args']['menu_icon'] : null; 80 $xy_cpt['args']['permalink_epmask'] = !empty($cpt['args']['permalink_epmask']) ? $cpt['args']['permalink_epmask'] : 'EP_PERMALINK'; 81 //$xy_cpt['args']['rewrite'] = false; 82 $xy_cpt['args']['rewrite'] = $this->xydac_checkbool($cpt['args']['rewrite']['val']); 83 if(isset($cpt['args']['rewrite']['val']) && $this->xydac_checkbool($cpt['args']['rewrite']['val'])){ 84 $xy_cpt['args']['rewrite'] =array(); 85 $xy_cpt['args']['rewrite']['slug'] = !empty($cpt['args']['rewrite']['slug']) ? $cpt['args']['rewrite']['slug'] :$xy_cpt['name']; 86 $xy_cpt['args']['rewrite']['with_front'] = $this->xydac_checkbool($cpt['args']['rewrite']['with_front']); 87 $xy_cpt['args']['rewrite']['feeds'] = $this->xydac_checkbool($cpt['args']['rewrite']['feeds']); 88 $xy_cpt['args']['rewrite']['pages'] = $this->xydac_checkbool($cpt['args']['rewrite']['pages']); 89 } 90 else 91 $xy_cpt['args']['rewrite'] = $this->xydac_checkbool($cpt['args']['rewrite']['val']); 92 $xy_cpt['args']['query_var'] = $this->xydac_checkbool($cpt['args']['query_var']); 93 $xy_cpt['args']['can_export'] = $this->xydac_checkbool($cpt['args']['can_export']); 94 $xy_cpt['args']['show_in_nav_menus'] = $this->xydac_checkbool($cpt['args']['show_in_nav_menus']); 95 $xy_cpt['args']['show_in_menu'] = $this->xydac_checkbool($cpt['args']['show_in_menu']); 96 $xy_cpt['args']['has_archive'] = $this->xydac_checkbool($cpt['args']['has_archive']); 97 $xy_cpt['args']['map_meta_cap'] = $this->xydac_checkbool($cpt['args']['map_meta_cap']); 98 register_post_type( $xy_cpt['name'], $xy_cpt['args'] ); 99 //register_post_type_with_rewrite_rules( $xy_cpt['name'], $xy_cpt['args'], array('front'=>$xy_cpt['name'],'structure'=>$cpt['args']['rewrite']['slug']) ); 100 101 //adding enter_text_here to keep the data in db 102 $xy_cpt['args']['labels']['enter_text_here'] = $cpt['args']['labels']['enter_text_here']; 103 if(!empty($cpt['def']['cat']) && $this->xydac_checkbool($cpt['def']['cat'])) 104 register_taxonomy_for_object_type('category', $xy_cpt['name']); 105 if(!empty($cpt['def']['cat']) && $this->xydac_checkbool($cpt['def']['tag'])) 106 register_taxonomy_for_object_type('post_tag', $xy_cpt['name']); 107 $cpts[$k]['args']['label'] = $xy_cpt['args']['label']; 108 $cpts[$k]['args']['labels'] = $xy_cpt['args']['labels']; 82 if($cpt['name'] !='post' && $cpt['name'] !='page'){ 83 $xy_cpt['name'] = $cpt['name']; 84 $xy_cpt['args']['label'] = !empty($cpt['args']['label']) ? $cpt['args']['label'] : $xy_cpt['name']; 85 $xy_cpt['args']['labels']['name'] = !empty($cpt['args']['labels']['name']) ? $cpt['args']['labels']['name'] : __($xy_cpt['args']['label']); 86 $xy_cpt['args']['labels']['singular_name'] = !empty($cpt['args']['labels']['singular_name']) ? $cpt['args']['labels']['singular_name'] : __($xy_cpt['args']['labels']['name']); 87 $xy_cpt['args']['labels']['add_new'] = !empty($cpt['args']['labels']['add_new']) ? $cpt['args']['labels']['add_new'] : __('Add New'); 88 $xy_cpt['args']['labels']['add_new_item'] = !empty($cpt['args']['labels']['add_new_item']) ? $cpt['args']['labels']['add_new_item'] : __('Add New '.$xy_cpt['args']['label']); 89 $xy_cpt['args']['labels']['edit_item'] = !empty($cpt['args']['labels']['edit_item']) ? $cpt['args']['labels']['edit_item'] : __('Edit '.$xy_cpt['args']['label']); 90 $xy_cpt['args']['labels']['new_item'] = !empty($cpt['args']['labels']['new_item']) ? $cpt['args']['labels']['new_item'] : __('New '.$xy_cpt['args']['label']); 91 $xy_cpt['args']['labels']['view_item'] = !empty($cpt['args']['labels']['view_item']) ? $cpt['args']['labels']['view_item'] : __('View '.$xy_cpt['args']['label']); 92 $xy_cpt['args']['labels']['view_items'] = !empty($cpt['args']['labels']['view_items']) ? $cpt['args']['labels']['view_items'] : __('Views '.$xy_cpt['args']['label']);//Added in WP 4.7 93 $xy_cpt['args']['labels']['search_item'] = !empty($cpt['args']['labels']['search_item']) ? $cpt['args']['labels']['search_item'] : __('Search '.$xy_cpt['args']['label']); 94 $xy_cpt['args']['labels']['not_found'] = !empty($cpt['args']['labels']['not_found']) ? $cpt['args']['labels']['not_found'] : __('No '.$xy_cpt['args']['label'].' found'); 95 $xy_cpt['args']['labels']['not_found_in_trash'] = !empty($cpt['args']['labels']['not_found_in_trash']) ? $cpt['args']['labels']['not_found_in_trash'] : __('No '.$xy_cpt['args']['label'].' found in Thrash'); 96 $xy_cpt['args']['labels']['parent_item_colon'] = !empty($cpt['args']['labels']['parent_item_colon']) ? $cpt['args']['labels']['parent_item_colon'] : __('Parent '.$xy_cpt['args']['label']); 97 $xy_cpt['args']['labels']['menu_name'] = !empty($cpt['args']['labels']['menu_name']) ? $cpt['args']['labels']['menu_name'] : $xy_cpt['name']; 98 $xy_cpt['args']['description'] = !empty($cpt['args']['description']) ? $cpt['args']['description'] : ''; 99 $xy_cpt['args']['public'] = $this->xydac_checkbool($cpt['args']['public']); 100 $xy_cpt['args']['publicly_queryable'] = $this->xydac_checkbool($cpt['args']['publicly_queryable']); 101 $xy_cpt['args']['exclude_from_search'] = $this->xydac_checkbool($cpt['args']['exclude_from_search']); 102 $xy_cpt['args']['show_ui'] = $this->xydac_checkbool($cpt['args']['show_ui']); 103 $xy_cpt['args']['capability_type'] = !empty($cpt['args']['capability_type']) ? $cpt['args']['capability_type'] : 'post'; 104 $xy_cpt['args']['hierarchical'] = $this->xydac_checkbool($cpt['args']['hierarchical']); 105 $xy_cpt['args']['supports'] = array(); 106 if($this->xydac_checkbool($cpt['args']['supports']['title'])) array_push($xy_cpt['args']['supports'],'title'); 107 if($this->xydac_checkbool($cpt['args']['supports']['editor'])) array_push($xy_cpt['args']['supports'],'editor'); 108 if($this->xydac_checkbool($cpt['args']['supports']['author'])) array_push($xy_cpt['args']['supports'],'author'); 109 if($this->xydac_checkbool($cpt['args']['supports']['thumbnail'])) array_push($xy_cpt['args']['supports'],'thumbnail'); 110 if($this->xydac_checkbool($cpt['args']['supports']['excerpt'])) array_push($xy_cpt['args']['supports'],'excerpt'); 111 if($this->xydac_checkbool($cpt['args']['supports']['trackbacks'])) array_push($xy_cpt['args']['supports'],'trackbacks'); 112 if($this->xydac_checkbool($cpt['args']['supports']['custom-fields'])) array_push($xy_cpt['args']['supports'],'custom-fields'); 113 if($this->xydac_checkbool($cpt['args']['supports']['comments'])) array_push($xy_cpt['args']['supports'],'comments'); 114 if($this->xydac_checkbool($cpt['args']['supports']['revisions'])) array_push($xy_cpt['args']['supports'],'revisions'); 115 if($this->xydac_checkbool($cpt['args']['supports']['page-attributes'])) array_push($xy_cpt['args']['supports'],'page-attributes'); 116 $xy_cpt['args']['register_meta_box_cb'] = !empty($cpt['args']['register_meta_box_cb']) ? $cpt['args']['register_meta_box_cb'] : ''; 117 $xy_cpt['args']['menu_position'] = intval($cpt['args']['menu_position']); 118 $xy_cpt['args']['menu_icon'] = !empty($cpt['args']['menu_icon']) ? $cpt['args']['menu_icon'] : null; 119 $xy_cpt['args']['permalink_epmask'] = !empty($cpt['args']['permalink_epmask']) ? $cpt['args']['permalink_epmask'] : 'EP_PERMALINK'; 120 //$xy_cpt['args']['rewrite'] = false; 121 $xy_cpt['args']['rewrite'] = $this->xydac_checkbool($cpt['args']['rewrite']['val']); 122 if(isset($cpt['args']['rewrite']['val']) && $this->xydac_checkbool($cpt['args']['rewrite']['val'])){ 123 $xy_cpt['args']['rewrite'] =array(); 124 $xy_cpt['args']['rewrite']['slug'] = !empty($cpt['args']['rewrite']['slug']) ? $cpt['args']['rewrite']['slug'] :$xy_cpt['name']; 125 $xy_cpt['args']['rewrite']['with_front'] = $this->xydac_checkbool($cpt['args']['rewrite']['with_front']); 126 $xy_cpt['args']['rewrite']['feeds'] = $this->xydac_checkbool($cpt['args']['rewrite']['feeds']); 127 $xy_cpt['args']['rewrite']['pages'] = $this->xydac_checkbool($cpt['args']['rewrite']['pages']); 128 } 129 else 130 $xy_cpt['args']['rewrite'] = $this->xydac_checkbool($cpt['args']['rewrite']['val']); 131 $xy_cpt['args']['query_var'] = $this->xydac_checkbool($cpt['args']['query_var']); 132 $xy_cpt['args']['can_export'] = $this->xydac_checkbool($cpt['args']['can_export']); 133 $xy_cpt['args']['show_in_nav_menus'] = $this->xydac_checkbool($cpt['args']['show_in_nav_menus']); 134 $xy_cpt['args']['show_in_menu'] = $this->xydac_checkbool($cpt['args']['show_in_menu']); 135 $xy_cpt['args']['has_archive'] = $this->xydac_checkbool($cpt['args']['has_archive']); 136 $xy_cpt['args']['map_meta_cap'] = $this->xydac_checkbool($cpt['args']['map_meta_cap']); 137 register_post_type( $xy_cpt['name'], $xy_cpt['args'] ); 138 //register_post_type_with_rewrite_rules( $xy_cpt['name'], $xy_cpt['args'], array('front'=>$xy_cpt['name'],'structure'=>$cpt['args']['rewrite']['slug']) ); 139 140 //adding enter_text_here to keep the data in db 141 $xy_cpt['args']['labels']['enter_text_here'] = $cpt['args']['labels']['enter_text_here']; 142 if(!empty($cpt['def']['cat']) && $this->xydac_checkbool($cpt['def']['cat'])) 143 register_taxonomy_for_object_type('category', $xy_cpt['name']); 144 if(!empty($cpt['def']['cat']) && $this->xydac_checkbool($cpt['def']['tag'])) 145 register_taxonomy_for_object_type('post_tag', $xy_cpt['name']); 146 $cpts[$k]['args']['label'] = $xy_cpt['args']['label']; 147 $cpts[$k]['args']['labels'] = $xy_cpt['args']['labels']; 109 148 } 110 149 } 111 150 112 151 } -
ultimate-cms/trunk/modules/taxonomy/class-xydac-taxonomy-type-manager.php
r1942060 r1946407 60 60 add_action('xydac_core_delete',array($this,'xydac_core_delete')); 61 61 add_action('xydac_core_bulkaction',array($this,'xydac_core_bulkaction')); 62 62 63 add_action('xydac_core_head',array($this,'xydac_core_head')); 64 63 65 add_action('xydac_core_rightfoot',array($this,'xydac_core_rightfoot')); 64 66 … … 74 76 { 75 77 return "id=accordion"; 78 } 79 80 function xydac_core_head($data){ 81 if($data->xydac_core_editmode && ($data->xydac_editdata[$data->namefield_name] == 'post_tag' || $data->xydac_editdata[$data->namefield_name] == 'category')){ 82 $data->xydac_core_error = new WP_Error('error',$data->xydac_editdata[$data->namefield_name]. __(' can not be edited',XYDAC_CMS_NAME)); 83 $data->xydac_core_editmode = false; 84 } 76 85 } 77 86 function xydac_core_rightfoot() -
ultimate-cms/trunk/modules/taxonomy/class-xydac-taxonomy-type.php
r1938090 r1946407 48 48 foreach ($taxonomies as $k=>$taxonomy ) 49 49 { 50 $xy_tax['name']= $taxonomy['name']; 51 if(isset($taxonomy['object_type'])) 52 $xy_tax['object_type']= $taxonomy['object_type']; 53 else 54 $xy_tax['object_type']=null; 55 $xy_tax['args']['labels']['name'] = (!empty($taxonomy['args']['labels']['name']) ? $taxonomy['args']['labels']['name'] : ( !empty($taxonomy['args']['label']) ? $taxonomy['args']['label'] : $taxonomy['name'])); 56 $xy_sname = $this->xydac_singular($xy_tax['name']); 57 $xy_slabel = $this->xydac_singular($xy_tax['args']['labels']['name']); 58 $xy_tax['args']['labels']['singular_name'] = ( !empty($taxonomy['args']['labels']["singular_label"]) ? $taxonomy['args']['labels']["singular_label"] : $xy_sname); 59 $xy_tax['args']['labels']['search_items'] = ( !empty($taxonomy['args']['labels']["search_items"]) ) ? $taxonomy['args']['labels']["search_items"] : 'Search ' .$taxonomy['args']['label']; 60 $xy_tax['args']['labels']['popular_items'] = ( !empty($taxonomy['args']['labels']["popular_items"]) ) ? $taxonomy['args']['labels']["popular_items"] : 'Popular ' .$taxonomy['args']['label']; 61 $xy_tax['args']['labels']['all_items'] = ( !empty($taxonomy['args']['labels']["all_items"]) ) ? $taxonomy['args']['labels']["all_items"] : 'All ' .$taxonomy['args']['label']; 62 $xy_tax['args']['labels']['parent_item'] = ( !empty($taxonomy['args']['labels']["parent_item"]) ) ? $taxonomy['args']['labels']["parent_item"] : 'Parent ' .$xy_slabel; 63 $xy_tax['args']['labels']['parent_item_colon'] = ( !empty($taxonomy['args']['labels']["parent_item_colon"]) ) ? $taxonomy['args']['labels']["parent_item_colon"] : 'Parent '.$xy_slabel.':'; 64 $xy_tax['args']['labels']['edit_item'] = ( !empty($taxonomy['args']['labels']["edit_item"]) ) ? $taxonomy['args']['labels']["edit_item"] : 'Edit ' .$xy_slabel; 65 $xy_tax['args']['labels']['update_item'] = ( !empty($taxonomy['args']['labels']["update_item"]) ) ? $taxonomy['args']['labels']["update_item"] : 'Update ' .$xy_slabel; 66 $xy_tax['args']['labels']['add_new_item'] = ( !empty($taxonomy['args']['labels']["add_new_item"]) ) ? $taxonomy['args']['labels']["add_new_item"] : 'Add New ' .$xy_slabel; 67 $xy_tax['args']['labels']['new_item_name'] = ( !empty($taxonomy['args']['labels']["new_item_name"]) ) ? $taxonomy['args']['labels']["new_item_name"] : 'New ' .$xy_slabel. ' Name'; 68 $xy_tax['args']['labels']['separate_items_with_commas'] = ( !empty($taxonomy['args']['labels']["separate_items_with_commas"]) ) ? $taxonomy['args']['labels']["separate_items_with_commas"] : 'Separate ' .$taxonomy['args']['label']. ' with commas'; 69 $xy_tax['args']['labels']['add_or_remove_items'] = ( !empty($taxonomy['args']['labels']["add_or_remove_items"]) ) ? $taxonomy['args']['labels']["add_or_remove_items"] : 'Add or remove ' .$taxonomy['args']['label']; 70 $xy_tax['args']['labels']['choose_from_most_used'] = ( !empty($taxonomy['args']['labels']["choose_from_most_used"]) ) ? $taxonomy['args']['labels']["choose_from_most_used"] : 'Choose from the most used ' .$taxonomy['args']['label']; 71 $xy_tax['args']['labels']['view_item'] = ( !empty($taxonomy['args']['labels']["view_item"]) ) ? $taxonomy['args']['labels']["view_item"] : 'View ' .$taxonomy['args']['label']; 72 $xy_tax['args']['label'] = $xy_tax['args']['labels']['name']; 73 $xy_tax['args']['public']= $this->xydac_checkbool($taxonomy['args']['public']); 74 $xy_tax['args']['show_in_nav_menus']=$this->xydac_checkbool($taxonomy['args']['show_in_nav_menus']); 75 $xy_tax['args']['show_ui']= $this->xydac_checkbool($taxonomy['args']['show_ui']); 76 $xy_tax['args']['show_tagcloud']= $this->xydac_checkbool($taxonomy['args']['show_tagcloud']); 77 $xy_tax['args']['hierarchical']= $this->xydac_checkbool($taxonomy['args']['hierarchical']); 78 $xy_tax['args']['rewrite']= $this->xydac_checkbool($taxonomy['args']['rewrite']['val']); 79 if($xy_tax['args']['rewrite']){ 80 $xy_tax['args']['rewrite'] = array(); 81 $xy_tax['args']['rewrite']['slug']= (!empty($taxonomy['args']['rewrite']['slug']) ? $taxonomy['args']['rewrite']['slug'] : $xy_tax['name']); 82 $xy_tax['args']['rewrite']['with_front']= $this->xydac_checkbool($taxonomy['args']['rewrite']['with_front']); 83 if(floatval($wp_version)>3.0) 84 @$xy_tax['args']['rewrite']['hierarchical']= $this->xydac_checkbool($taxonomy['args']['rewrite']['hierarchical']); 50 if($taxonomy['name'] != 'post_tag' && $taxonomy['name'] !='category'){ 51 $xy_tax['name']= $taxonomy['name']; 52 if(isset($taxonomy['object_type'])) 53 $xy_tax['object_type']= $taxonomy['object_type']; 54 else 55 $xy_tax['object_type']=null; 56 $xy_tax['args']['labels']['name'] = (!empty($taxonomy['args']['labels']['name']) ? $taxonomy['args']['labels']['name'] : ( !empty($taxonomy['args']['label']) ? $taxonomy['args']['label'] : $taxonomy['name'])); 57 $xy_sname = $this->xydac_singular($xy_tax['name']); 58 $xy_slabel = $this->xydac_singular($xy_tax['args']['labels']['name']); 59 $xy_tax['args']['labels']['singular_name'] = ( !empty($taxonomy['args']['labels']["singular_label"]) ? $taxonomy['args']['labels']["singular_label"] : $xy_sname); 60 $xy_tax['args']['labels']['search_items'] = ( !empty($taxonomy['args']['labels']["search_items"]) ) ? $taxonomy['args']['labels']["search_items"] : 'Search ' .$taxonomy['args']['label']; 61 $xy_tax['args']['labels']['popular_items'] = ( !empty($taxonomy['args']['labels']["popular_items"]) ) ? $taxonomy['args']['labels']["popular_items"] : 'Popular ' .$taxonomy['args']['label']; 62 $xy_tax['args']['labels']['all_items'] = ( !empty($taxonomy['args']['labels']["all_items"]) ) ? $taxonomy['args']['labels']["all_items"] : 'All ' .$taxonomy['args']['label']; 63 $xy_tax['args']['labels']['parent_item'] = ( !empty($taxonomy['args']['labels']["parent_item"]) ) ? $taxonomy['args']['labels']["parent_item"] : 'Parent ' .$xy_slabel; 64 $xy_tax['args']['labels']['parent_item_colon'] = ( !empty($taxonomy['args']['labels']["parent_item_colon"]) ) ? $taxonomy['args']['labels']["parent_item_colon"] : 'Parent '.$xy_slabel.':'; 65 $xy_tax['args']['labels']['edit_item'] = ( !empty($taxonomy['args']['labels']["edit_item"]) ) ? $taxonomy['args']['labels']["edit_item"] : 'Edit ' .$xy_slabel; 66 $xy_tax['args']['labels']['update_item'] = ( !empty($taxonomy['args']['labels']["update_item"]) ) ? $taxonomy['args']['labels']["update_item"] : 'Update ' .$xy_slabel; 67 $xy_tax['args']['labels']['add_new_item'] = ( !empty($taxonomy['args']['labels']["add_new_item"]) ) ? $taxonomy['args']['labels']["add_new_item"] : 'Add New ' .$xy_slabel; 68 $xy_tax['args']['labels']['new_item_name'] = ( !empty($taxonomy['args']['labels']["new_item_name"]) ) ? $taxonomy['args']['labels']["new_item_name"] : 'New ' .$xy_slabel. ' Name'; 69 $xy_tax['args']['labels']['separate_items_with_commas'] = ( !empty($taxonomy['args']['labels']["separate_items_with_commas"]) ) ? $taxonomy['args']['labels']["separate_items_with_commas"] : 'Separate ' .$taxonomy['args']['label']. ' with commas'; 70 $xy_tax['args']['labels']['add_or_remove_items'] = ( !empty($taxonomy['args']['labels']["add_or_remove_items"]) ) ? $taxonomy['args']['labels']["add_or_remove_items"] : 'Add or remove ' .$taxonomy['args']['label']; 71 $xy_tax['args']['labels']['choose_from_most_used'] = ( !empty($taxonomy['args']['labels']["choose_from_most_used"]) ) ? $taxonomy['args']['labels']["choose_from_most_used"] : 'Choose from the most used ' .$taxonomy['args']['label']; 72 $xy_tax['args']['labels']['view_item'] = ( !empty($taxonomy['args']['labels']["view_item"]) ) ? $taxonomy['args']['labels']["view_item"] : 'View ' .$taxonomy['args']['label']; 73 $xy_tax['args']['label'] = $xy_tax['args']['labels']['name']; 74 $xy_tax['args']['public']= $this->xydac_checkbool($taxonomy['args']['public']); 75 $xy_tax['args']['show_in_nav_menus']=$this->xydac_checkbool($taxonomy['args']['show_in_nav_menus']); 76 $xy_tax['args']['show_ui']= $this->xydac_checkbool($taxonomy['args']['show_ui']); 77 $xy_tax['args']['show_tagcloud']= $this->xydac_checkbool($taxonomy['args']['show_tagcloud']); 78 $xy_tax['args']['hierarchical']= $this->xydac_checkbool($taxonomy['args']['hierarchical']); 79 $xy_tax['args']['rewrite']= $this->xydac_checkbool($taxonomy['args']['rewrite']['val']); 80 if($xy_tax['args']['rewrite']){ 81 $xy_tax['args']['rewrite'] = array(); 82 $xy_tax['args']['rewrite']['slug']= (!empty($taxonomy['args']['rewrite']['slug']) ? $taxonomy['args']['rewrite']['slug'] : $xy_tax['name']); 83 $xy_tax['args']['rewrite']['with_front']= $this->xydac_checkbool($taxonomy['args']['rewrite']['with_front']); 84 if(floatval($wp_version)>3.0) 85 @$xy_tax['args']['rewrite']['hierarchical']= $this->xydac_checkbool($taxonomy['args']['rewrite']['hierarchical']); 86 } 87 $xy_tax['args']['query_var'] = ( !empty($taxonomy['args']['query_var']) ? $taxonomy['args']['query_var'] : $taxonomy['name']); 88 if(isset($taxonomy['args']['capabilities'])) 89 $xy_tax['args']['capabilities'] = $taxonomy['args']['capabilities']; 90 if(isset($taxonomy['args']['update_count_callback']) && !empty($taxonomy['args']['update_count_callback'])) 91 $xy_tax['args']['update_count_callback'] = $taxonomy['args']['update_count_callback']; 92 register_taxonomy($xy_tax['name'],$xy_tax['object_type'],$xy_tax['args']); 93 $taxonomies[$k]['args']['labels'] = $xy_tax['args']['labels']; 94 $taxonomies[$k]['args']['query_var'] = $xy_tax['args']['query_var']; 95 $taxonomies[$k]['args']['rewrite']['slug'] = $xy_tax['args']['rewrite']['slug']; 85 96 } 86 $xy_tax['args']['query_var'] = ( !empty($taxonomy['args']['query_var']) ? $taxonomy['args']['query_var'] : $taxonomy['name']);87 if(isset($taxonomy['args']['capabilities']))88 $xy_tax['args']['capabilities'] = $taxonomy['args']['capabilities'];89 if(isset($taxonomy['args']['update_count_callback']) && !empty($taxonomy['args']['update_count_callback']))90 $xy_tax['args']['update_count_callback'] = $taxonomy['args']['update_count_callback'];91 register_taxonomy($xy_tax['name'],$xy_tax['object_type'],$xy_tax['args']);92 $taxonomies[$k]['args']['labels'] = $xy_tax['args']['labels'];93 $taxonomies[$k]['args']['query_var'] = $xy_tax['args']['query_var'];94 $taxonomies[$k]['args']['rewrite']['slug'] = $xy_tax['args']['rewrite']['slug'];95 97 96 98 } -
ultimate-cms/trunk/readme.txt
r1942060 r1946407 57 57 58 58 1. Ultimate CMS Menu 59 2. Archive Maker top60 3. Archive Maker Bottom61 4. Post Type Manager 62 5. P age Type Manager59 2. Module Manager 60 3. Post Type Manager Add 61 4. Post Type Manager Edit 62 5. Post Type Manager Fields 63 63 6. Taxonomy Manager 64 7. Taxonomy Field Types Screen65 8. Post Types Fields64 7. Post Type Backend Custom Field Form 65 8. Taxonomy Rewrite Option 66 66 67 67 68 68 == Changelog == 69 69 70 71 = 2.0.1 = 72 * Minor Change for UI 73 * Allowed default posts and tags to be added for custom fields 74 * Updated screenshots and banner 70 75 71 76 = 2.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.