public function initialize()
 {
     if (!class_exists('App_Locations_Model')) {
         return false;
     }
     global $appointments;
     $this->_data = $appointments->options;
     if (empty($this->_data['worker_locations'])) {
         $this->_data['worker_locations'] = array();
     }
     $this->_locations = App_Locations_Model::get_instance();
     if (empty($this->_data['worker_locations']['insert']) || 'manual' == $this->_data['worker_locations']['insert']) {
         add_shortcode('app_worker_location', array($this, 'process_shortcode'));
     } else {
         add_shortcode('app_worker_location', '__return_false');
         add_filter('app-workers-worker_description', array($this, 'inject_location_markup'), 10, 3);
     }
     if (!class_exists('App_Shortcode_WorkerLocationsShortcode')) {
         require_once dirname(__FILE__) . '/lib/app_worker_locations_shortcode.php';
         App_Shortcode_WorkerLocationsShortcode::serve();
         App_Shortcode_RequiredWorkerLocationsShortcode::serve();
     }
 }
 public function process_shortcode($args = array(), $content = '')
 {
     $instance = App_Shortcodes::get_shortcode_instance('app_service_providers');
     if (!empty($this->_requested_location_id) && $instance && method_exists($instance, 'process_shortcode')) {
         return $instance->process_shortcode($args, $content);
     } else {
         return parent::process_shortcode($args, $content);
     }
 }