function update

This commit is contained in:
magepeopleteam 2021-11-01 07:26:30 +00:00
parent ecbbc9b67e
commit 15720d0ceb
4 changed files with 53 additions and 47 deletions

View File

@ -112,3 +112,9 @@ function mep_ajax_url(){
</script>
<?php
}
add_action('wp_head', 'mep_add_wp_header_scripts');
function mep_add_wp_header_scripts(){
echo mep_event_rich_text_data();
echo mep_apply_custom_css();
}

View File

@ -1255,8 +1255,7 @@ if (!function_exists('mep_add_to_google_calender_link')) {
.mep-default-sidrbar-social .mep-event-meta {text-align: center;}
</style>
<?php
$content = ob_get_clean();
echo $content;
return ob_get_clean();
}
}
@ -1687,8 +1686,7 @@ if (!function_exists('mep_get_all_date_time')) {
<li><i class="fa fa-calendar"></i> <?php echo date_i18n($date_format, strtotime($end_datetime)); ?> <i class="fa fa-clock-o"></i> <?php echo date($timeformatassettings, strtotime($end_datetime)); ?> <span style='font-size: 12px;font-weight: bold;'>(<?php esc_html_e('End', 'mage-eventpress'); ?>)</span></li>
</ul>
<?php
$content = ob_get_clean();
echo $content;
echo ob_get_clean();
}
}
@ -2697,7 +2695,7 @@ if (!function_exists('get_event_list_js')) {
</script>
<?php
echo $content = ob_get_clean();
echo ob_get_clean();
}
}
@ -2766,10 +2764,16 @@ if (!function_exists('mep_event_get_the_content')) {
}
/**
* This the function which will create the Rich Text Schema For each event into the <head></head> section.
*/
add_action('wp_head', 'mep_event_rich_text_data');
if (!function_exists('mep_event_rich_text_data')) {
function mep_event_rich_text_data() {
global $post;
@ -2823,12 +2827,10 @@ if (!function_exists('mep_event_rich_text_data')) {
"name": "<?php echo esc_attr($org_name); ?>"
}
}
</script>
<?php
echo $content = ob_get_clean();
return ob_get_clean();
}
}
}
@ -2910,7 +2912,7 @@ if (!function_exists('mep_custom_css_sectings_fields')) {
return array_merge($default_fields, $settings_fields);
}
}
add_action('wp_head', 'mep_apply_custom_css', 90);
// add_action('wp_head', 'mep_apply_custom_css', 90);
if (!function_exists('mep_apply_custom_css')) {
function mep_apply_custom_css() {
$custom_css = mep_get_option('mep_custom_css', 'mep_settings_custom_css', '');
@ -2921,7 +2923,7 @@ if (!function_exists('mep_apply_custom_css')) {
<?php echo $custom_css; ?>
</style>
<?php
echo ob_get_clean();
return ob_get_clean();
}
}
@ -4375,8 +4377,6 @@ if (!class_exists('MPWEM_Helper')) {
$city_list[] = $post->meta_value;
}
}
//wp_reset_postdata();
//ob_get_clean();
return $city_list;
}

View File

@ -14,7 +14,7 @@ if (!function_exists('mep_ev_calender')) {
* Action Hook mep_before_add_calendar_button & mep_after_add_calendar_button
*/
do_action('mep_before_add_calendar_button');
mep_add_to_google_calender_link($event_id);
echo mep_add_to_google_calender_link($event_id);
do_action('mep_after_add_calendar_button');
?>
</div>

View File

@ -96,7 +96,7 @@ class MEPEventAddCalendarWidget extends Widget_Base {
<div class="calender-url">
<?php
do_action('mep_before_add_calendar_button');
mep_add_to_google_calender_link($event_id);
echo mep_add_to_google_calender_link($event_id);
do_action('mep_after_add_calendar_button');
?>
</div>