private function _get_array($option_key)
 {
     $items = $this->_option->get($option_key);
     if (!is_array($items)) {
         $items = array();
     }
     return $items;
 }
 /**
  * Get the url to retrieve the css
  *
  * @return string
  */
 public function get_css_url()
 {
     // get what's saved. I t could be false, a int or a string.
     // if it's false or a int, use PHP to render CSS
     $saved_par = $this->db_adapter->get(self::QUERY_STRING_PARAM);
     // if it's empty it's a new install probably. Return static css.
     // if it's numeric, just consider it a new install
     if (empty($saved_par)) {
         return AI1EC_URL . '/public/themes-ai1ec/vortex/css/ai1ec_parsed_css.css';
     }
     if (is_numeric($saved_par)) {
         if ($this->_registry->get('model.settings')->get('render_css_as_link')) {
             $time = (int) $saved_par;
             $template_helper = $this->_registry->get('template.link.helper');
             return add_query_arg(array(self::QUERY_STRING_PARAM => $time), trailingslashit($template_helper->get_site_url()));
         } else {
             add_action('wp_head', array($this, 'echo_css'));
             return '';
         }
     }
     // otherwise return the string
     return $saved_par;
 }
Exemple #3
0
 /**
  * Get the url to retrieve the css
  *
  * @return string
  */
 public function get_css_url()
 {
     // get what's saved. I t could be false, a int or a string.
     // if it's false or a int, use PHP to render CSS
     $saved_par = $this->db_adapter->get(self::QUERY_STRING_PARAM);
     // if it's empty it's a new install probably. Return static css.
     // if it's numeric, just consider it a new install
     if (empty($saved_par)) {
         $theme = $this->_registry->get('model.option')->get('ai1ec_current_theme');
         return Ai1ec_Http_Response_Helper::remove_protocols(apply_filters('ai1ec_frontend_standard_css_url', $theme['theme_url'] . '/css/ai1ec_parsed_css.css'));
     }
     if (is_numeric($saved_par)) {
         if ($this->_registry->get('model.settings')->get('render_css_as_link')) {
             $time = (int) $saved_par;
             $template_helper = $this->_registry->get('template.link.helper');
             return Ai1ec_Http_Response_Helper::remove_protocols(add_query_arg(array(self::QUERY_STRING_PARAM => $time), trailingslashit(ai1ec_get_site_url())));
         } else {
             add_action('wp_head', array($this, 'echo_css'));
             return '';
         }
     }
     // otherwise return the string
     return Ai1ec_Http_Response_Helper::remove_protocols($saved_par);
 }