404redirect.phtml
8 years ago
capability.phtml
8 years ago
login-redirect.phtml
8 years ago
logout-redirect.phtml
8 years ago
menu.phtml
8 years ago
metabox.phtml
8 years ago
post.phtml
8 years ago
redirect.phtml
8 years ago
route.phtml
8 years ago
metabox.phtml
110 lines
| 1 | <?php if (defined('AAM_KEY')) { ?> |
| 2 | <div class="aam-feature" id="metabox-content"> |
| 3 | <div class="row"> |
| 4 | <div class="col-xs-12"> |
| 5 | <p class="aam-info"> |
| 6 | <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Hide unnecessary or restricted metaboxes and widgets for [%s]. For more information please check %sHow to hide WordPress metaboxes and widgets%s.', 'b', 'b'), AAM_Backend_Subject::getInstance()->getName(), '<a href="https://aamplugin.com/help/how-to-hide-wordpress-metaboxes-and-widgets" target="_blank">', '</a>'); ?> |
| 7 | </p> |
| 8 | </div> |
| 9 | </div> |
| 10 | |
| 11 | <div class="aam-feature-top-actions text-right"> |
| 12 | <a href="#" class="btn btn-xs btn-primary" id="refresh-metabox-list"><i class="icon-arrows-cw"></i> <?php echo __('Refresh', AAM_KEY); ?></a> |
| 13 | <a href="#init-url-modal" class="btn btn-xs btn-primary" data-toggle="modal"><i class="icon-link"></i> <?php echo __('Init URL', AAM_KEY); ?></a> |
| 14 | </div> |
| 15 | |
| 16 | <div class="row"> |
| 17 | <div class="col-xs-12"> |
| 18 | <div class="aam-overwrite" id="aam-metabox-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>"> |
| 19 | <span><i class="icon-check"></i> <?php echo __('Settings are customized', AAM_KEY); ?></span> |
| 20 | <span><a href="#" id="metabox-reset" class="btn btn-xs btn-primary"><?php echo __('Reset To Default', AAM_KEY); ?></a> |
| 21 | </div> |
| 22 | </div> |
| 23 | </div> |
| 24 | |
| 25 | <?php |
| 26 | global $wp_post_types; |
| 27 | |
| 28 | $first = false; |
| 29 | $object = AAM_Backend_Subject::getInstance()->getObject('metabox'); |
| 30 | $metaboxList = $this->getMetaboxList(); |
| 31 | ?> |
| 32 | |
| 33 | <?php if (!empty($metaboxList)) { ?> |
| 34 | <div class="panel-group" id="metabox-list" role="tablist"> |
| 35 | <?php foreach ($metaboxList as $screen => $metaboxes) { ?> |
| 36 | <div class="panel panel-default"> |
| 37 | <div class="panel-heading" role="tab" id="group-<?php echo $screen; ?>-heading"> |
| 38 | <h4 class="panel-title"> |
| 39 | <a role="button" data-toggle="collapse" data-parent="#metabox-list" href="#group-<?php echo $screen; ?>" aria-controls="group-<?php echo $screen; ?>" <?php if (!$first) { echo 'aria-expanded="true"'; } ?>> |
| 40 | <?php |
| 41 | switch ($screen) { |
| 42 | case 'dashboard': |
| 43 | echo __('Dashboard Widgets', AAM_KEY); |
| 44 | break; |
| 45 | |
| 46 | case 'widgets': |
| 47 | echo __('Frontend Widgets', AAM_KEY); |
| 48 | break; |
| 49 | |
| 50 | default: |
| 51 | echo $wp_post_types[$screen]->labels->name; |
| 52 | break; |
| 53 | } |
| 54 | ?> |
| 55 | </a> |
| 56 | </h4> |
| 57 | </div> |
| 58 | <div id="group-<?php echo $screen; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="group-<?php echo $screen; ?>-heading"> |
| 59 | <div class="panel-body"> |
| 60 | <div class="row"> |
| 61 | <?php foreach ($metaboxes as $metabox) { ?> |
| 62 | <div class="col-xs-12 col-md-6 aam-submenu-item"> |
| 63 | <label for="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>"><?php echo $metabox['title']; ?></label> |
| 64 | <input type="checkbox" class="aam-checkbox-danger" id="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>" data-metabox="<?php echo $screen; ?>|<?php echo $metabox['id']; ?>"<?php echo ($object->has($screen, $metabox['id']) ? ' checked="checked"' : ''); ?> /> |
| 65 | <label for="metabox-<?php echo $screen; ?>-<?php echo $metabox['id']; ?>" data-toggle="tooltip" title="<?php echo ($object->has($screen, $metabox['id']) ? __('Uncheck to show', AAM_KEY) : __('Check to hide', AAM_KEY)); ?>"></label> |
| 66 | </div> |
| 67 | <?php } ?> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| 71 | </div> |
| 72 | <?php } ?> |
| 73 | </div> |
| 74 | <?php } else { ?> |
| 75 | <div class="row"> |
| 76 | <div class="col-xs-12 text-center"> |
| 77 | <p class="alert alert-info text-larger"> |
| 78 | <?php echo __('The list is not initialized. Click Refresh button above.'); ?><br/> |
| 79 | <small><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('If your website requires HTTP authentication, please refer to [%sthis article%s] for additional information.', 'b'), '<a href="https://aamplugin.com/help/how-to-hide-wordpress-metaboxes-and-widgets" target="_blank">', '</a>'); ?></small> |
| 80 | </p> |
| 81 | </div> |
| 82 | </div> |
| 83 | <?php } ?> |
| 84 | |
| 85 | <div class="modal fade" id="init-url-modal" tabindex="-1" role="dialog"> |
| 86 | <div class="modal-dialog" role="document"> |
| 87 | <div class="modal-content"> |
| 88 | <div class="modal-header"> |
| 89 | <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">×</span></button> |
| 90 | <h4 class="modal-title"><?php echo __('Initialize URL', AAM_KEY); ?></h4> |
| 91 | </div> |
| 92 | <div class="modal-body"> |
| 93 | <p class="aam-info"> |
| 94 | <?php echo __('Some metaboxes are "conditional" and appear on the Edit screen when certain conditions are met. For example metabox "Comments" appears only for existing page and not for new page. If you do not see a desired metabox, try to copy & paste the full URL to the backend page where that metabox appears.'); ?> |
| 95 | </p> |
| 96 | <div class="form-group"> |
| 97 | <label><?php echo __('Backend page URL', AAM_KEY); ?></label> |
| 98 | <input type="text" class="form-control" id="init-url" placeholder="<?php echo __('Insert valid URL', AAM_KEY); ?>" /> |
| 99 | </div> |
| 100 | </div> |
| 101 | <div class="modal-footer"> |
| 102 | <button type="button" class="btn btn-success" id="init-url-btn"><?php echo __('Initialize', AAM_KEY); ?></button> |
| 103 | <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button> |
| 104 | </div> |
| 105 | </div> |
| 106 | </div> |
| 107 | </div> |
| 108 | |
| 109 | </div> |
| 110 | <?php } |