settings-posttypes.php
60 lines
| 1 | <?php |
| 2 | $types = $this->getPostTypes(); |
| 3 | settings_fields( 'nestedpages-posttypes' ); |
| 4 | ?> |
| 5 | <tr valign="top"> |
| 6 | <td colspan="2" style="padding:0px;"> |
| 7 | <h3 style="margin-bottom:10px;"><?php _e('Enable Nested Pages for:', 'nestedpages'); ?></h3> |
| 8 | </td> |
| 9 | </tr> |
| 10 | <tr valign="top"> |
| 11 | <td colspan="2" style="padding:0;"> |
| 12 | <table width="100%" class="nestedpages-settings-table"> |
| 13 | <thead> |
| 14 | <th><?php _e('Post Type', 'nestedpages'); ?></th> |
| 15 | <th><?php _e('Hierarchical', 'nestedpages'); ?></th> |
| 16 | <th><?php _e('Enabled', 'nestedpages'); ?></th> |
| 17 | <th><?php _e('Replace Default Menu', 'nestedpages'); ?>*</th> |
| 18 | <th><?php _e('Hide Default Link', 'nestedpages'); ?>*</th> |
| 19 | <th><?php _e('Disable Nesting', 'nestedpages'); ?>**</th> |
| 20 | </thead> |
| 21 | <?php foreach ($types as $type) : ?> |
| 22 | <tr> |
| 23 | <td><?php echo $type->label; ?></td> |
| 24 | <td> |
| 25 | <?php if ( $type->hierarchical ) : ?> |
| 26 | <i class="np-icon-yes"></i> |
| 27 | <?php endif; ?> |
| 28 | </td> |
| 29 | <td> |
| 30 | <input type="checkbox" name="nestedpages_posttypes[<?php echo $type->name; ?>]" value="<?php echo $type->name; ?>" <?php if ( $type->np_enabled ) echo 'checked'; ?> /> |
| 31 | </td> |
| 32 | <td> |
| 33 | <input type="checkbox" name="nestedpages_posttypes[<?php echo $type->name; ?>][replace_menu]" value="true" <?php if ( $type->replace_menu ) echo 'checked'; ?> /> |
| 34 | </td> |
| 35 | <td> |
| 36 | <input type="checkbox" name="nestedpages_posttypes[<?php echo $type->name; ?>][hide_default]" value="true" <?php if ( $type->hide_default ) echo 'checked'; ?> /> |
| 37 | </td> |
| 38 | <td> |
| 39 | <?php if ( $type->hierarchical ) : ?> |
| 40 | <input type="checkbox" name="nestedpages_posttypes[<?php echo $type->name; ?>][disable_nesting]" value="true" <?php if ( $type->disable_nesting ) echo 'checked '; ?>/> |
| 41 | <?php endif; ?> |
| 42 | </td> |
| 43 | </tr> |
| 44 | <?php endforeach; ?> |
| 45 | </table> |
| 46 | </td> |
| 47 | </tr> |
| 48 | <tr valign="top"> |
| 49 | <td colspan="2" style="padding:10px 0px;"> |
| 50 | <p style="font-style:oblique;font-size:13px;margin-bottom:15px;"> |
| 51 | <?php _e('Note: Nesting features not enabled for non-hierarchical post types.', 'nestedpages'); ?> |
| 52 | </p> |
| 53 | <p style="font-size:12px;margin-bottom:15px;"> |
| 54 | *<?php _e('If default menu is not replaced, an additional submenu item will be added for "Nested/Sort View"', 'nestedpages'); ?> |
| 55 | </p> |
| 56 | <p style="font-size:12px;"> |
| 57 | **<?php _e('<strong>Important:</strong> Changing page structures on live sites may effect SEO and existing inbound links. Limit URL structure changes on live sites by disabling nesting. Sorting within the current nesting structure will still be available. If nesting changes are made to a live site, it may help to add a 301 redirect from the old location to the new one.', 'nestedpages'); ?> |
| 58 | </p> |
| 59 | </td> |
| 60 | </tr> |