本文整理汇总了PHP中wpcf_is_embedded函数的典型用法代码示例。如果您正苦于以下问题:PHP wpcf_is_embedded函数的具体用法?PHP wpcf_is_embedded怎么用?PHP wpcf_is_embedded使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpcf_is_embedded函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wpcf_enqueue_scripts
/**
* Basic scripts
*/
function wpcf_enqueue_scripts()
{
if (!is_admin()) {
return;
}
if (!wpcf_is_embedded()) {
/**
* Basic JS
*/
wp_register_script('wpcf-js', WPCF_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs', 'toolset-colorbox'), WPCF_VERSION);
wp_localize_script('wpcf-js', 'wpcf_js', array('close' => __('Close', 'wpcf')));
wp_enqueue_script('wpcf-js');
if (function_exists('wpcf_admin_add_js_settings')) {
wpcf_admin_add_js_settings('wpcf_nonce_toggle_group', '\'' . wp_create_nonce('group_form_collapsed') . '\'');
}
}
/**
* Basic JS
*/
wp_enqueue_script('wpcf-js-embedded', WPCF_EMBEDDED_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs', 'select2'), WPCF_VERSION);
wp_localize_script('wpcf-js-embedded', 'WPCF_basic', array('field_already_in_use' => sprintf(__('%s This field is locked because the same field is added multiple times to this post. %s%s%s you can set the value%s', 'wpcf'), '<small style="display: block;">', '<a href="#" class="focus_correct_field" data-field-slug="##DATA-FIELD-ID##" >', 'Here', '</a>', '</small>')));
/*
*
* Basic CSS
*/
wp_enqueue_style('wpcf-css-embedded');
/*
*
* Other components
*/
if (!defined('WPTOOLSET_FORMS_ABSPATH')) {
// Repetitive
wp_enqueue_script('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/js/repetitive.js', array('wpcf-js-embedded'), WPCF_VERSION);
wp_enqueue_style('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/css/repetitive.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
// Conditional
wp_enqueue_script('types-conditional');
// RTL
if (is_rtl()) {
wp_enqueue_style('wpcf-rtl', WPCF_EMBEDDED_RES_RELPATH . '/css/rtl.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
/**
* select2
*/
$select2_version = '3.5.2';
if (!wp_script_is('select2', 'registered')) {
wp_register_script('select2', WPCF_EMBEDDED_TOOLSET_RELPATH . '/toolset-common/res/lib/select2/select2.min.js', array('jquery'), $select2_version);
}
if (!wp_style_is('select2', 'registered')) {
wp_register_style('select2', WPCF_EMBEDDED_TOOLSET_RELPATH . '/toolset-common/res/lib/select2/select2.css', array(), $select2_version);
}
if (!wp_style_is('select2')) {
wp_enqueue_style('select2');
}
// Add JS settings
wpcf_admin_add_js_settings('wpcfFormUniqueValuesCheckText', '\'' . __('Warning: same values selected', 'wpcf') . '\'');
wpcf_admin_add_js_settings('wpcfFormUniqueNamesCheckText', '\'' . __('Warning: field name already used', 'wpcf') . '\'');
wpcf_admin_add_js_settings('wpcfFormUniqueSlugsCheckText', '\'' . __('Warning: field slug already used', 'wpcf') . '\'');
wpcf_admin_add_js_settings('wpcfFormUsedOrReservedSlug', '\'' . __('You cannot use this slug because it is already used or a reserved word. Please choose a different slug.', 'wpcf') . '\'');
}
开发者ID:studiopengpeng,项目名称:ASCOMETAL,代码行数:63,代码来源:functions.php
示例2: wpcf_enqueue_scripts
/**
* Basic scripts
*/
function wpcf_enqueue_scripts()
{
if (!wpcf_is_embedded()) {
/*
*
* Basic JS
*/
wp_enqueue_script('wpcf-js', WPCF_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs'), WPCF_VERSION);
/*
*
* Basic CSS
*/
wp_enqueue_style('wpcf-css', WPCF_RES_RELPATH . '/css/basic.css', array(), WPCF_VERSION);
}
/*
*
* Basic JS
*/
wp_enqueue_script('wpcf-js-embedded', WPCF_EMBEDDED_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs'), WPCF_VERSION);
/*
*
* Basic CSS
*/
wp_enqueue_style('wpcf-css-embedded', WPCF_EMBEDDED_RES_RELPATH . '/css/basic.css', array(), WPCF_VERSION);
/*
*
* Other components
*/
if (!defined('WPTOOLSET_FORMS_ABSPATH')) {
// Repetitive
wp_enqueue_script('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/js/repetitive.js', array('wpcf-js-embedded'), WPCF_VERSION);
wp_enqueue_style('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/css/repetitive.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
// Conditional
wp_enqueue_script('types-conditional');
wpcf_admin_add_js_settings('wpcfConditionalVerify_nonce', wp_create_nonce('cd_verify'));
wpcf_admin_add_js_settings('wpcfConditionalVerifyGroup', wp_create_nonce('cd_group_verify'));
// RTL
if (is_rtl()) {
wp_enqueue_style('wpcf-rtl', WPCF_EMBEDDED_RES_RELPATH . '/css/rtl.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
}
开发者ID:CrankMaster336,项目名称:FFW-TR,代码行数:45,代码来源:functions.php
示例3: wpcf_enqueue_scripts
/**
* Basic scripts
*/
function wpcf_enqueue_scripts()
{
if (!is_admin()) {
return;
}
if (!wpcf_is_embedded()) {
/**
* Basic JS
*/
wp_register_script('wpcf-js', WPCF_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs', 'toolset-colorbox'), WPCF_VERSION);
wp_localize_script('wpcf-js', 'wpcf_js', array('close' => __('Close', 'wpcf')));
wp_enqueue_script('wpcf-js');
if (function_exists('wpcf_admin_add_js_settings')) {
wpcf_admin_add_js_settings('wpcf_nonce_toggle_group', '\'' . wp_create_nonce('group_form_collapsed') . '\'');
}
}
/**
* Basic JS
*/
wp_enqueue_script('wpcf-js-embedded', WPCF_EMBEDDED_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs', 'select2'), WPCF_VERSION);
/*
*
* Basic CSS
*/
wp_enqueue_style('wpcf-css-embedded');
/*
*
* Other components
*/
if (!defined('WPTOOLSET_FORMS_ABSPATH')) {
// Repetitive
wp_enqueue_script('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/js/repetitive.js', array('wpcf-js-embedded'), WPCF_VERSION);
wp_enqueue_style('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/css/repetitive.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
// Conditional
wp_enqueue_script('types-conditional');
// RTL
if (is_rtl()) {
wp_enqueue_style('wpcf-rtl', WPCF_EMBEDDED_RES_RELPATH . '/css/rtl.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
/**
* select2
*/
$select2_version = '3.5.2';
if (!wp_script_is('select2', 'registered')) {
wp_register_script('select2', WPCF_EMBEDDED_RELPATH . '/toolset/toolset-common/utility/js/select2.min.js', array('jquery'), $select2_version);
}
if (!wp_style_is('select2', 'registered')) {
wp_register_style('select2', WPCF_EMBEDDED_RELPATH . '/toolset/toolset-common/utility/css/select2/select2.css', array(), $select2_version);
}
if (!wp_style_is('select2')) {
wp_enqueue_style('select2');
}
// Add JS settings
wpcf_admin_add_js_settings('wpcfFormUniqueValuesCheckText', '\'' . __('Warning: same values selected', 'wpcf') . '\'');
wpcf_admin_add_js_settings('wpcfFormUniqueNamesCheckText', '\'' . __('Warning: field name already used', 'wpcf') . '\'');
wpcf_admin_add_js_settings('wpcfFormUniqueSlugsCheckText', '\'' . __('Warning: field slug already used', 'wpcf') . '\'');
wpcf_admin_add_js_settings('wpcfFormUsedOrReservedSlug', '\'' . __('You cannot use this slug because it is already used or a reserved word. Please choose a different slug.', 'wpcf') . '\'');
}
开发者ID:torch2424,项目名称:Team-No-Comply-Games-Wordpress,代码行数:62,代码来源:functions.php
示例4: wpcf_admin_user_profile_save_hook
/**
* Add fields to user profile
*/
function wpcf_admin_user_profile_save_hook($user_id)
{
if (!current_user_can('edit_user', $user_id)) {
return false;
}
if (!wpcf_is_embedded()) {
require_once WPCF_INC_ABSPATH . '/usermeta.php';
}
require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';
require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta.php';
require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';
require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta-post.php';
wpcf_admin_userprofilesave_init($user_id);
}
开发者ID:KryvunRoman,项目名称:yobko,代码行数:17,代码来源:usermeta-init.php
示例5: wpcf_enqueue_scripts
/**
* Basic scripts
*/
function wpcf_enqueue_scripts()
{
if (!wpcf_is_embedded()) {
/*
*
* Basic JS
*/
wp_enqueue_script('wpcf-js', WPCF_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs'), WPCF_VERSION);
/*
*
* Basic CSS
*/
wp_enqueue_style('wpcf-css', WPCF_RES_RELPATH . '/css/basic.css', array(), WPCF_VERSION);
/*
* Settings
*/
// _nonce for editor callback
wpcf_admin_add_js_settings('wpcfEditorCallbackNonce', wp_create_nonce('editor_callback'));
// Thickbox generic title
wpcf_admin_add_js_settings('wpcfEditorTbTitle', esc_js(__('Insert field', 'wpcf')));
}
/*
*
* Basic JS
*/
wp_enqueue_script('wpcf-js-embedded', WPCF_EMBEDDED_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs'), WPCF_VERSION);
/*
*
* Basic CSS
*/
wp_enqueue_style('wpcf-css-embedded', WPCF_EMBEDDED_RES_RELPATH . '/css/basic.css', array(), WPCF_VERSION);
/*
*
* Other components
*/
// Repetitive
wp_enqueue_script('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/js/repetitive.js', array('wpcf-js-embedded'), WPCF_VERSION);
wp_enqueue_style('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/css/repetitive.css', array('wpcf-css-embedded'), WPCF_VERSION);
// Conditional
wp_enqueue_script('wpcf-conditional', WPCF_EMBEDDED_RES_RELPATH . '/js/conditional.js', array('wpcf-js-embedded'), WPCF_VERSION);
wpcf_admin_add_js_settings('wpcfConditionalVerify_nonce', wp_create_nonce('cd_verify'));
wpcf_admin_add_js_settings('wpcfConditionalVerifyGroup', wp_create_nonce('cd_group_verify'));
// RTL
if (is_rtl()) {
wp_enqueue_style('wpcf-rtl', WPCF_EMBEDDED_RES_RELPATH . '/css/rtl.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
}
开发者ID:pwillems,项目名称:mimosa-contents,代码行数:50,代码来源:functions.php
示例6: die
<?php
/*
* Image editor form.
*/
if (!defined('ABSPATH')) {
die('Security check');
}
if (!isset($data)) {
$data = array();
}
$data = array_merge(array('alignment' => 'none', 'alignment_options' => array(), 'alt' => '', 'height' => '', 'image' => '', 'image_size' => 'full', 'preview' => '', 'size_options' => array(), 'title' => '', 'warning_remote' => false, 'width' => '', 'url' => false, 'onload' => ''), (array) $data);
if ($data['warning_remote']) {
if (wpcf_is_embedded()) {
$warning_remote = __('Remote image resize is disabled, so Types will only resize images that you upload.', 'wpcf');
} else {
$warning_remote = sprintf(__('Remote image resize is currently disabled, so Types will only resize images that you upload. To change, go to the %sTypes settings page%s.', 'wpcf'), '<a href="' . admin_url('admin.php?page=wpcf-custom-settings#types-image-settings') . '" target="_blank">', '</a>');
}
}
?>
<div data-bind="template: {name:'tpl-types-modal-image'}"></div>
<!--TYPES MODAL IMAGE-->
<script id="tpl-types-modal-image" type="text/html">
<div class="fieldset">
<p>
<label for="image-title" class="input-title"><?php
_e('Image title', 'wpcf');
?>
开发者ID:aarongillett,项目名称:B22-151217,代码行数:31,代码来源:editor-modal-image.tpl.php
示例7: wpcf_enqueue_scripts
/**
* Basic scripts
*/
function wpcf_enqueue_scripts()
{
if (!wpcf_is_embedded()) {
/**
* Basic JS
*/
wp_register_script('wpcf-js', WPCF_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs', 'toolset-colorbox'), WPCF_VERSION);
wp_localize_script('wpcf-js', 'wpcf_js', array('close' => __('Close', 'wpcf')));
wp_enqueue_script('wpcf-js');
}
/**
* Basic JS
*/
wp_enqueue_script('wpcf-js-embedded', WPCF_EMBEDDED_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-tabs'), WPCF_VERSION);
/*
*
* Basic CSS
*/
wp_enqueue_style('wpcf-css-embedded');
/*
*
* Other components
*/
if (!defined('WPTOOLSET_FORMS_ABSPATH')) {
// Repetitive
wp_enqueue_script('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/js/repetitive.js', array('wpcf-js-embedded'), WPCF_VERSION);
wp_enqueue_style('wpcf-repeater', WPCF_EMBEDDED_RES_RELPATH . '/css/repetitive.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
// Conditional
wp_enqueue_script('types-conditional');
// RTL
if (is_rtl()) {
wp_enqueue_style('wpcf-rtl', WPCF_EMBEDDED_RES_RELPATH . '/css/rtl.css', array('wpcf-css-embedded'), WPCF_VERSION);
}
/**
* select2
*/
if (!wp_script_is('select2', 'registered')) {
$select2_version = '3.5.2';
wp_register_script('select2', WPCF_EMBEDDED_RELPATH . '/common/utility/js/select2.min.js', array('jquery'), $select2_version);
wp_register_style('select2', WPCF_EMBEDDED_RELPATH . '/common/utility/css/select2/select2.css', array(), $select2_version);
wp_enqueue_style('select2');
}
}
开发者ID:jairoburbano,项目名称:rimisp,代码行数:47,代码来源:functions.php
注:本文中的wpcf_is_embedded函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论