nexusfallout / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

Custom content Menu order is not displayed #298

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello

When I change the Custom content menu position, it moves to the right position 
and stays there :)
The only "problem" is that the number won't show up in the Custom top-level 
Menu: input field(Custom content types>[the type]>edit>menu>Custom top-level 
Menu). 
So the user has no feedback. I think It'll be useful if the number stays there 
so we can review what we have done already and decide for the next number for 
next Custom content type.

*SYSTEM INFO* 
------------------------ 
Plugin Version: 0.9.5.5-pl
WordPress Version: 3.3.1
PHP Version: 5.3.6-13ubuntu3.3
MySQL Version: 5.1.58-1ubuntu1
Server OS: Linux
------------------------ 
Other Active plugins: 
 * Contact Form 7 v.2.4.5 [http://contactform7.com/]
 * Post Type Convertr v.1.0.2 [http://graphpaperpress.com]
 * Region widget v.0.1 []
 * Wordpress Bootstrap CSS v.0.9.1 [http://www.hostliketoast.com/wordpress-resource-centre/]

Original issue reported on code.google.com by 2...@emblem.cc on 26 Jan 2012 at 1:34

GoogleCodeExporter commented 8 years ago
Thanks.  I see it: the "custom top-level menu" position and the "Show in Menus" 
dropdown isn't sticking (it's saving to the database, but the form isn't 
repopulating).   Looks like I botched the variable name.

The fix is to edit the custom-content-type-manager/views/post_type.php file, 
around line 420, replace the "<!--!show_in_menu -->" section with the following:

        <!--!show_in_menu -->
        <div class="cctm_element_wrapper" id="custom_field_wrapper_cctm_show_in_menu">      
            <label for="cctm_show_in_menu" class="cctm_label cctm_text_label" id="cctm_label_cctm_show_in_menu"><?php _e('Show in Menus', CCTM_TXTDOMAIN); ?></label>
            <select name="cctm_show_in_menu" class="cctm_dropdown" id="cctm_show_in_menu">
                <option value="1" <?php print CCTM::is_selected('1',$data['def']['cctm_show_in_menu']); ?>><?php _e('Yes'); ?></option>
                <option value="0" <?php print CCTM::is_selected('0',$data['def']['cctm_show_in_menu']); ?>><?php _e('No'); ?></option>
                <option value="custom" <?php print CCTM::is_selected('custom',$data['def']['cctm_show_in_menu']); ?>><?php _e('Custom'); ?></option>
            </select>
            <div id="cctm_show_in_menu_wrapper" style="margin-left:20px;">
                <em><?php _e('Custom top-level Menu', CCTM_TXTDOMAIN); ?></em>: 
                <input type="text" name="cctm_show_in_menu_custom" id="cctm_show_in_menu_custom" value="<?php print htmlspecialchars(CCTM::get_value($data['def'], 'cctm_show_in_menu_custom')); ?>"/>
            </div>
            <span class="cctm_description"><?php _e('Whether to show the post type in the admin menu. Change this to <em>Custom</em> to specify a top level page like <code>tools.php</code> or <code>edit.php?post_type=page</code>', CCTM_TXTDOMAIN); ?></span>
        </div>

Sorry about that -- this will included in the next patch, or you can download 
the  development version.

Committed revision 495671.

Original comment by ever...@fireproofsocks.com on 26 Jan 2012 at 4:15