admin_url( 'admin-ajax.php' ), 'i18n_confirm_appt_delete' => __('Are you sure you want to cancel this appointment?','booked-frontend-agents'), 'i18n_confirm_appt_approve' => __('Are you sure you want to approve this appointment?','booked-frontend-agents') ); wp_localize_script( 'booked-fea-js', 'booked_fea_vars', $booked_fea_vars ); wp_enqueue_script('booked-fea-js'); } public function booked_fea_tabs($custom_tabs){ $custom_tabs = array( 'fea_appointments' => array( 'title' => __('Upcoming Appointments','booked-frontend-agents'), 'booked-icon' => 'booked-icon-calendar', 'class' => false ), 'fea_pending' => array( 'title' => __('Pending Appointments','booked-frontend-agents') . '
', 'booked-icon' => 'booked-icon-clock', 'class' => false ), 'fea_history' => array( 'title' => __('Appointment History','booked-frontend-agents'), 'booked-icon' => 'booked-icon-calendar', 'class' => false ), 'edit' => array( 'title' => __('Edit Profile','booked-frontend-agents'), 'booked-icon' => 'booked-icon-pencil', 'class' => 'edit-button' ) ); return $custom_tabs; } } } add_action('plugins_loaded','init_bookedfea'); } else { // Show notice when Booked is not active add_action('admin_notices', 'bookedfea_required_plugins_notice'); } function init_bookedfea(){ if(class_exists('BookedFEA_Plugin')) { $bookedfea_plugin = new BookedFEA_Plugin(); } } function bookedfea_required_plugins_notice() { echo '
'; echo sprintf( __('In order to use the %s plugin, you need to have %s installed and active.'), 'Booked Front-End Agents', 'Booked' ); echo '
'; } // Localization function booked_fea_local_init(){ $domain = 'booked-frontend-agents'; $locale = apply_filters('plugin_locale', get_locale(), $domain); load_textdomain($domain, WP_LANG_DIR.'/plugins/'.$domain.'/'.$domain.'-'.$locale.'.mo'); load_plugin_textdomain($domain, FALSE, dirname(plugin_basename(__FILE__)).'/languages/'); } add_action('after_setup_theme', 'booked_fea_local_init');