faq added in 2.0.4 ver
This commit is contained in:
parent
5d3c4d7e48
commit
0b55a600bb
|
@ -99,3 +99,27 @@ table.atendee-info {
|
|||
border-color: #4d90fe;
|
||||
}
|
||||
|
||||
div#mep_event_faq_r {
|
||||
display: block;
|
||||
width: 94%;
|
||||
border: 1px solid #ddd;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.mep-faq-input {
|
||||
width: 100%;
|
||||
display: block;
|
||||
border: 1px solid #8a8a8a;
|
||||
padding: 5px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
div#mep-event-faq-box {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
a.button.remove-faq-row {
|
||||
/* float: right; */
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
|
@ -54,7 +54,23 @@
|
|||
text-align: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
div#mep-event-accordion h3 {
|
||||
background: whitesmoke;
|
||||
border: 1px solid #e4e4e4;
|
||||
border-radius: 0;
|
||||
padding: 15px 5px;
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div#mep-event-accordion p {
|
||||
border-radius: 0;
|
||||
border-color: #e7e7e7;
|
||||
padding: 5px 5px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.mep-top-part, .mep-btn-part, .mep-content-part {
|
||||
overflow: hidden;
|
||||
|
@ -747,8 +763,26 @@ label.mep-show {
|
|||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tem2-cart-sec {
|
||||
width: 50%;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tem2-faq-sec {
|
||||
width: 50%;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.tem2-faq-sec h4 {
|
||||
padding: 0!important;
|
||||
margin: 0 0 15px 0!important;
|
||||
font-size: 18px!important;
|
||||
}
|
||||
.tem2-carts form {
|
||||
/* width: 700px; */
|
||||
}
|
||||
|
@ -1323,6 +1357,25 @@ h4.mep-cart-table-title {
|
|||
width: auto!important;
|
||||
margin-top: 10px!important;
|
||||
}
|
||||
.mep-default-feature-faq-sec .mep-event-faq-part {
|
||||
margin: 20px 0;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.mep-default-feature-faq-sec h4 {
|
||||
|
||||
border-radius: 0;
|
||||
padding: 15px 15px!important;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
background: -webkit-gradient(linear, left top, right bottom, from(#ff3e00), to(#ffbe30));
|
||||
background: -webkit-linear-gradient(top left, #ff3e00, #ffbe30);
|
||||
background: -o-linear-gradient(top left, #ff3e00, #ffbe30);
|
||||
background: linear-gradient(to bottom right, #ff3e00, #ffbe30);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Responsive CSS
|
||||
=====================================================================*/
|
||||
@media only screen and (min-width: 768px) and (max-width: 990px) {
|
||||
|
|
|
@ -31,22 +31,16 @@ if($user_api){
|
|||
// Enqueue Scripts for frontend
|
||||
add_action('wp_enqueue_scripts', 'mep_event_enqueue_scripts');
|
||||
function mep_event_enqueue_scripts() {
|
||||
wp_enqueue_script('jquery');
|
||||
wp_enqueue_style('mep-event-style',plugin_dir_url( __DIR__ ).'css/style.css',array());
|
||||
wp_enqueue_style ('font-awesome-css-cdn',"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css",null,1);
|
||||
|
||||
wp_enqueue_style('mep-calendar-min-style',plugin_dir_url( __DIR__ ).'css/calendar.min.css',array());
|
||||
|
||||
wp_enqueue_script('mep-moment-js',plugin_dir_url( __DIR__ ).'js/moment.js',array(),1,true);
|
||||
|
||||
wp_enqueue_script('mep-calendar-scripts',plugin_dir_url( __DIR__ ).'js/calendar.min.js',array('jquery','mep-moment-js'),1,false);
|
||||
|
||||
// wp_enqueue_script('mep-event-scripts',plugin_dir_url( __DIR__ ).'js/events.js',array(),1,true);
|
||||
|
||||
wp_enqueue_script('jquery');
|
||||
wp_enqueue_script('jquery-ui-accordion');
|
||||
wp_enqueue_style('mep-jquery-ui-style',plugin_dir_url( __DIR__ ).'css/jquery-ui.css',array());
|
||||
wp_enqueue_style('mep-event-style',plugin_dir_url( __DIR__ ).'css/style.css',array());
|
||||
wp_enqueue_style ('font-awesome-css-cdn',"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css",null,1);
|
||||
wp_enqueue_style('mep-calendar-min-style',plugin_dir_url( __DIR__ ).'css/calendar.min.css',array());
|
||||
wp_enqueue_script('mep-moment-js',plugin_dir_url( __DIR__ ).'js/moment.js',array(),1,true);
|
||||
wp_enqueue_script('mep-calendar-scripts',plugin_dir_url( __DIR__ ).'js/calendar.min.js',array('jquery','mep-moment-js'),1,false);
|
||||
wp_enqueue_script('mep-mixitup-min-js',plugin_dir_url( __DIR__ ).'js/mixitup.min.js',array(),1,true);
|
||||
|
||||
wp_enqueue_script('mep-event-custom-scripts',plugin_dir_url( __DIR__ ).'js/mkb-scripts.js',array(),1,true);
|
||||
|
||||
}
|
||||
|
||||
// Enqueue Scripts for frontend
|
||||
|
|
|
@ -18,6 +18,8 @@ function mep_event_meta_box_add(){
|
|||
add_meta_box( 'mep-event-template', 'Template', 'mep_event_template_meta_box_cb', 'mep_events', 'side', 'low' );
|
||||
|
||||
add_meta_box( 'mep-event-reg-form', 'Event Registration Form', 'mep_event_reg_form_meta_box_cb', 'mep_events', 'normal', 'high' );
|
||||
|
||||
add_meta_box( 'mep-event-faq-box', 'Event F.A.Q', 'mep_event_faq_meta_box_cb', 'mep_events', 'normal', 'high' );
|
||||
}
|
||||
|
||||
|
||||
|
@ -254,6 +256,126 @@ $values = get_post_custom( $post->ID );
|
|||
|
||||
|
||||
|
||||
function mep_event_faq_meta_box_cb() {
|
||||
global $post;
|
||||
$mep_event_faq = get_post_meta($post->ID, 'mep_event_faq', true);
|
||||
wp_nonce_field( 'mep_event_faq_nonce', 'mep_event_faq_nonce' );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function( $ ){
|
||||
$( '#add-faq-row' ).on('click', function() {
|
||||
var row = $( '.empty-row-faq.screen-reader-text' ).clone(true);
|
||||
row.removeClass( 'empty-row-faq screen-reader-text' );
|
||||
row.insertBefore( '#repeatable-fieldset-faq-one tbody>tr:last' );
|
||||
return false;
|
||||
});
|
||||
|
||||
$( '.remove-faq-row' ).on('click', function() {
|
||||
$(this).parents('tr').remove();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<table id="repeatable-fieldset-faq-one" width="100%">
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
if ( $mep_event_faq ) :
|
||||
foreach ( $mep_event_faq as $field ) {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='mep_event_faq_r' class="">
|
||||
<input placeholder="FAQ Title" type="text" class="mep-faq-input" value="<?php if($field['mep_faq_title'] != '') echo esc_attr( $field['mep_faq_title'] ); ?>" name="mep_faq_title[]">
|
||||
<textarea placeholder="FAQ Contents" name="mep_faq_content[]" id="" cols="50" rows="4" class="mep-faq-input"><?php if($field['mep_faq_content'] != '') echo esc_attr( $field['mep_faq_content'] ); ?></textarea>
|
||||
<a class="button remove-faq-row" href="#">Remove</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
else :
|
||||
// show a blank one
|
||||
endif;
|
||||
?>
|
||||
|
||||
<!-- empty hidden one for jQuery -->
|
||||
<tr class="empty-row-faq screen-reader-text">
|
||||
<td>
|
||||
<div id='mep_event_faq_r' class="">
|
||||
<input placeholder="FAQ Title" type="text" class="mep-faq-input" name="mep_faq_title[]">
|
||||
<textarea placeholder="FAQ Contents" name="mep_faq_content[]" id="" cols="50" rows="4" class="mep-faq-input"></textarea>
|
||||
<a class="button remove-faq-row" href="#">Remove</a>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a id="add-faq-row" class="button" href="#">Add New F.A.Q</a></p>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('save_post', 'mep_event_faq_save');
|
||||
function mep_event_faq_save($post_id) {
|
||||
global $wpdb;
|
||||
|
||||
|
||||
if ( ! isset( $_POST['mep_event_faq_nonce'] ) ||
|
||||
! wp_verify_nonce( $_POST['mep_event_faq_nonce'], 'mep_event_faq_nonce' ) )
|
||||
return;
|
||||
|
||||
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
||||
return;
|
||||
|
||||
if (!current_user_can('edit_post', $post_id))
|
||||
return;
|
||||
|
||||
$old = get_post_meta($post_id, 'mep_event_faq', true);
|
||||
$new = array();
|
||||
// $options = hhs_get_sample_options();
|
||||
|
||||
$names = $_POST['mep_faq_title'];
|
||||
$cntent = $_POST['mep_faq_content'];
|
||||
|
||||
$order_id = 0;
|
||||
$count = count( $names );
|
||||
|
||||
for ( $i = 0; $i < $count; $i++ ) {
|
||||
|
||||
if ( $names[$i] != '' ) :
|
||||
$new[$i]['mep_faq_title'] = stripslashes( strip_tags( $names[$i] ) );
|
||||
endif;
|
||||
|
||||
if ( $cntent[$i] != '' ) :
|
||||
$new[$i]['mep_faq_content'] = stripslashes( strip_tags( $cntent[$i] ) );
|
||||
endif;
|
||||
|
||||
}
|
||||
|
||||
if ( !empty( $new ) && $new != $old )
|
||||
update_post_meta( $post_id, 'mep_event_faq', $new );
|
||||
elseif ( empty($new) && $old )
|
||||
delete_post_meta( $post_id, 'mep_event_faq', $old );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function mep_event_extra_price_option() {
|
||||
global $post;
|
||||
$mep_events_extra_prices = get_post_meta($post->ID, 'mep_events_extra_prices', true);
|
||||
|
@ -566,6 +688,8 @@ if($current_template){
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
add_action('save_post', 'mep_events_ticket_type_save');
|
||||
function mep_events_ticket_type_save($post_id) {
|
||||
global $wpdb;
|
||||
|
|
|
@ -149,4 +149,7 @@ You can display the event list on any page by using the ShortCode. Just use this
|
|||
*Update Release, Responsive issue fixed, added label setting panel so now easily all lable changable from dashboard. 03 July 2018*
|
||||
|
||||
= 2.0.4 =
|
||||
*Update Release, Minor Bug Fixs. 04 July 2018*
|
||||
*Update Release, Minor Bug Fixs. 04 July 2018*
|
||||
|
||||
= 2.0.5 =
|
||||
*Update Release,F.A.Q Feature added into every events. 04 July 2018*
|
|
@ -51,6 +51,17 @@ function calculateTotal() {
|
|||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
jQuery( "#mep-event-accordion" ).accordion({
|
||||
collapsible: true,
|
||||
active: false
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jQuery(document).on("change", ".etp", function() {
|
||||
var sum = 0;
|
||||
jQuery(".etp").each(function(){
|
||||
|
@ -62,19 +73,19 @@ jQuery(document).on("change", ".etp", function() {
|
|||
|
||||
|
||||
jQuery("#ttypelist").change(function () {
|
||||
vallllp = jQuery(this).val()+"_";
|
||||
var n = vallllp.split('_');
|
||||
var price = n[0];
|
||||
var ctt = 99;
|
||||
vallllp = jQuery(this).val()+"_";
|
||||
var n = vallllp.split('_');
|
||||
var price = n[0];
|
||||
var ctt = 99;
|
||||
if(vallllp!="_"){
|
||||
|
||||
var currentValue = parseInt(ctt);
|
||||
jQuery('#rowtotal').val(currentValue += parseFloat(price));
|
||||
}
|
||||
if(vallllp=="_"){
|
||||
jQuery('#eventtp').attr('value', 0);
|
||||
jQuery('#eventtp').attr('max', 0);
|
||||
jQuery("#ttypeprice_show").html("")
|
||||
jQuery('#eventtp').attr('value', 0);
|
||||
jQuery('#eventtp').attr('max', 0);
|
||||
jQuery("#ttypeprice_show").html("")
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,8 +95,8 @@ if(vallllp=="_"){
|
|||
function updateTotal() {
|
||||
var total = 0;
|
||||
vallllp = jQuery(this).val()+"_";
|
||||
var n = vallllp.split('_');
|
||||
var price = n[0];
|
||||
var n = vallllp.split('_');
|
||||
var price = n[0];
|
||||
total += parseFloat(price);
|
||||
jQuery('#rowtotal').val(total);
|
||||
}
|
||||
|
@ -147,7 +158,7 @@ jQuery('#eventpxtp_<?php echo $count; ?>').on('change', function () {
|
|||
|
||||
<?php
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
?>
|
||||
jQuery('#quantity_5a7abbd1bff73').on('change', function () {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
add_action('mep_event_faq','mep_faq_part');
|
||||
function mep_faq_part(){
|
||||
global $post;
|
||||
$mep_event_faq = get_post_meta($post->ID, 'mep_event_faq', true);
|
||||
if ( $mep_event_faq ) {
|
||||
?>
|
||||
<div class="mep-event-faq-part">
|
||||
<h4><?php _e('Event F.A.Q','mep'); ?></h4>
|
||||
<div id='mep-event-accordion' class="">
|
||||
<?php
|
||||
foreach ( $mep_event_faq as $field ) {
|
||||
?>
|
||||
<h3><?php if($field['mep_faq_title'] != '') echo esc_attr( $field['mep_faq_title'] ); ?></h3>
|
||||
<p><?php if($field['mep_faq_content'] != '') echo esc_attr( $field['mep_faq_content'] ); ?></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -13,4 +13,5 @@ require_once(dirname(__FILE__) . "/event_location.php");
|
|||
require_once(dirname(__FILE__) . "/event_add_cart.php");
|
||||
require_once(dirname(__FILE__) . "/event_ticket_type_extra_service.php");
|
||||
require_once(dirname(__FILE__) . "/event_ticket_type.php");
|
||||
require_once(dirname(__FILE__) . "/event_extra_service.php");
|
||||
require_once(dirname(__FILE__) . "/event_extra_service.php");
|
||||
require_once(dirname(__FILE__) . "/faq.php");
|
|
@ -38,7 +38,15 @@
|
|||
</div>
|
||||
<div class="mep-default-feature-cart-sec">
|
||||
<?php do_action('mep_add_to_cart') ?>
|
||||
</div>
|
||||
|
||||
<div class="mep-default-feature-faq-sec">
|
||||
<?php do_action('mep_event_faq'); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="mep-default-sidebar">
|
||||
<div class="mep-default-sidrbar-map">
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
<div class="mep-event-details">
|
||||
<h3 class="mep-desc-title"><?php _e('Description','mep'); ?></h3>
|
||||
<?php do_action('mep_event_details'); ?>
|
||||
<div class="mep-theme1-faq-sec">
|
||||
<?php do_action('mep_event_faq'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mep-right-col">
|
||||
|
|
|
@ -19,9 +19,14 @@
|
|||
<?php do_action('mep_event_add_calender'); ?>
|
||||
</div>
|
||||
<div class="tem2-carts">
|
||||
<?php do_action('mep_event_price'); ?>
|
||||
<?php do_action('mep_event_seat'); ?>
|
||||
<?php do_action('mep_add_to_cart') ?>
|
||||
<div class="tem2-cart-sec">
|
||||
<?php do_action('mep_event_price'); ?>
|
||||
<?php do_action('mep_event_seat'); ?>
|
||||
<?php do_action('mep_add_to_cart') ?>
|
||||
</div>
|
||||
<div class="tem2-faq-sec">
|
||||
<?php do_action('mep_event_faq'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mep-tem2-venue">
|
||||
<div class="tm2-location">
|
||||
|
|
|
@ -24,11 +24,14 @@
|
|||
|
||||
<div class="mid-sec-right">
|
||||
<div class="mep-tem3-share-btn">
|
||||
<?php do_action('mep_event_price'); ?>
|
||||
<?php do_action('mep_event_seat'); ?>
|
||||
<?php do_action('mep_event_price'); ?>
|
||||
<?php do_action('mep_event_seat'); ?>
|
||||
<?php do_action('mep_event_add_calender'); ?>
|
||||
<?php do_action('mep_event_social_share'); ?>
|
||||
</div>
|
||||
<div class="tmep-emplate-3-faq-sec">
|
||||
<?php do_action('mep_event_faq'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: Woocommerce Events Manager
|
||||
* Plugin URI: http://mage-people.com
|
||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||
* Version: 2.0.4
|
||||
* Version: 2.0.5
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue