本文整理汇总了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');
}