本文整理汇总了PHP中vc_generate_nonce函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_generate_nonce函数的具体用法?PHP vc_generate_nonce怎么用?PHP vc_generate_nonce使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_generate_nonce函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: renderEditor
/**
* vc_filter: vc_frontend_editor_iframe_url - hook to edit iframe url, can be used in vendors like qtranslate do.
*/
function renderEditor()
{
global $current_user;
get_currentuserinfo();
$this->current_user = $current_user;
$this->post_url = vc_str_remove_protocol(get_permalink($this->post_id));
if (!self::inlineEnabled() || !vc_user_access()->wpAny(array('edit_post', $this->post_id))->get()) {
header('Location: ' . $this->post_url);
}
$this->registerJs();
$this->registerCss();
visual_composer()->registerAdminCss();
//bc
visual_composer()->registerAdminJavascript();
//bc
if ($this->post && 'auto-draft' === $this->post->post_status) {
$post_data = array('ID' => $this->post_id, 'post_status' => 'draft', 'post_title' => '');
add_filter('wp_insert_post_empty_content', array($this, 'allowInsertEmptyPost'));
wp_update_post($post_data, true);
$this->post->post_status = 'draft';
$this->post->post_title = '';
}
add_filter('admin_body_class', array($this, 'filterAdminBodyClass'));
$this->post_type = get_post_type_object($this->post->post_type);
$this->url = $this->post_url . (preg_match('/\\?/', $this->post_url) ? '&' : '?') . 'vc_editable=true&vc_post_id=' . $this->post->ID . '&_vcnonce=' . vc_generate_nonce('vc-admin-nonce');
$this->url = apply_filters('vc_frontend_editor_iframe_url', $this->url);
$this->enqueueAdmin();
$this->enqueueMappedShortcode();
wp_enqueue_media(array('post' => $this->post_id));
remove_all_actions('admin_notices', 3);
remove_all_actions('network_admin_notices', 3);
$post_custom_css = strip_tags(get_post_meta($this->post_id, '_wpb_post_custom_css', true));
$this->post_custom_css = $post_custom_css;
if (!defined('IFRAME_REQUEST')) {
define('IFRAME_REQUEST', true);
}
/**
* @deprecated vc_admin_inline_editor action hook
*/
do_action('vc_admin_inline_editor');
/**
* new one
*/
do_action('vc_frontend_editor_render');
add_filter('admin_title', array(&$this, 'setEditorTitle'));
$this->render('editor');
die;
}
开发者ID:k2jysy,项目名称:wedev,代码行数:51,代码来源:class-vc-frontend-editor.php
示例2: json_encode
,
vc_mapper = <?php
echo json_encode(WPBMap::getShortCodes());
?>
,
vc_vendor_settings_presets = <?php
echo json_encode($vc_vendor_settings_presets);
?>
,
vc_settings_presets = <?php
echo json_encode($vc_settings_presets);
?>
,
vc_roles = [], // @todo fix_roles BC for roles
vcAdminNonce = '<?php
echo vc_generate_nonce('vc-admin-nonce');
?>
';
</script>
<?php
vc_include_template('editors/partials/vc_settings-image-block.tpl.php');
?>
<div style="height: 1px; visibility: hidden; overflow: hidden;">
<?php
// Disable notice in edit-form-advanced.php
$is_IE = false;
require_once ABSPATH . 'wp-admin/edit-form-advanced.php';
// Fix: WP 4.0
wp_dequeue_script('editor-expand');
do_action('vc_frontend_editor_render_template');
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:frontend_editor.tpl.php
示例3: wp_enqueue_script
wp_enqueue_script('twbs-pagination');
}
$this->enqueueScripts();
?>
<!-- vc_grid start -->
<div class="vc_grid-container-wrapper vc_clearfix">
<div class="<?php
echo esc_attr($css_class);
?>
"
data-vc-<?php
echo esc_attr($this->pagable_type);
?>
-settings="<?php
echo esc_attr(json_encode($this->grid_settings));
?>
"
data-vc-request="<?php
echo esc_attr(admin_url('admin-ajax.php', 'relative'));
?>
"
data-vc-post-id="<?php
echo esc_attr(get_the_ID());
?>
"
data-vc-public-nonce="<?php
echo vc_generate_nonce('vc-public-nonce');
?>
">
</div>
</div><!-- vc_grid end -->
开发者ID:tyburrowbridge,项目名称:tmb,代码行数:31,代码来源:vc_basic_grid.php
注:本文中的vc_generate_nonce函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论