data = &$args; if (isset($this->data['seat_plan'])) { add_action('mp_event_all_in_tab_item_seat_plan', array($this, 'meta_box_callback'), 10, 1); } elseif (isset($this->data['every_day_setting'])) { add_action('mp_event_recurring_every_day_setting', array($this, 'meta_box_callback'), 10, 1); } elseif ($this->get_meta_box_screen()[0] == 'mep_events' && $this->get_meta_box_context() == 'normal') { add_action('mp_event_all_in_tab_menu', array($this, 'mp_event_all_in_tab_menu_list')); add_action('mp_event_all_in_tab_item', array($this, 'meta_box_callback'), 10, 1); } else { add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 12); } add_action('save_post', array($this, 'save_post'), 12); } public function add_meta_boxes() { add_meta_box( $this->get_meta_box_id(), $this->get_meta_box_title(), array($this, 'meta_box_callback'), $this->get_meta_box_screen(), $this->get_meta_box_context(), $this->get_meta_box_priority(), $this->get_callback_args() ); } public function save_post($post_id) { $get_option_name = $this->get_option_name(); $post_id = $this->get_post_id(); if (!empty($get_option_name)) : $option_value = serialize(stripslashes_deep(mage_array_strip($_POST[$get_option_name]))); update_post_meta($post_id, $get_option_name, $option_value); else : foreach ($this->get_panels() as $panelsIndex => $panel) : foreach ($panel['sections'] as $sectionIndex => $section) : foreach ($section['options'] as $option) : $option_value = isset($_POST[$option['id']]) ? stripslashes_deep(mage_array_strip($_POST[$option['id']])) : ''; if (is_array($option_value)) { $option_value = serialize($option_value); } if (!empty($option['id'])) { update_post_meta($post_id, $option['id'], $option_value); } endforeach; endforeach; endforeach; endif; } public function mp_event_all_in_tab_menu_list() { ?>
  • get_meta_box_title()); ?>
  • get_nav_position(); if ($this->get_meta_box_screen()[0] == 'mep_events' && $this->get_meta_box_context() == 'normal' && !isset($this->data['seat_plan'])) { ?>
    get_panels() as $panelsIndex => $panel) : ?>
    $section) : ?>

    get_post_id(), $option['id'], true); if (is_serialized($option_value)) { $option_value = unserialize($option_value); } $option['value'] = $option_value; $this->field_generator($option) ?>
    get_meta_box_screen()[0] == 'mep_events' && $this->get_meta_box_context() == 'normal' && !isset($this->data['seat_plan'])) { ?>
    get_post_id(); if (empty($id)) { return; } $prent_option_name = $this->get_option_name(); $FormFieldsGenerator = new FormFieldsGenerator(); if (!empty($prent_option_name)) : $field_name = $prent_option_name . '[' . $id . ']'; $option['field_name'] = $field_name; $prent_option_value = get_post_meta($post_id, $prent_option_name, true); $prent_option_value = is_serialized($prent_option_value) ? unserialize($prent_option_value) : array(); $option['value'] = isset($prent_option_value[$id]) ? $prent_option_value[$id] : ''; else : $option['field_name'] = $id; $option_value = get_post_meta($post_id, $id, true); $option['value'] = is_serialized($option_value) ? unserialize($option_value) : $option_value; endif; if (sizeof($option) > 0 && isset($option['type'])) { echo mep_field_generator($option['type'], $option); do_action("wp_theme_settings_field_$type", $option); } if (!empty($details)) { echo "

    " . mep_esc_html($details) . "

    "; } } private function get_meta_box_id() { if (isset($this->data['meta_box_id'])) { return $this->data['meta_box_id']; } else { return ""; } } private function get_meta_box_title() { if (isset($this->data['meta_box_title'])) { return $this->data['meta_box_title']; } else { return ""; } } private function get_meta_box_screen() { if (isset($this->data['screen'])) { return $this->data['screen']; } else { return array('post'); } } private function get_meta_box_context() { if (isset($this->data['context'])) { return $this->data['context']; } else { return 'normal'; } } private function get_meta_box_priority() { if (isset($this->data['priority'])) { return $this->data['priority']; } else { return "high"; } } private function get_callback_args() { if (isset($this->data['callback_args'])) { return $this->data['callback_args']; } else { return array(); } } private function get_panels() { if (isset($this->data['panels'])) { return $this->data['panels']; } else { return array(); } } private function get_item_name() { if (isset($this->data['item_name'])) { return $this->data['item_name']; } else { return "PickPlugins"; } } private function get_item_version() { if (isset($this->data['item_version'])) { return $this->data['item_version']; } else { return "1.0.0"; } } private function get_option_name() { if (isset($this->data['option_name'])) { return $this->data['option_name']; } else { return false; } } private function get_nav_position() { if (isset($this->data['nav_position'])) { return $this->data['nav_position']; } else { return 'left'; } } private function get_post_id() { $post_id = get_the_ID(); return $post_id; } } }