本文整理汇总了PHP中wpcf_embedded_check_import函数的典型用法代码示例。如果您正苦于以下问题:PHP wpcf_embedded_check_import函数的具体用法?PHP wpcf_embedded_check_import怎么用?PHP wpcf_embedded_check_import使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpcf_embedded_check_import函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpcf_embedded_init
/**
* Main init hook.
*/
function wpcf_embedded_init()
{
$locale = get_locale();
load_textdomain('wpcf', WPCF_EMBEDDED_ABSPATH . '/locale/types-' . $locale . '.mo');
if (!defined('WPV_VERSION')) {
load_textdomain('wpv-views', WPCF_EMBEDDED_ABSPATH . '/locale/locale-views/views-' . $locale . '.mo');
}
// Define necessary constants if plugin is not present
if (!defined('WPCF_VERSION')) {
define('WPCF_VERSION', '1.0.4');
define('WPCF_META_PREFIX', 'wpcf-');
define('WPCF_EMBEDDED_RELPATH', icl_get_file_relpath(__FILE__));
} else {
define('WPCF_EMBEDDED_RELPATH', WPCF_RELPATH . '/embedded');
}
define('WPCF_EMBEDDED_INC_RELPATH', WPCF_EMBEDDED_RELPATH . '/includes');
define('WPCF_EMBEDDED_RES_RELPATH', WPCF_EMBEDDED_RELPATH . '/resources');
if (is_admin()) {
require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
wpcf_embedded_admin_init_hook();
} else {
require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
}
wpcf_init_custom_types_taxonomies();
if (defined('DOING_AJAX')) {
require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
}
wpcf_embedded_check_import();
}
示例2: wpcf_embedded_init
//.........这里部分代码省略.........
// CRED specific code.
if (defined('CRED_FE_VERSION')) {
require_once WPCF_EMBEDDED_INC_ABSPATH . '/cred.php';
}
/*
*
*
* TODO This is a must for now.
* See if any fields need to be loaded.
*
* 1. Checkboxes - may be missing when submitted
*/
require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields/checkbox.php';
/*
*
*
* Use this call to load basic scripts and styles if necesary
* wpcf_enqueue_scripts();
*/
require_once WPCF_EMBEDDED_ABSPATH . '/usermeta-init.php';
// Include frontend or admin code
if (is_admin()) {
require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
/*
* TODO Check if called twice
*
* Watch this! This is actually called twice everytime
* in both modes (plugin or embedded)
*/
wpcf_embedded_admin_init_hook();
} else {
require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
}
global $wpcf;
// TODO since Types 1.2 Continue adding new functionalities HERE
/*
* Consider code already there as core.
* Use hooks to add new functionalities
*
* Introduced new global object $wpcf
* Holds useful objects like:
* $wpcf->field - Field object (base item object)
* $wpcf->repeater - Repetitive field object
*/
// Set debugging
if (!defined('WPCF_DEBUG')) {
define('WPCF_DEBUG', false);
} else {
if (WPCF_DEBUG) {
wp_enqueue_script('jquery');
}
}
$wpcf->debug = new stdClass();
require WPCF_EMBEDDED_INC_ABSPATH . '/debug.php';
add_action('wp_footer', 'wpcf_debug', PHP_INT_MAX);
add_action('admin_footer', 'wpcf_debug', PHP_INT_MAX);
// Set field object
$wpcf->field = new WPCF_Field();
// Set fields object
$wpcf->fields = new WPCF_Fields();
// Set usermeta field object
$wpcf->usermeta_field = new WPCF_Usermeta_Field();
// Set repeater object
$wpcf->usermeta_repeater = new WPCF_Usermeta_Repeater();
// Set repeater object
$wpcf->repeater = new WPCF_Repeater();
// Set relationship object
$wpcf->relationship = new WPCF_Relationship();
// Set conditional object
$wpcf->conditional = new WPCF_Conditional();
// Set validate object
$wpcf->validation = new WPCF_Validation();
// Set import export objects
$wpcf->import = new WPCF_Import_Export();
$wpcf->export = new WPCF_Import_Export();
// Set post object
$wpcf->post = new stdClass();
// Set post types object
$wpcf->post_types = new WPCF_Post_Types();
// Define exceptions - privileged plugins and their data
$wpcf->toolset_post_types = array('view', 'view-template', 'cred-form');
// 'attachment' = Media
//
$wpcf->excluded_post_types = array('dd_layouts', 'cred-form', 'mediapage', 'nav_menu_item', 'revision', 'view', 'view-template', 'wp-types-group', 'wp-types-user-group');
// Init loader
WPCF_Loader::init();
/*
* TODO Check why we enabled this
*
* I think because of CRED or Views using Types admin functions on frontend
* Does this need review?
*/
if (defined('DOING_AJAX')) {
require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
}
// Check if import/export request is going on
wpcf_embedded_check_import();
do_action('types_after_init');
do_action('wpcf_after_init');
}
示例3: wpcf_embedded_init
//.........这里部分代码省略.........
// Validation
require_once WPCF_EMBEDDED_ABSPATH . '/classes/validation.php';
// Post Types
require_once WPCF_EMBEDDED_ABSPATH . '/classes/class.wpcf-post-types.php';
// Import Export
require_once WPCF_EMBEDDED_ABSPATH . '/classes/class.wpcf-import-export.php';
// Incubator
require_once WPCF_EMBEDDED_ABSPATH . '/incubator/index.php';
// Module manager
require_once WPCF_EMBEDDED_INC_ABSPATH . '/module-manager.php';
// WPML specific code
require_once WPCF_EMBEDDED_INC_ABSPATH . '/wpml.php';
/*
*
*
* TODO This is a must for now.
* See if any fields need to be loaded.
*/
require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields/checkbox.php';
/*
*
*
* Use this call to load basic scripts and styles if necesary
* wpcf_enqueue_scripts();
*/
// Include frontend or admin code
if (is_admin()) {
require_once WPCF_EMBEDDED_ABSPATH . '/admin.php';
/*
* TODO Check if called twice
*
* Watch this! This is actually called twice everytime
* in both modes (plugin or embedded)
*/
wpcf_embedded_admin_init_hook();
} else {
require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
}
global $wpcf;
// TODO since Types 1.2 Continue adding new functionalities HERE
/*
* Consider code already there as core.
* Use hooks to add new functionalities
*
* Introduced new global object $wpcf
* Holds useful objects like:
* $wpcf->field - Field object (base item object)
* $wpcf->repeater - Repetitive field object
*/
// Set field object
$wpcf->field = new WPCF_Field();
// Set fields object
$wpcf->fields = new WPCF_Fields();
// Set template object
$wpcf->template = new WPCF_Template();
// Set repeater object
$wpcf->repeater = new WPCF_Repeater();
// Set relationship object
$wpcf->relationship = new WPCF_Relationship();
// Set conditional object
$wpcf->conditional = new WPCF_Conditional();
// Set validate object
$wpcf->validation = new WPCF_Validation();
// Set import export objects
$wpcf->import = new WPCF_Import_Export();
$wpcf->export = new WPCF_Import_Export();
// Set API object
$wpcf->api = new WPCF_Api();
// Set post object
$wpcf->post = new stdClass();
// Set post types object
$wpcf->post_types = new WPCF_Post_Types();
// Define exceptions - privileged plugins and their data
$wpcf->toolset_post_types = array('view', 'view-template', 'cred-form');
$wpcf->excluded_post_types = array('revision', 'view', 'view-template', 'cred-form', 'nav_menu_item', 'attachment', 'mediapage');
// Init custom types and taxonomies
wpcf_init_custom_types_taxonomies();
/*
* TODO Check why we enabled this
*
* I think because of CRED or Views using Types admin functions on frontend
* Does this need review?
*/
if (defined('DOING_AJAX')) {
require_once WPCF_EMBEDDED_ABSPATH . '/frontend.php';
}
// Check if import/export request is going on
wpcf_embedded_check_import();
// Set debugging
if (!defined('WPCF_DEBUG')) {
define('WPCF_DEBUG', false);
}
if (WPCF_DEBUG) {
$wpcf->debug = new stdClass();
require WPCF_INC_ABSPATH . '/debug.php';
add_action('wp_footer', 'wpcf_debug', 1.0E+32);
add_action('admin_footer', 'wpcf_debug', 9.999999999999999E+28);
}
do_action('wpcf_after_init');
}