\n\n"); define('CP_APPBOOK_DEFAULT_cu_enable_copy_to_user', 'true'); define('CP_APPBOOK_DEFAULT_cu_user_email_field', ''); define('CP_APPBOOK_DEFAULT_cu_subject', 'Confirmation: Message received...'); define('CP_APPBOOK_DEFAULT_cu_message', "Thank you for your message. We will reply you as soon as possible.\n\nThis is a copy of the data sent:\n\n<%INFO%>\n\nBest Regards."); define('CP_APPBOOK_DEFAULT_email_format','text'); define('CP_APPBOOK_DEFAULT_vs_use_validation', 'true'); define('CP_APPBOOK_DEFAULT_vs_text_is_required', 'This field is required.'); define('CP_APPBOOK_DEFAULT_vs_text_is_email', 'Please enter a valid email address.'); define('CP_APPBOOK_DEFAULT_vs_text_datemmddyyyy', 'Please enter a valid date with this format(mm/dd/yyyy)'); define('CP_APPBOOK_DEFAULT_vs_text_dateddmmyyyy', 'Please enter a valid date with this format(dd/mm/yyyy)'); define('CP_APPBOOK_DEFAULT_vs_text_number', 'Please enter a valid number.'); define('CP_APPBOOK_DEFAULT_vs_text_digits', 'Please enter only digits.'); define('CP_APPBOOK_DEFAULT_vs_text_max', 'Please enter a value less than or equal to {0}.'); define('CP_APPBOOK_DEFAULT_vs_text_min', 'Please enter a value greater than or equal to {0}.'); define('CP_APPBOOK_DEFAULT_cv_enable_captcha', 'true'); define('CP_APPBOOK_DEFAULT_cv_width', '180'); define('CP_APPBOOK_DEFAULT_cv_height', '60'); define('CP_APPBOOK_DEFAULT_cv_chars', '5'); define('CP_APPBOOK_DEFAULT_cv_font', 'font-1.ttf'); define('CP_APPBOOK_DEFAULT_cv_min_font_size', '25'); define('CP_APPBOOK_DEFAULT_cv_max_font_size', '35'); define('CP_APPBOOK_DEFAULT_cv_noise', '200'); define('CP_APPBOOK_DEFAULT_cv_noise_length', '4'); define('CP_APPBOOK_DEFAULT_cv_background', 'ffffff'); define('CP_APPBOOK_DEFAULT_cv_border', '000000'); define('CP_APPBOOK_DEFAULT_cv_text_enter_valid_captcha', 'Please enter a valid captcha code.'); define('CP_APPBOOK_REP_ARR', '[+arr1237]'); // loading add-ons // ----------------------------------------- global $cpappb_addons_active_list, // List of addon IDs $cpappb_addons_objs_list; // List of addon objects $cpappb_addons_active_list = array(); $cpappb_addons_objs_list = array(); function cpappb_loading_add_ons() { global $cpappb_addons_active_list, // List of addon IDs $cpappb_addons_objs_list; // List of addon objects // Get the list of active addons $cpappb_addons_active_list = get_option( 'cpappb_addons_active_list', array() ); if( !empty( $cpappb_addons_active_list ) || ( isset( $_GET["page"] ) && $_GET["page"] == "cp_apphourbooking" ) ) { $path = dirname( __FILE__ ).'/addons'; if( file_exists( $path ) ) { $addons = dir( $path ); while( false !== ( $entry = $addons->read() ) ) { if( strlen( $entry ) > 3 && strtolower( pathinfo( $entry, PATHINFO_EXTENSION) ) == 'php' ) { require_once $addons->path.'/'.$entry; } } } } } cpappb_loading_add_ons(); /* initialization / install */ include_once dirname( __FILE__ ) . '/classes/cp-base-class.inc.php'; include_once dirname( __FILE__ ) . '/cp-main-class.inc.php'; include_once dirname( __FILE__ ) . '/cp-data-source.inc.php'; $cp_appb_plugin = new CP_AppBookingPlugin; register_activation_hook(__FILE__, array($cp_appb_plugin,'install') ); add_action( 'media_buttons', array($cp_appb_plugin, 'insert_button'), 11); add_action( 'init', array($cp_appb_plugin, 'data_management')); if( class_exists( 'CP_AppBookingPlugin_Widget' ) ) add_action( 'widgets_init', create_function('', 'return register_widget("CP_AppBookingPlugin_Widget");') ); function cpappb_plugin_init() { load_plugin_textdomain( 'cpappb', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } add_action('plugins_loaded', 'cpappb_plugin_init'); if ( is_admin() ) { add_action('admin_enqueue_scripts', array($cp_appb_plugin,'insert_adminScripts'), 1); add_filter("plugin_action_links_".plugin_basename(__FILE__), array($cp_appb_plugin,'plugin_page_links')); add_action('admin_menu', array($cp_appb_plugin,'admin_menu') ); } else { add_shortcode( $cp_appb_plugin->shorttag, array($cp_appb_plugin, 'filter_content') ); add_shortcode( 'CP_APP_HOUR_BOOKING_LIST', array($cp_appb_plugin, 'filter_list') ); } ?>