本文整理匯總了PHP中vc_updater函數的典型用法代碼示例。如果您正苦於以下問題:PHP vc_updater函數的具體用法?PHP vc_updater怎麽用?PHP vc_updater使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了vc_updater函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: check_info
/**
* 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;
}
示例2: init
/**
* 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');
}
示例3: init
/**
* 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');
}