/**
  * Add our self-hosted description to the filter
  *
  * @param boolean $false
  * @param array $action
  * @param object $arg
  *
  * @return bool|object
  */
 public function check_info($false, $action, $arg)
 {
     if (isset($arg->slug) && $arg->slug === $this->slug) {
         $information = $this->getRemote_information();
         $array_pattern = array('/^([\\*\\s])*(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d[^\\n]*)/m', '/^\\n+|^[\\t\\s]*\\n+/m', '/\\n/');
         $array_replace = array('<h4>$2</h4>', '</div><div>', '</div><div>');
         $information->name = vc_updater()->title;
         $information->sections['changelog'] = '<div>' . preg_replace($array_pattern, $array_replace, $information->sections['changelog']) . '</div>';
         return $information;
     }
     return $false;
 }
Exemple #2
0
 /**
  * Callback function for WP init action hook. Sets Vc mode and loads required objects.
  *
  * @since  4.2
  * @access public
  *
  * @return void
  */
 public function init()
 {
     do_action('vc_before_init');
     $this->setMode();
     do_action('vc_after_set_mode');
     /**
      * Set version of VC if required.
      */
     $this->setVersion();
     // Load required
     !vc_is_updater_disabled() && vc_updater()->init();
     /**
      * Init default hooks and options to load.
      */
     $this->vc()->init();
     /**
      * if is admin and not front end editor.
      */
     is_admin() && !vc_is_frontend_editor() && $this->asAdmin();
     /**
      * if frontend editor is enabled init editor.
      */
     vc_enabled_frontend() && vc_frontend_editor()->init();
     do_action('vc_before_mapping');
     // VC ACTION
     // Include default shortcodes.
     $this->mapper()->init();
     //execute all required
     do_action('vc_after_mapping');
     // VC ACTION
     // Load && Map shortcodes from Automapper.
     vc_automapper()->map();
     if (vc_user_access()->wpAny('manage_options')->part('settings')->can('vc-updater-tab')->get()) {
         vc_license()->setupReminder();
     }
     do_action('vc_after_init');
 }
Exemple #3
0
 /**
  * Callback function for WP init action hook. Sets Vc mode and loads required objects.
  *
  * @since  4.2
  * @access public
  * @return void
  */
 public function init()
 {
     do_action('vc_before_init');
     $this->setMode();
     /**
      * Set version of VC if required.
      */
     $this->setVersion();
     // Load required
     !vc_is_updater_disabled() && vc_updater()->init();
     /**
      * Init default hooks and options to load.
      */
     $this->vc()->init();
     /**
      * if is admin and not front end editor.
      */
     is_admin() && !vc_is_frontend_editor() && $this->asAdmin();
     /**
      * if frontend editor is enabled init editor.
      */
     vc_enabled_frontend() && vc_frontend_editor()->init();
     // Load Automapper
     vc_automapper()->addAjaxActions();
     do_action('vc_before_mapping');
     // VC ACTION
     // Include default shortcodes.
     $this->mapper()->init();
     //execute all required
     do_action('vc_after_mapping');
     // VC ACTION
     // Load && Map shortcodes from Automapper.
     vc_automapper()->map();
     do_action('vc_after_init');
 }