function wpdevbk_show_booking_footer() { $wpdev_copyright_adminpanel = get_bk_option('booking_wpdev_copyright_adminpanel'); // check if ($wpdev_copyright_adminpanel !== 'Off' && !wpdev_bk_is_this_demo()) { $message = ''; $message .= '<a target="_blank" href="http://wpbookingcalendar.com/">Booking Calendar</a> ' . __('version', 'wpdev-booking') . ' ' . WP_BK_VERSION_NUM; $message .= ' | ' . sprintf(__('Add your %s on %swordpress.org%s, if you enjoyed by this plugin.', 'wpdev-booking'), '<a target="_blank" href="http://goo.gl/tcrrpK" >★★★★★</a>', '<a target="_blank" href="http://goo.gl/tcrrpK" >', '</a>'); echo '<div id="wpbc-footer" style="position:absolute;bottom:40px;text-align:left;width:100%;font-size:10px;text-shadow:0 1px 0 #fff;margin:0;color:#888;">' . $message . '</div>'; ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#wpfooter').append( jQuery('#wpbc-footer') ); }); </script> <?php } }
function wpdev_booking_deactivate() { // set execution time to 15 minutes, its not worked if we have SAFE MODE ON at PHP if (function_exists('set_time_limit')) { if (!in_array(ini_get('safe_mode'), array('1', 'On'))) { set_time_limit(900); } } $is_delete_if_deactive = get_bk_option('booking_is_delete_if_deactive'); // check if ($is_delete_if_deactive == 'On') { // Delete here tables and options, which are needed for using plugin delete_bk_option('booking_version_num'); delete_bk_option('booking_skin'); delete_bk_option('bookings_num_per_page'); delete_bk_option('booking_sort_order'); delete_bk_option('booking_sort_order_direction'); delete_bk_option('booking_default_toolbar_tab'); delete_bk_option('bookings_listing_default_view_mode'); delete_bk_option('booking_view_days_num'); delete_bk_option('booking_max_monthes_in_calendar'); delete_bk_option('booking_admin_cal_count'); delete_bk_option('booking_client_cal_count'); delete_bk_option('booking_start_day_weeek'); delete_bk_option('booking_title_after_reservation'); delete_bk_option('booking_title_after_reservation_time'); delete_bk_option('booking_type_of_thank_you_message', 'message'); delete_bk_option('booking_thank_you_page_URL', site_url()); delete_bk_option('booking_is_use_autofill_4_logged_user'); delete_bk_option('booking_form_is_using_bs_css'); delete_bk_option('booking_form_format_type'); delete_bk_option('booking_form_field_active1'); delete_bk_option('booking_form_field_required1'); delete_bk_option('booking_form_field_label1'); delete_bk_option('booking_form_field_active2'); delete_bk_option('booking_form_field_required2'); delete_bk_option('booking_form_field_label2'); delete_bk_option('booking_form_field_active3'); delete_bk_option('booking_form_field_required3'); delete_bk_option('booking_form_field_label3'); delete_bk_option('booking_form_field_active4'); delete_bk_option('booking_form_field_required4'); delete_bk_option('booking_form_field_label4'); delete_bk_option('booking_form_field_active5'); delete_bk_option('booking_form_field_required5'); delete_bk_option('booking_form_field_label5'); delete_bk_option('booking_date_format'); delete_bk_option('booking_date_view_type'); delete_bk_option('booking_is_delete_if_deactive'); // check delete_bk_option('booking_wpdev_copyright_adminpanel'); // check delete_bk_option('booking_is_show_powered_by_notice'); // check delete_bk_option('booking_is_use_captcha'); delete_bk_option('booking_is_show_legend'); delete_bk_option('booking_legend_is_show_item_available'); delete_bk_option('booking_legend_text_for_item_available'); delete_bk_option('booking_legend_is_show_item_pending'); delete_bk_option('booking_legend_text_for_item_pending'); delete_bk_option('booking_legend_is_show_item_approved'); delete_bk_option('booking_legend_text_for_item_approved'); if (class_exists('wpdev_bk_biz_s')) { delete_bk_option('booking_legend_is_show_item_partially'); delete_bk_option('booking_legend_text_for_item_partially'); } delete_bk_option('booking_dif_colors_approval_pending'); delete_bk_option('booking_is_use_hints_at_admin_panel'); delete_bk_option('booking_is_not_load_bs_script_in_client'); delete_bk_option('booking_is_not_load_bs_script_in_admin'); delete_bk_option('booking_multiple_day_selections'); delete_bk_option('booking_type_of_day_selections'); delete_bk_option('booking_unavailable_days_num_from_today'); delete_bk_option('booking_unavailable_day0'); delete_bk_option('booking_unavailable_day1'); delete_bk_option('booking_unavailable_day2'); delete_bk_option('booking_unavailable_day3'); delete_bk_option('booking_unavailable_day4'); delete_bk_option('booking_unavailable_day5'); delete_bk_option('booking_unavailable_day6'); delete_bk_option('booking_user_role_booking'); delete_bk_option('booking_user_role_addbooking'); delete_bk_option('booking_user_role_resources'); delete_bk_option('booking_user_role_settings'); delete_bk_option('booking_email_reservation_adress'); delete_bk_option('booking_email_reservation_from_adress'); delete_bk_option('booking_email_reservation_subject'); delete_bk_option('booking_email_reservation_content'); delete_bk_option('booking_email_approval_adress'); delete_bk_option('booking_email_approval_subject'); delete_bk_option('booking_email_approval_content'); delete_bk_option('booking_email_deny_adress'); delete_bk_option('booking_email_deny_subject'); delete_bk_option('booking_email_deny_content'); delete_bk_option('booking_is_email_reservation_adress'); delete_bk_option('booking_is_email_approval_adress'); delete_bk_option('booking_is_email_deny_adress'); delete_bk_option('booking_widget_title'); delete_bk_option('booking_widget_show'); delete_bk_option('booking_widget_type'); delete_bk_option('booking_widget_calendar_count'); delete_bk_option('booking_widget_last_field'); global $wpdb; $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}booking"); $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}bookingdates"); // Delete all users booking windows states if (false === $wpdb->query("DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE '%booking_%'")) { // All users data bk_error('Error during deleting user meta at DB', __FILE__, __LINE__); die; } // Delete or Drafts and Pending from demo sites if (wpdev_bk_is_this_demo()) { // Delete all temp posts at the demo sites: (post_status = pending || draft) && ( post_type = post ) && (post_author != 1) $postss = $wpdb->get_results("SELECT * FROM {$wpdb->posts} WHERE ( post_status = 'pending' OR post_status = 'draft' OR post_status = 'auto-draft' OR post_status = 'trash' OR post_status = 'inherit' ) AND ( post_type='post' OR post_type='revision') AND post_author != 1"); foreach ($postss as $pp) { wp_delete_post($pp->ID, true); } } make_bk_action('wpdev_booking_deactivation'); } }
function wpdevbk_booking_listings_tabs_in_top_menu_line() { $is_only_icons = !true; if ($is_only_icons) { echo '<style type="text/css"> #menu-wpdevplugin .nav-tab { padding:4px 2px 6px 32px !important; } </style>'; } $selected_icon = 'Season-64x64.png'; if (!isset($_REQUEST['tab'])) { $_REQUEST['tab'] = 'filter'; } $selected_title = $_REQUEST['tab']; ?> <div style="height:1px;clear:both;margin-top:30px;"></div> <div id="menu-wpdevplugin"> <div class="nav-tabs-wrapper"> <div class="nav-tabs"> <?php $title = __('Filter', 'wpdev-booking'); $my_icon = 'Season-64x64.png'; $my_tab = 'filter'; $my_additinal_class = ''; ?> <?php if ($_REQUEST['tab'] == 'filter') { $slct_a = 'selected'; $selected_title = $title; $selected_icon = $my_icon; } else { $slct_a = ''; } ?> <a class="nav-tab <?php if ($slct_a == 'selected') { echo ' nav-tab-active '; } echo $my_additinal_class; ?> " title="<?php //echo __('Customization of booking form fields','wpdev-booking'); ?> " href="#" onclick="javascript:jQuery('.visibility_container').hide(); jQuery('#<?php echo $my_tab; ?> ').show();jQuery('.nav-tab').removeClass('nav-tab-active');jQuery(this).addClass('nav-tab-active');"><img class="menuicons" src="<?php echo WPDEV_BK_PLUGIN_URL; ?> /img/<?php echo $my_icon; ?> "><?php if ($is_only_icons) { echo ' '; } else { echo $title; } ?> </a> <?php $title = __('Actions', 'wpdev-booking'); $my_icon = 'actionservices24x24.png'; $my_tab = 'actions'; $my_additinal_class = ''; ?> <?php if ($_REQUEST['tab'] == 'actions') { $slct_a = 'selected'; $selected_title = $title; $selected_icon = $my_icon; } else { $slct_a = ''; } ?> <a class="nav-tab <?php if ($slct_a == 'selected') { echo ' nav-tab-active '; } echo $my_additinal_class; ?> " title="<?php //echo __('Customization of booking form fields','wpdev-booking'); ?> " href="#" onclick="javascript:jQuery('.visibility_container').hide(); jQuery('#<?php echo $my_tab; ?> ').show();jQuery('.nav-tab').removeClass('nav-tab-active');jQuery(this).addClass('nav-tab-active');"><img class="menuicons" src="<?php echo WPDEV_BK_PLUGIN_URL; ?> /img/<?php echo $my_icon; ?> "><?php if ($is_only_icons) { echo ' '; } else { echo $title; } ?> </a> <?php $title = __('Help', 'wpdev-booking'); $my_icon = 'system-help22x22.png'; $my_tab = 'help'; $my_additinal_class = ' nav-tab-right '; ?> <?php $version = 'free'; $version = get_bk_version(); if (wpdev_bk_is_this_demo()) { $version = 'free'; } if (strpos(strtolower(WPDEV_BK_VERSION), 'multisite') !== false || $version == 'free') { $multiv = '-multi'; } else { $multiv = ''; } //$version = 'free'; $upgrade_lnk = ''; if ($version == 'personal') { $upgrade_lnk = "http://wpbookingcalendar.com/upgrade-p" . $multiv; } if ($version == 'biz_s') { $upgrade_lnk = "http://wpbookingcalendar.com/upgrade-s" . $multiv; } if ($version == 'biz_m') { $upgrade_lnk = "http://wpbookingcalendar.com/upgrade-m" . $multiv; } ?> <span class="dropdown pull-right"> <a href="#" data-toggle="dropdown" class="dropdown-toggle nav-tab "> <img class="menuicons" src="<?php echo WPDEV_BK_PLUGIN_URL; ?> /img/<?php echo $my_icon; ?> "> <?php echo $title; ?> <b class="caret" style="border-top-color: #333333 !important;"></b></a> <ul class="dropdown-menu" id="menu1" style="right:0px; left:auto;"> <li><a href="http://wpbookingcalendar.com/help/" target="_blank"><?php _e('Help', 'wpdev-booking'); ?> </a></li> <li><a href="http://wpbookingcalendar.com/faq/" target="_blank"><?php _e('FAQ', 'wpdev-booking'); ?> </a></li> <li><a href="http://wpbookingcalendar.com/support/" target="_blank"><?php _e('Technical Support', 'wpdev-booking'); ?> </a></li> <?php if ($version == 'free') { ?> <li class="divider"></li> <li><a href="http://wpbookingcalendar.com/buy/" target="_blank"><?php _e('Purchase', 'wpdev-booking'); ?> </a></li> <?php } else { if ($version != 'biz_l') { ?> <li class="divider"></li> <li><a href="<?php echo $upgrade_lnk; ?> " target="_blank"><?php _e('Upgrade', 'wpdev-booking'); ?> </a></li> <?php } } ?> </ul> </span> </div> </div> </div> <?php }
function wpdev_bk_upgrade_window($version) { if (!wpdev_bk_is_this_demo()) { ?> <div class='meta-box'> <div <?php $my_close_open_win_id = 'bk_general_settings_upgrade'; ?> id="<?php echo $my_close_open_win_id; ?> " class="gdrgrid postbox <?php //if ( '1' == get_user_option( 'booking_win_' . $my_close_open_win_id ) ) echo 'closed'; ?> " > <?php /*<div title="<?php _e('Click to toggle','wpdev-booking'); ?>" class="handlediv" onclick="javascript:verify_window_opening(<?php echo get_bk_current_user_id(); ?>, '<?php echo $my_close_open_win_id; ?>');"><br></div>*/ ?> <h3 class='hndle'><span><span>Upgrade to <?php if ($version == 'personal') { ?> Business Small /<?php } if (in_array($version, array('personal', 'biz_s'))) { ?> Business Medium /<?php } ?> Business Large</span></span></h3> <div class="inside"> <div style="width:100%;border:none; clear:both;margin:10px 0px;" id="bk_news_section"> <div id="bk_news"><span style="font-size:11px;text-align:center;">Loading...</span></div> <div id="ajax_bk_respond" style=""></div> <?php /* $response = wp_remote_post( OBC_CHECK_URL . 'info/', array() ); if (! ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) ) { $body_to_show = json_decode( wp_remote_retrieve_body( $response ) ); ?><!--style type="text/css" media="screen">#bk_news_loaded{display:block !important;}</style--><?php echo $body_to_show ; }*/ ?> <script type="text/javascript"> jQuery.ajax({ // Start Ajax Sending url: '<?php echo WPDEV_BK_PLUGIN_URL, '/', WPDEV_BK_PLUGIN_FILENAME; ?> ' , type:'POST', success: function (data, textStatus){if( textStatus == 'success') jQuery('#ajax_bk_respond').html( data );}, error:function (XMLHttpRequest, textStatus, errorThrown){window.status = 'Ajax sending Error status:'+ textStatus; }, data:{ ajax_action : 'CHECK_BK_FEATURES', wpbc_nonce: document.getElementById('wpbc_admin_panel_nonce').value } }); </script> </div> <?php if (strpos(strtolower(WPDEV_BK_VERSION), 'multisite') !== false) { $multiv = '-multi'; } else { if (strpos(strtolower(WPDEV_BK_VERSION), 'develop') !== false) { $multiv = '-develop'; } else { $multiv = ''; } } ?> <p style="line-height:25px;text-align:center;padding-top:15px;" class="wpdevbk"> <?php if ($version == 'personal') { ?> <a href="http://wpbookingcalendar.com/upgrade-pro<?php echo $multiv; ?> /" target="_blank" class="btn">Upgrade</a> <?php } elseif ($version == 'biz_s') { ?> <a href="http://wpbookingcalendar.com/upgrade-premium<?php echo $multiv; ?> /" target="_blank" class="btn">Upgrade</a> <?php } elseif ($version == 'biz_m') { ?> <a href="http://wpbookingcalendar.com/upgrade-premium-plus<?php echo $multiv; ?> /" target="_blank" class="btn">Upgrade</a> <?php } ?> </p> </div> </div> </div> <?php } }
public function welcome() { $booking_activation_process = get_bk_option('booking_activation_process'); if ($booking_activation_process == 'On') { return; } // Bail if no activation redirect transient is set if (!get_transient('_wpbc_activation_redirect')) { return; } // Delete the redirect transient delete_transient('_wpbc_activation_redirect'); // Bail if DEMO or activating from network, or bulk, or within an iFrame if (wpdev_bk_is_this_demo() || is_network_admin() || isset($_GET['activate-multi']) || defined('IFRAME_REQUEST')) { return; } wp_safe_redirect(admin_url('index.php?page=wpbc-about')); exit; }
function wpdev_bk_upgrade_window($version) { if (!wpdev_bk_is_this_demo()) { ?> <div class='meta-box'> <div <?php $my_close_open_win_id = 'bk_general_settings_upgrade'; ?> id="<?php echo $my_close_open_win_id; ?> " class="gdrgrid postbox <?php //if ( '1' == get_user_option( 'booking_win_' . $my_close_open_win_id ) ) echo 'closed'; ?> " > <?php /*<div title="<?php _e('Click to toggle' ,'booking'); ?>" class="handlediv" onclick="javascript:verify_window_opening(<?php echo get_bk_current_user_id(); ?>, '<?php echo $my_close_open_win_id; ?>');"><br></div>*/ ?> <h3 class='hndle'><span><span><?php echo 'Upgrade to '; if ($version == 'personal') { echo 'Business Small /'; } if (in_array($version, array('personal', 'biz_s'))) { echo 'Business Medium /'; } if (in_array($version, array('personal', 'biz_s', 'biz_m'))) { echo 'Business Large /'; } echo ' MultiUser'; ?> </span></span></h3> <div class="inside"> <div style="width:100%;border:none; clear:both;margin:10px 0px;" id="bk_news_section"> <div id="bk_news"><span style="font-size:11px;text-align:center;">Loading...</span></div> <div id="ajax_bk_respond" style="display:none;"></div> <?php /* $response = wp_remote_post( OBC_CHECK_URL . 'info/', array() ); if (! ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) ) { $body_to_show = json_decode( wp_remote_retrieve_body( $response ) ); ?><!--style type="text/css" media="screen">#bk_news_loaded{display:block !important;}</style--><?php echo $body_to_show ; }*/ ?> <script type="text/javascript"> jQuery.ajax({ // Start Ajax Sending // url: '<?php echo WPDEV_BK_PLUGIN_URL, '/', WPDEV_BK_PLUGIN_FILENAME; ?> ' , url: '<?php echo admin_url('admin-ajax.php'); ?> ', type:'POST', success: function (data, textStatus){if( textStatus == 'success') jQuery('#ajax_bk_respond').html( data );}, error:function (XMLHttpRequest, textStatus, errorThrown){window.status = 'Ajax sending Error status:'+ textStatus; }, data:{ // ajax_action : 'CHECK_BK_FEATURES', action : 'CHECK_BK_FEATURES', wpbc_nonce: document.getElementById('wpbc_admin_panel_nonce').value } }); </script> </div> <p style="line-height:25px;text-align:center;padding-top:15px;" class="wpdevbk"> <a class="button button-primary" style="font-size: 1.1em;font-weight: bold;height: 2.5em;line-height: 1.1em;padding: 8px 25px;" href="<?php echo wpbc_up_link(); ?> " target="_blank"><?php if (wpbc_get_ver_sufix() == '') { _e('Purchase', 'booking'); } else { _e('Upgrade Now', 'booking'); } ?> </a> </p> </div> </div> </div> <?php } }
function wpbc_gcal_settings_content() { $booking_gcal_feed = get_bk_option('booking_gcal_feed'); $booking_gcal_events_from = get_bk_option('booking_gcal_events_from'); $booking_gcal_events_from_offset = get_bk_option('booking_gcal_events_from_offset'); $booking_gcal_events_from_offset_type = get_bk_option('booking_gcal_events_from_offset_type'); $booking_gcal_events_until = get_bk_option('booking_gcal_events_until'); $booking_gcal_events_until_offset = get_bk_option('booking_gcal_events_until_offset'); $booking_gcal_events_until_offset_type = get_bk_option('booking_gcal_events_until_offset_type'); $booking_gcal_events_max = get_bk_option('booking_gcal_events_max'); $booking_gcal_api_key = get_bk_option('booking_gcal_api_key'); $booking_gcal_timezone = get_bk_option('booking_gcal_timezone'); $booking_gcal_is_send_email = get_bk_option('booking_gcal_is_send_email'); $booking_gcal_auto_import_is_active = get_bk_option('booking_gcal_auto_import_is_active'); $booking_gcal_auto_import_time = get_bk_option('booking_gcal_auto_import_time'); $booking_gcal_events_form_fields = get_bk_option('booking_gcal_events_form_fields'); if (is_serialized($booking_gcal_events_form_fields)) { $booking_gcal_events_form_fields = unserialize($booking_gcal_events_form_fields); } ?> <div class='meta-box' style=""> <div <?php $my_close_open_win_id = 'bk_settings_gcal_sync_form_fields'; ?> id="<?php echo $my_close_open_win_id; ?> " class="postbox <?php if ('1' == get_user_option('booking_win_' . $my_close_open_win_id)) { echo 'closed'; } ?> " > <div title="<?php _e('Click to toggle', 'booking'); ?> " class="handlediv" onclick="javascript:verify_window_opening(<?php echo get_bk_current_user_id(); ?> , '<?php echo $my_close_open_win_id; ?> ');"><br></div> <h3 class='hndle'><span><?php _e('Assign events fields to specific booking form field', 'booking'); ?> </span></h3> <div class="inside" style="margin:0px;"> <table class="visibility_gcal_feeds_settings form-table settings-table"> <tbody> <?php wpbc_gcal_settings_content_form_fields($booking_gcal_events_form_fields); ?> </tbody> </table> </div> </div> </div> <?php $is_can = apply_bk_filter('multiuser_is_user_can_be_here', true, 'only_super_admin'); if ($is_can) { ?> <div class='meta-box' style=""> <div <?php $my_close_open_win_id = 'bk_settings_gcal_sync_auto_import'; ?> id="<?php echo $my_close_open_win_id; ?> " class="postbox <?php if ('1' == get_user_option('booking_win_' . $my_close_open_win_id)) { echo 'closed'; } ?> " > <div title="<?php _e('Click to toggle', 'booking'); ?> " class="handlediv" onclick="javascript:verify_window_opening(<?php echo get_bk_current_user_id(); ?> , '<?php echo $my_close_open_win_id; ?> ');"><br></div> <h3 class='hndle'><span><?php _e('Auto import events', 'booking'); ?> </span></h3> <div class="inside" style="margin:0px;"> <table class="visibility_gcal_feeds_settings form-table settings-table"> <tbody> <?php wpbc_gcal_settings_content_field_auto_import($booking_gcal_auto_import_is_active, $booking_gcal_auto_import_time); ?> </tbody> </table> </div> </div> </div> <?php } ?> <div class='meta-box' style=""> <div <?php $my_close_open_win_id = 'bk_settings_gcal_sync'; ?> id="<?php echo $my_close_open_win_id; ?> " class="postbox <?php if ('1' == get_user_option('booking_win_' . $my_close_open_win_id)) { echo 'closed'; } ?> " > <div title="<?php _e('Click to toggle', 'booking'); ?> " class="handlediv" onclick="javascript:verify_window_opening(<?php echo get_bk_current_user_id(); ?> , '<?php echo $my_close_open_win_id; ?> ');"><br></div> <h3 class='hndle'><span><?php _e('Google Calendar - General Settings', 'booking'); ?> </span></h3> <div class="inside" style="margin:0px;"> <table class="visibility_gcal_feeds_settings form-table settings-table"> <tbody> <?php wpbc_gcal_settings_content_api_key($booking_gcal_api_key); wpbc_gcal_settings_content_field_timezone($booking_gcal_timezone); /* ?> <tr valign="top"> <th scope="row"><?php _e('Send emails' ,'booking'); ?>:</th> <td> <fieldset> <label for="booking_gcal_is_send_email" > <input <?php if ($booking_gcal_is_send_email == 'On') echo "checked"; ?> value="<?php echo $booking_gcal_is_send_email; ?>" name="booking_gcal_is_send_email" id="booking_gcal_is_send_email" type="checkbox" /> <?php printf(__('Check this box to %ssend emails about creation new bookings%s after events requesting.' ,'booking'),'<b>','</b>');?> </label> </fieldset> </td> </tr> <?php /**/ ?> <tr valign="top"> <td colspan="2"><hr/> <p class="description" style="text-align:right;"><strong><?php _e('Default settings for retrieving events', 'booking'); ?> </strong></p> </td> </tr> <?php wpbc_gcal_settings_content_field_max_feeds($booking_gcal_events_max); wpbc_gcal_settings_content_field_from($booking_gcal_events_from, $booking_gcal_events_from_offset, $booking_gcal_events_from_offset_type); wpbc_gcal_settings_content_field_until($booking_gcal_events_until, $booking_gcal_events_until_offset, $booking_gcal_events_until_offset_type); ?> <tr valign="top"><td colspan="2" style=""><hr/></td></tr> <?php if (!class_exists('wpdev_bk_personal')) { ?> <tr valign="top"> <th scope="row"><label for="booking_gcal_feed" ><?php _e('Google Calendar ID', 'booking'); ?> :</label></th> <td class="wpdevbk"> <div class="control-group"> <div class="inline controls"> <!-- <div class="input-prepend">--> <!-- <span class="add-on" style="float:left!important;box-sizing: content-box;font-size: 14px;padding:9px 0;" > https://www.google.com </span>--> <input style="box-sizing: content-box;font-size: 14px;width: 50%;" id="booking_gcal_feed" name="booking_gcal_feed" type="text" value="<?php echo $booking_gcal_feed; ?> " /> <!-- placeholder="calendar/feeds/your-email@group.calendar.google.com/public/basic"--> <!-- </div>--> </div> </div> <p class="description"><?php ?> </p> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <div class='meta-box' style=""> <div <?php $my_close_open_win_id = 'bk_settings_gcal_sync_help'; ?> id="<?php echo $my_close_open_win_id; ?> " class="postbox <?php if ('1' == get_user_option('booking_win_' . $my_close_open_win_id)) { echo 'closed'; } ?> " > <div title="<?php _e('Click to toggle', 'booking'); ?> " class="handlediv" onclick="javascript:verify_window_opening(<?php echo get_bk_current_user_id(); ?> , '<?php echo $my_close_open_win_id; ?> ');"><br></div> <h3 class='hndle'><span><?php _e('Google Calendar - Help Info', 'booking'); ?> </span></h3> <div class="inside" style="margin:0px;"> <div class="wpbc-help-message" style="margin-top:10px;"> <table class="resource_table booking_table" style="border:none !important;background: none !important;box-shadow: 0 0 0 #fff !important;"> <tbody> <tr> <td style="vertical-align: top;border:none;"> <h4>01. <?php _e('To get Google Calendar API key please follow this instruction', 'booking'); ?> :</h4> <ol style="list-style-type: decimal !important;margin-left: 20px;"> <li><?php printf(__('Go to Google Developer Console: %s.', 'booking'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>'); ?> </li> <li><?php printf(__('Give your project a name and click "Create".', 'booking')); ?> </li> <li><?php printf(__('In the sidebar click on "APIs & auth".', 'booking')); ?> </li> <li><?php printf(__('Click APIs and make sure "Calendar API" is set to ON.', 'booking')); ?> </li> <li><?php printf(__('Now click on "Credentials" in the sidebar.', 'booking')); ?> </li> <li><?php printf(__('Under the section "Public API access" click the button "Create new Key".', 'booking')); ?> </li> <li><?php printf(__('On the popup click the button "Server Key" and click "Create".', 'booking')); ?> </li> <li><?php printf(__('You will now see a table loaded with the top item being the API Key. Copy this and paste it into %sGoogle API Key%s field at this page.', 'booking'), '<strong>', '</strong>'); ?> </li> </ol> </td> <td style="vertical-align: top;border:none;"> <h4>02. <?php _e('Set Your Calendar to Public', 'booking'); ?> :</h4> <ol style="list-style-type: decimal !important;margin-left: 20px;"> <li><?php printf(__('Navigate to your Google calendars.', 'booking'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>'); ?> </li> <li><?php printf(__('Open the settings for the calendar.', 'booking')); ?> </li> <li><?php printf(__('Click the "Share this Calendar" link.', 'booking')); ?> </li> <li><?php printf(__('Click the checkbox to make calendar public. Do not check the other option.', 'booking')); ?> </li> </ol> <h4>03. <?php _e('Find Your Calendar ID', 'booking'); ?> :</h4> <ol style="list-style-type: decimal !important;margin-left: 20px;"> <li><?php printf(__('Navigate to your Google calendars.', 'booking'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>'); ?> </li> <li><?php printf(__('Open the settings for the calendar.', 'booking')); ?> </li> <li><?php printf(__('Now copy the Calendar ID to use in the plugin settings in your WordPress admin. Make sure to %suse the Calendar ID only, not the entire XML feed URL%s.', 'booking'), '<strong>', '</strong>'); ?> </li> </ol> </td> </tr> </tbody> </table> </div> </div> </div> </div> <?php if (wpdev_bk_is_this_demo()) { ?> <div class="wpbc-error-message" style="text-align:left;"> <span class="wpbc-demo-alert-not-allow"><strong>Warning!</strong> Demo test version does not allow changes to these items.</span></div> <?php } ?> <?php make_bk_action('wpbc_gcal_settings_content_show_booking_resources_table'); }
public function welcome() { $booking_activation_process = get_bk_option('booking_activation_process'); if ($booking_activation_process == 'On') { return; } // Bail if no activation redirect transient is set if (!get_transient('_wpbc_activation_redirect')) { return; } // Delete the redirect transient delete_transient('_wpbc_activation_redirect'); // Bail if DEMO or activating from network, or bulk, or within an iFrame if (wpdev_bk_is_this_demo() || is_network_admin() || isset($_GET['activate-multi']) || defined('IFRAME_REQUEST')) { return; } // Set mark, that we already redirected to About screen //FixIn: 5.4.5 $redirect_for_version = get_bk_option('booking_activation_redirect_for_version'); if ($redirect_for_version == WP_BK_VERSION_NUM) { return; } else { update_bk_option('booking_activation_redirect_for_version', WP_BK_VERSION_NUM); } wp_safe_redirect(admin_url('index.php?page=wpbc-about')); exit; }
function wpdevbk_show_help_dropdown_menu_in_top_menu_line() { $title = __('Help', 'wpdev-booking'); $my_icon = 'system-help22x22.png'; $my_tab = 'help'; $my_additinal_class = ' nav-tab-right '; ?> <?php $version = 'free'; $version = get_bk_version(); if (wpdev_bk_is_this_demo()) { $version = 'free'; } if (strpos(strtolower(WPDEV_BK_VERSION), 'multisite') !== false || $version == 'free') { $multiv = '-multi'; } else { $multiv = ''; } //$version = 'free'; $upgrade_lnk = ''; if ($version == 'personal') { $upgrade_lnk = "http://wpbookingcalendar.com/upgrade-p" . $multiv; } if ($version == 'biz_s') { $upgrade_lnk = "http://wpbookingcalendar.com/upgrade-s" . $multiv; } if ($version == 'biz_m') { $upgrade_lnk = "http://wpbookingcalendar.com/upgrade-m" . $multiv; } ?> <span class="dropdown pull-right"> <a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle nav-tab " ><i class="icon-question-sign"></i> <?php /** ?><img class="menuicons" src="<?php echo WPDEV_BK_PLUGIN_URL; ?>/img/<?php echo $my_icon; ?>"><?php /**/ echo $title; ?> <b class="caret" style="border-top-color: #333333 !important;"></b></a> <ul class="dropdown-menu" id="menu1" style="right:0px; left:auto;"> <li><a href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'wpbc-about'), 'index.php'))); ?> "><?php _e('About Booking Calendar', 'wpdev-booking'); ?> </a></li> <li class="divider"></li> <li><a href="http://wpbookingcalendar.com/help/" target="_blank"><?php _e('Help', 'wpdev-booking'); ?> </a></li> <li><a href="http://wpbookingcalendar.com/faq/" target="_blank"><?php _e('FAQ', 'wpdev-booking'); ?> </a></li> <li><a href="http://wpbookingcalendar.com/support/" target="_blank"><?php _e('Technical Support', 'wpdev-booking'); ?> </a></li> <?php if ($version == 'free') { ?> <li class="divider"></li> <li><a href="http://wpbookingcalendar.com/buy/" target="_blank"><?php _e('Purchase', 'wpdev-booking'); ?> </a></li> <?php } else { if ($version != 'biz_l') { ?> <li class="divider"></li> <li><a href="<?php echo $upgrade_lnk; ?> " target="_blank"><?php _e('Upgrade', 'wpdev-booking'); ?> </a></li> <?php } } ?> </ul> </span> <?php }