Changeset 370946
- Timestamp:
- 04/09/2011 04:35:18 PM (15 years ago)
- File:
-
- 1 edited
-
wordpress-wiki/trunk/controllers/wiki_admin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-wiki/trunk/controllers/wiki_admin.php
r348407 r370946 186 186 $update_post = get_post($id_we_are_changing, 'ARRAY_A'); 187 187 //The hackiest hack that ever hacked 188 $this->convert_pages_recursively($id_we_are_changing); 188 if ( !empty($id_we_are_changing) ) 189 $this->convert_pages_recursively($id_we_are_changing); 190 189 191 $update_post['post_type'] = 'wiki'; 190 192 $update_post['post_status'] = 'publish'; … … 215 217 //Wordpress 2.6 + -- this is the only one we need 216 218 global $wp_version; 219 217 220 if ($wp_version < 3.0) { 218 add_meta_box( 'wpw_meta_box', __( 'Wiki Options', 'wp-wiki' ),221 add_meta_box( 'wpw_meta_box', __( 'Wiki Options', 'wp-wiki' ), 219 222 array($this, 'meta_box_inner'), 'page', 'side', 'high' ); 223 add_meta_box( 'wpw_meta_box', __( 'Wiki Options', 'wp-wiki' ), 224 array($this, 'meta_box_inner_pages'), 'post', 'side', 'high' ); 220 225 } else { 221 add_meta_box( 'wpw_meta_box', __( 'Wiki Options', 'wp-wiki' ), 222 array($this, 'meta_box_inner'), 'wiki', 'side', 'high' ); 223 224 add_meta_box( 'wpw_meta_box', __( 'Wiki Options', 'wp-wiki' ), 225 array($this, 'meta_box_inner_pages'), 'page', 'side', 'high' ); 226 $post_types = get_post_types(array('show_ui'=>true)); 227 foreach($post_types as $pt) { 228 if ($pt == 'wiki') 229 continue; 230 add_meta_box( 'wpw_meta_box', __( 'Wiki Options', 'wp-wiki' ), 231 array($this, 'meta_box_inner_pages'), $pt, 'side', 'high' ); 232 } 226 233 } 227 234 } … … 261 268 global $wp_version; 262 269 ?> 263 <h5><?php _e('Wiki Page'); ?></h5> 270 <h5><?php _e('Wiki Page'); ?></h5> 264 271 <input type="checkbox" name="wpw_change_to_wiki" value="true" /> 265 272 <label for="wpw_change_to_wiki"><?php _e('Convert this page and all of its subpages to Wikis.'); ?></label>
Note: See TracChangeset
for help on using the changeset viewer.