diff --git a/css/admin_style.css b/css/admin_style.css index eeb0aaf..d103bff 100644 --- a/css/admin_style.css +++ b/css/admin_style.css @@ -282,4 +282,18 @@ ul.mep_rt_settings_list li { background: #ddd; margin-bottom: 30px; margin-top: 10px; +} +.mep_event_metabox_address .sec { + width: 48%; + display: inline-block; + padding: 0px 10px; +} +#poststuff .stuffbox>h3, #poststuff h2, #poststuff h3.hndle { + display: block; +} +span.event_meta_help_txt { + display: block; + font-size: 13px; + margin: 2px 0 20px; + color: #ba2720; } \ No newline at end of file diff --git a/inc/mep_cpt.php b/inc/mep_cpt.php index ea6c021..b91530f 100644 --- a/inc/mep_cpt.php +++ b/inc/mep_cpt.php @@ -18,29 +18,29 @@ function mep_cpt() 'singular_name' => __($event_label, 'mage-eventpress'), 'menu_name' => __($event_label, 'mage-eventpress'), 'name_admin_bar' => __($event_label, 'mage-eventpress'), - 'archives' => __($event_label.' List', 'mage-eventpress'), - 'attributes' => __($event_label.' List', 'mage-eventpress'), - 'parent_item_colon' => __($event_label.' Item:', 'mage-eventpress'), - 'all_items' => __('All '.$event_label, 'mage-eventpress'), - 'add_new_item' => __('Add New '.$event_label, 'mage-eventpress'), - 'add_new' => __('Add New '.$event_label, 'mage-eventpress'), - 'new_item' => __('New '.$event_label, 'mage-eventpress'), - 'edit_item' => __('Edit '.$event_label, 'mage-eventpress'), - 'update_item' => __('Update '.$event_label, 'mage-eventpress'), - 'view_item' => __('View '.$event_label, 'mage-eventpress'), - 'view_items' => __('View '.$event_label, 'mage-eventpress'), - 'search_items' => __('Search '.$event_label, 'mage-eventpress'), - 'not_found' => __($event_label.' Not found', 'mage-eventpress'), - 'not_found_in_trash' => __($event_label.' Not found in Trash', 'mage-eventpress'), - 'featured_image' => __($event_label.' Feature Image', 'mage-eventpress'), - 'set_featured_image' => __('Set '.$event_label.' featured image', 'mage-eventpress'), - 'remove_featured_image' => __('Remove '.$event_label.' featured image', 'mage-eventpress'), - 'use_featured_image' => __('Use as '.$event_label.' featured image', 'mage-eventpress'), - 'insert_into_item' => __('Insert into '.$event_label, 'mage-eventpress'), - 'uploaded_to_this_item' => __('Uploaded to this '.$event_label, 'mage-eventpress'), - 'items_list' => __($event_label.' list', 'mage-eventpress'), - 'items_list_navigation' => __($event_label.' list navigation', 'mage-eventpress'), - 'filter_items_list' => __('Filter '.$event_label.' list', 'mage-eventpress'), + 'archives' => __($event_label . ' List', 'mage-eventpress'), + 'attributes' => __($event_label . ' List', 'mage-eventpress'), + 'parent_item_colon' => __($event_label . ' Item:', 'mage-eventpress'), + 'all_items' => __('All ' . $event_label, 'mage-eventpress'), + 'add_new_item' => __('Add New ' . $event_label, 'mage-eventpress'), + 'add_new' => __('Add New ' . $event_label, 'mage-eventpress'), + 'new_item' => __('New ' . $event_label, 'mage-eventpress'), + 'edit_item' => __('Edit ' . $event_label, 'mage-eventpress'), + 'update_item' => __('Update ' . $event_label, 'mage-eventpress'), + 'view_item' => __('View ' . $event_label, 'mage-eventpress'), + 'view_items' => __('View ' . $event_label, 'mage-eventpress'), + 'search_items' => __('Search ' . $event_label, 'mage-eventpress'), + 'not_found' => __($event_label . ' Not found', 'mage-eventpress'), + 'not_found_in_trash' => __($event_label . ' Not found in Trash', 'mage-eventpress'), + 'featured_image' => __($event_label . ' Feature Image', 'mage-eventpress'), + 'set_featured_image' => __('Set ' . $event_label . ' featured image', 'mage-eventpress'), + 'remove_featured_image' => __('Remove ' . $event_label . ' featured image', 'mage-eventpress'), + 'use_featured_image' => __('Use as ' . $event_label . ' featured image', 'mage-eventpress'), + 'insert_into_item' => __('Insert into ' . $event_label, 'mage-eventpress'), + 'uploaded_to_this_item' => __('Uploaded to this ' . $event_label, 'mage-eventpress'), + 'items_list' => __($event_label . ' list', 'mage-eventpress'), + 'items_list_navigation' => __($event_label . ' list navigation', 'mage-eventpress'), + 'filter_items_list' => __('Filter ' . $event_label . ' list', 'mage-eventpress'), ); $args = array( @@ -48,7 +48,8 @@ function mep_cpt() 'labels' => $labels, 'menu_icon' => $event_icon, 'supports' => array('title', 'editor', 'thumbnail', 'excerpt'), - 'rewrite' => array('slug' => $event_slug) + 'rewrite' => array('slug' => $event_slug), + 'show_in_rest' => true ); register_post_type('mep_events', $args); @@ -89,11 +90,12 @@ function mep_cpt() 'menu_icon' => 'dashicons-calendar-alt', 'supports' => array('title', 'editor', 'thumbnail', 'excerpt'), 'rewrite' => array('slug' => 'event-speaker'), - 'show_in_menu' => 'edit.php?post_type=mep_events', + 'show_in_menu' => 'edit.php?post_type=mep_events', + 'show_in_rest' => true ); - - if($speaker_status == 'yes'){ + + if ($speaker_status == 'yes') { register_post_type('mep_event_speaker', $args); } } diff --git a/inc/mep_enque.php b/inc/mep_enque.php index 3569db4..a0d88e5 100644 --- a/inc/mep_enque.php +++ b/inc/mep_enque.php @@ -17,10 +17,6 @@ function mep_add_admin_scripts($hook) */ if ($hook == 'post-new.php' || $hook == 'post.php') { if ('mep_events' === $post->post_type) { - // wp_enqueue_script('jquery-ui-timepicker-addon', plugin_dir_url(__DIR__) . 'js/jquery-ui-timepicker-addon.js', array('jquery', 'jquery-ui-core'), 1, true); - // wp_enqueue_script('jquery-ui-timepicker-addon', plugin_dir_url(__DIR__) . 'js/jquery-ui-sliderAccess.js', array('jquery', 'jquery-ui-core', 'jquery-ui-timepicker-addon'), 1, true); - // wp_enqueue_script('mep_datepicker', plugin_dir_url(__DIR__) . 'js/mep_datepicker.js', array('jquery', 'jquery-ui-core', 'jquery-ui-timepicker-addon'), 1, true); - // wp_enqueue_style('jquery-ui-timepicker-addon', plugin_dir_url(__DIR__) . 'css/jquery-ui-timepicker-addon.css', array()); wp_enqueue_style('mep-jquery-ui-style', plugin_dir_url(__DIR__) . 'css/jquery-ui.css', array()); wp_enqueue_script('gmap-scripts', plugin_dir_url(__DIR__) . 'js/mkb-admin.js', array('jquery', 'jquery-ui-core'), 1, true); } @@ -56,7 +52,7 @@ function mep_add_admin_scripts($hook) wp_enqueue_script('wp-color-picker'); wp_enqueue_script('magepeople-options-framework', plugins_url('js/mage-options-framework.js', __DIR__), array('jquery')); wp_localize_script('PickpluginsOptionsFramework', 'PickpluginsOptionsFramework_ajax', array('PickpluginsOptionsFramework_ajaxurl' => admin_url('admin-ajax.php'))); - wp_enqueue_script('select2.min', plugins_url('js/select2.min.js', __DIR__), array('jquery')); +// wp_enqueue_script('select2.min', plugins_url('js/select2.min.js', __DIR__), array('jquery')); wp_enqueue_script('codemirror', plugin_dir_url(__DIR__) . 'js/codemirror.min.js', array('jquery'), null, false); wp_enqueue_script('form-field-dependency', plugins_url('js/form-field-dependency.js', __DIR__), array('jquery'), null, false); wp_localize_script('jquery', 'mep_ajax', array( 'mep_ajaxurl' => admin_url( 'admin-ajax.php'))); @@ -99,3 +95,14 @@ if($owlThemeLoad == 'no'){ } +// Ajax Issue +add_action('wp_head','mep_ajax_url',5); +add_action('admin_head','mep_ajax_url',5); +function mep_ajax_url(){ +?> + +ID ); $user_api = mep_get_option( 'google-map-api', 'general_setting_sec', ''); $map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'iframe'); + +$mep_org_address = array_key_exists('mep_org_address', $values) ? $values['mep_org_address'][0] : 0 ; ?> -
'; + echo $notice; + echo '
'; + echo ' ' . $this->client->__trans( 'Allow' ) . ''; + echo ' ' . $this->client->__trans( 'No thanks' ) . ''; + echo '