function __construct() { parent::__construct(); global $_on_admin; $_on_admin = true; epl_log('init', get_class() . " initialized"); global $epl_fields; $this->epl->load_config('regis-fields'); $this->epl_fields = $epl_fields; //this is a multi-dimensional array of all the fields $this->ind_fields = $this->epl_util->combine_array_keys($this->epl_fields); //this is each individualt field array $this->erm = $this->epl->load_model('epl-registration-model'); $this->rm = $this->epl->load_model('epl-regis-admin-model'); $this->ecm = $this->epl->load_model('epl-common-model'); if (isset($_REQUEST['epl_download_trigger']) || $GLOBALS['epl_ajax']) { $this->run(); } else { add_action('default_title', array($this, 'pre')); add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); //post list manage screen columns - extra columns add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns')); //post list manage screen - column data add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2); } }
function __construct() { parent::__construct(); epl_log('init', get_class() . " initialized", 1); $this->epl->load_config('gateway-fields'); $this->ecm = $this->epl->load_model('epl-common-model'); global $epl_fields; $this->pricing_type = 0; $this->epl_fields = apply_filters('epl_pay_profile_manager_fields', $epl_fields); $post_ID = ''; if (isset($_GET['post'])) { $post_ID = $_GET['post']; } elseif (isset($_POST['post_ID'])) { $post_ID = $_POST['post_ID']; } $this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID); $this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST); if (isset($_REQUEST['epl_ajax']) && $_REQUEST['epl_ajax'] == 1) { $this->run(); } else { //add_action( 'default_title', array( $this, 'pre' ) ); add_action('admin_init', array($this, 'init')); add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns')); add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2); } }
function __construct() { parent::__construct(); epl_log('init', get_class() . " initialized", 1); $this->epl->load_config('location-fields'); $this->ecm = $this->epl->load_model('epl-common-model'); global $epl_fields; $this->pricing_type = 0; $this->epl_fields = $epl_fields; //this is a multi-dimensional array of all the fields $this->ind_fields = $this->epl_util->combine_array_keys($this->epl_fields); //this is each individualt field array $post_ID = ''; if (isset($_GET['post'])) { $post_ID = $_GET['post']; } elseif (isset($_POST['post_ID'])) { $post_ID = $_POST['post_ID']; } $this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID); $this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST); add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); //post list manage screen columns - extra columns add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns')); //post list manage screen - column data add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2); if (isset($_REQUEST['epl_ajax']) && $_REQUEST['epl_ajax'] == 1) { $this->run(); } }
function __construct() { parent::__construct(); epl_log('init', get_class() . " initialized", 1); $this->epl->load_config('org-fields'); $this->ecm = $this->epl->load_model('epl-common-model'); global $epl_fields; $this->pricing_type = 0; $this->epl_fields = $epl_fields; $post_ID = ''; if (isset($_GET['post'])) { $post_ID = $_GET['post']; } elseif (isset($_POST['post_ID'])) { $post_ID = $_POST['post_ID']; } $this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID); $this->edit_mode = isset($_POST['post_action']) && $_REQUEST['post_action'] == 'edit' || isset($_GET['action']) && $_GET['action'] == 'edit'; if (isset($_REQUEST['epl_ajax']) && $_REQUEST['epl_ajax'] == 1) { $this->run(); } else { add_action('default_title', array($this, 'pre')); add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); //post list manage screen columns - extra columns add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns')); //post list manage screen - column data add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2); } }
function __construct() { parent::__construct(); epl_log('init', get_class()); $this->epl->load_config('notification-fields'); global $epl_fields; $this->ecm = $this->epl->load_model('epl-common-model'); $this->epl_fields = $epl_fields; $this->ind_fields = $this->epl_util->combine_array_keys($this->epl_fields); //this is each individualt field array $post_ID = ''; if (isset($_GET['post'])) { $post_ID = $_GET['post']; } elseif (isset($_POST['post_ID'])) { $post_ID = $_POST['post_ID']; } $this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID, $this->epl_fields); $this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST); add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); //post list manage screen columns - extra columns add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns')); //post list manage screen - column data add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2); //add_action('init', array( &$this, 'run' )); //$this->m = $this->load_model( 'admin/epl-manage-events-model' ); }
function __construct() { parent::__construct(); epl_log('init', get_class() . " initialized", 1); $this->epl->load_config('global-discount-fields'); $this->ecm = $this->epl->load_model('epl-common-model'); global $epl_fields; $this->fields = $epl_fields; //$this->epl_fields = $this->epl_util->combine_array_keys( $this->fields ); $this->epl_fields = $epl_fields; $post_ID = ''; if (isset($_GET['post'])) { $post_ID = $_GET['post']; } elseif (isset($_POST['post_ID'])) { $post_ID = $_POST['post_ID']; } $this->data['values'] = $this->ecm->get_post_meta_all((int) $post_ID, false, true); $this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST); if (isset($_REQUEST['epl_ajax']) && $_REQUEST['epl_ajax'] == 1) { $this->run(); } else { add_action('default_title', array($this, 'pre')); add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); add_filter('manage_edit-' . self::post_type . '_columns', array($this, 'add_new_columns')); add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2); } }
function __construct() { parent::__construct(); epl_log('init', get_class() . " initialized"); global $ecm; //$ecm = & $this; self::$instance = $this; }
function __construct() { parent::__construct(); epl_log('init', get_class() . ' initialized.', 1); $this->dates = array(); $this->values = null; $this->hide_past = true; }
function __construct() { parent::__construct(); epl_log('init', get_class() . " initialized"); global $ecm; //$ecm = & $this; //$this->erm = $this->epl->load_model('epl-registration-model'); self::$instance = $this; }
function __construct() { parent::__construct(); epl_log('init', get_class() . " initialized"); $this->pricing_type = 0; $this->data['values'] = array(); $this->ecm = $this->epl->load_model('epl-common-model'); $this->erm = $this->epl->load_model('epl-registration-model'); $this->erptm = $this->epl->load_model('epl-report-model'); $post_ID = ''; if (isset($_GET['post'])) { $post_ID = $_GET['post']; } elseif (isset($_POST['post_ID'])) { $post_ID = $_POST['post_ID']; } $this->edit_mode = isset($_POST['post_action']) && $_REQUEST['post_action'] == 'edit' || isset($_GET['action']) && $_GET['action'] == 'edit'; //if ( $this->edit_mode ) { if ($post_ID != '') { $this->data['values'] = $this->ecm->setup_event_details((int) $post_ID, false, true); $this->event_id = $post_ID; } global $epl_fields; $this->pass_to_all_views = array('event_id' => $post_ID); $this->epl->load_config('event-fields'); $this->epl->load_config('form-fields'); $this->fields = $epl_fields; $this->override_data = get_option('_epl_override'); $this->epl_fields = $this->epl_util->combine_array_keys($this->fields); if (isset($_REQUEST['epl_download_trigger']) || $GLOBALS['epl_ajax']) { $this->run(); } elseif (epl_get_element('page', $_GET) == 'epl_event_manager') { add_action('admin_notices', array($this, 'manage_events_2')); } else { $this->erm->event_snapshot($post_ID); add_action('default_title', array($this, 'pre')); //add_filter( 'enter_title_here', array( $this, 'pre' ) ); add_action('add_meta_boxes', array($this, 'epl_add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); //post list manage screen columns - extra columns add_filter('manage_edit-epl_event_columns', array($this, 'add_new_epl_columns')); //post list manage screen - column data add_action('manage_epl_event_posts_custom_column', array($this, 'epl_column_data'), 10, 2); //sorting add_filter('manage_edit-epl_event_sortable_columns', array($this, 'add_new_epl_columns'), 10); add_filter('post_row_actions', array($this, 'add_post_row_action'), 10, 2); //adjust list manage screen - table header widths add_action('admin_head', array($this, 'admin_table_header')); //add category dropdown to list manage screen add_action('restrict_manage_posts', array($this, 'restrict_events_by_category'), 10, 2); add_filter('parse_query', array($this, 'convert_restrict_events')); add_filter('request', array($this, 'event_column_order_by')); add_action('admin_init', array($this, 'admin_init')); add_action('load-edit.php', array($this, 'trashed_redirect')); } }
function save_postdata($post_ID) { if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE || empty($_POST)) { return; } $pay_type = esc_attr($_POST['_epl_pay_type']); epl_log("debug", "<pre>PAY TYPE" . print_r($pay_type, true) . "</pre>"); epl_log("debug", "<pre>POST" . print_r($_POST, true) . "</pre>"); epl_log("debug", "<pre>FIELDS" . print_r($this->epl_fields[$pay_type . '_fields'], true) . "</pre>"); $this->ecm->_save_postdata(array('post_ID' => $post_ID, 'fields' => $this->epl_fields[$pay_type . '_fields'], 'edit_mode' => true)); }
function __construct() { global $_on_admin, $current_step; $_on_admin = false; parent::__construct(); epl_log('init', get_class() . " initialized"); $this->rm = $this->epl->load_model('epl-registration-model'); $this->ecm = $this->epl->load_model('epl-common-model'); if (isset($_REQUEST['epl_action'])) { $this->run(); } //add_filter( 'the_title', array( $this, '__return_empty_string' ) ); }
/** * Autoload system, custom libraries, and helpers * * @param none * @return object|$this->object name */ function load_components() { global $libraries, $helpers; epl_log('init', get_class() . " components loaded", 1); if (count($libraries) > 0) { foreach ($libraries as $library) { $lib = strtolower(str_replace("-", "_", $library)); $this->{$lib} = $this->load_library($library); } } if (count($helpers) > 0) { foreach ($helpers as $k => $v) { $this->load_helper($v); } } }
function __construct() { parent::__construct(); $this->epl->load_config('form-fields'); global $epl_fields; $this->fields = $epl_fields; epl_log('init', get_class() . " initialized"); $this->ecm = $this->epl->load_model('epl-common-model'); $this->d['epl_fields'] = $this->ecm->_get_fields('epl_fields'); $this->d['epl_forms'] = $this->ecm->_get_fields('epl_forms'); epl_log("debug", "<pre>" . print_r($this->d['epl_fields'], true) . "</pre>"); if (isset($_REQUEST['epl_ajax']) && $_REQUEST['epl_ajax'] == 1) { $this->run(); } else { add_action('admin_notices', array($this, 'forms_manager_page')); } }
function update($new_instance, $old_instance) { epl_log("debug", "<pre>" . __LINE__ . '> ' . print_r($new_instance, true) . "</pre>"); $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['title_url'] = strip_tags($new_instance['title_url']); $instance['css_class'] = strip_tags($new_instance['css_class']); $instance['num_events_to_show'] = strip_tags($new_instance['num_events_to_show']); $instance['exclude_event_ids'] = strip_tags($new_instance['exclude_event_ids']); $instance['enable_tooltip'] = strip_tags($new_instance['enable_tooltip']); $instance['template'] = strip_tags($new_instance['template']); $instance['thumbnail_size'] = strip_tags($new_instance['thumbnail_size']); $instance['class_display_type'] = strip_tags($new_instance['class_display_type']); $instance['content_to_show'] = strip_tags($new_instance['content_to_show']); $instance['num_words_to_show'] = strip_tags($new_instance['num_words_to_show']); $instance['days_to_show'] = strip_tags($new_instance['days_to_show']); $instance['tax_filter'] = $new_instance['tax_filter']; return $instance; }
function __construct() { epl_log('init', get_class() . ' initialized'); $GLOBALS['epl_ajax'] = false; if (isset($_POST['epl_ajax']) && $_POST['epl_ajax'] == 1) { $GLOBALS['epl_ajax'] = true; if (!defined('EPL_AJAX')) { define("EPL_AJAX", 1); } } global $epl_is_single; $epl_is_single = 0; /* $this->uri_components = array( ); $this->uri_components = parse_url( $_SERVER['REQUEST_URI'] ); if ( array_key_exists( 'query', $this->uri_components ) ) parse_str( $this->uri_components['query'], $this->uri_segments ); */ }
/** * Depending on the uri parameters, this function determines which controller to load. * * @since 1.0.0 * @param none * @return Only when called from the front end, returns short code process result. */ function _route($resource = null) { epl_log("init", "<pre>" . print_r($resource, true) . "</pre>"); if (self::$routed) { return; } epl_log("init", "<pre>" . print_r($resource, true) . "</pre>"); global $valid_controllers, $post; //When the shortcode is processed, the page id is ready if (!array_key_exists($resource, $valid_controllers)) { return false; } $epl = EPL_Base::get_instance(); $controller_location = $valid_controllers[$resource]['location']; $controller = $epl->load_controller($controller_location); self::$routed = true; if (!EPL_IS_ADMIN && !isset($_REQUEST['epl_action'])) { return $controller->run(); //doing this for the shortcode } }
function __construct() { parent::__construct(); global $epl_on_admin; $epl_on_admin = true; epl_log('init', get_class() . " initialized"); global $epl_fields; $this->epl->load_config('regis-fields'); $this->epl_fields = $epl_fields; //this is a multi-dimensional array of all the fields $this->ind_fields = $this->epl_util->combine_array_keys($this->epl_fields); //this is each individual field array $this->erm = $this->epl->load_model('epl-registration-model'); //$this->earm = $this->epl->load_model( 'epl-regis-admin-model' ); $this->ecm = $this->epl->load_model('epl-common-model'); $this->erptm = $this->epl->load_model('epl-report-model'); $this->edbm = $this->epl->load_model('epl-db-model'); $this->erm->on_admin = true; $this->edit_mode = epl_get_element('post', $_GET) || epl_get_element('post_ID', $_REQUEST); if (isset($_REQUEST['print']) || isset($_REQUEST['epl_download_trigger']) || $GLOBALS['epl_ajax']) { $this->run(); } else { $this->personal_field_ids = $this->ecm->get_personal_field_ids(); add_action('default_title', array($this, 'pre')); add_action('add_meta_boxes', array($this, 'add_meta_boxes')); add_action('save_post', array($this, 'save_postdata')); //post list manage screen columns - extra columns add_filter('manage_' . self::post_type . '_posts_columns', array($this, 'add_new_columns')); //post list manage screen - column data add_action('manage_' . self::post_type . '_posts_custom_column', array($this, 'column_data'), 10, 2); add_filter('restrict_manage_posts', array($this, 'filters')); //add_filter( 'request', array( $this, 'request_filter' ) ); add_filter('parse_query', array($this, 'request_filter_2')); // make these columns sortable //add_filter( "manage_edit-" . self::post_type . "_sortable_columns", array( $this,"sortable_columns") ); add_action('admin_head', array($this, 'admin_table_header')); add_action('admin_init', array($this, 'admin_init')); } }
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ if (!function_exists('add_action')) { header('Status: 403 Forbidden'); header('HTTP/1.1 403 Forbidden'); exit; } add_action('plugins_loaded', 'start_events_planner'); require_once dirname(__FILE__) . '/application/config/config.php'; epl_log('clear'); epl_log('init', "Plugin file loaded."); function start_events_planner() { //Starting the output buffer here for paypal redirect to work //Will see if conflict with other plugins. If so, will use init hook ob_start(); if (!session_id()) { session_start(); if (isset($_GET['destroy_epl_sess'])) { session_destroy(); } if (!isset($_SESSION['__epl'])) { $_SESSION['__epl'] = array(); } } //error_reporting(E_ALL ^ E_NOTICE);
function __construct() { parent::__construct(); epl_log('init', get_class() . ' initialized.', 1); $this->dates = array(); }
function add_registration_to_db($meta) { /* * if id exists, update meta * */ epl_log("debug", "<pre>" . print_r($meta, true) . "</pre>"); $_post = array('post_type' => 'epl_registration', 'post_title' => $this->regis_id, 'post_content' => '', 'post_status' => 'draft'); if (isset($this->regis_meta['__epl']['post_ID'])) { //If this post is already in the db, the meta will be deleted before $_post['ID'] = (int) $this->regis_meta['__epl']['post_ID']; global $wpdb; $wpdb->query("DELETE FROM {$wpdb->postmeta}\n WHERE meta_key like '__epl_original%' AND post_id = '{$_post['ID']}'"); $wpdb->query($wpdb->prepare("UPDATE {$wpdb->postmeta}\n SET meta_key = '__epl_original-%d' WHERE meta_key = '__epl' AND post_id = '%d'", time(), $_post['ID'])); } else { //update the post $post_ID = wp_insert_post($_post); $this->regis_meta['__epl']['post_ID'] = $post_ID; } /* update_post_meta( $this->regis_meta['__epl']['post_ID'], '__epl', $meta ); $cart_components = $this->get_cart_quantities(); foreach ( $cart_components as $key => $v ) { update_post_meta( $this->regis_meta['__epl']['post_ID'], $key, $v ); } /* foreach ( $cart_components as $key => $v ) { update_post_meta( $this->regis_meta['__epl']['post_ID'], $key, $meta[$this->regis_id][$key] ); } */ }
function __construct() { epl_log('init', get_class() . " initialized"); self::$instance = $this; add_action('init', array($this, 'load_components')); }