Skip to content

Commit

Permalink
Aeria Metabox "To Slug Metabox"
Browse files Browse the repository at this point in the history
Signed-off-by: Graziano Vincini <[email protected]>
  • Loading branch information
vincio87 committed Dec 3, 2014
1 parent 804a8e4 commit 948fd66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/AeriaMetabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ function add() {
// Callback function to show fields in meta box
function show() {
global $post;
if (isset($this->_meta_box['slug']) && $this->_meta_box['slug'] !== $post->post_name) {
echo '<style>.postbox#'.$this->_meta_box['id'].'{display:none;}</style>';
return;
}
wp_nonce_field(basename(__FILE__), 'mbox_meta_box_nonce');
echo '<table class="form-table ">';
foreach ($this->_fields as &$field) {
Expand Down

0 comments on commit 948fd66

Please sign in to comment.