Edit File by line
/home/zeestwma/ajeebong.../wp-conte.../plugins/cmb2
File: bootstrap.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Bootstraps the CMB2 process
[2] Fix | Delete
*
[3] Fix | Delete
* @category WordPress_Plugin
[4] Fix | Delete
* @package CMB2
[5] Fix | Delete
* @author CMB2
[6] Fix | Delete
* @license GPL-2.0+
[7] Fix | Delete
* @link https://cmb2.io
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* Function to encapsulate the CMB2 bootstrap process.
[12] Fix | Delete
*
[13] Fix | Delete
* @since 2.2.0
[14] Fix | Delete
* @return void
[15] Fix | Delete
*/
[16] Fix | Delete
function cmb2_bootstrap() {
[17] Fix | Delete
[18] Fix | Delete
if ( is_admin() ) {
[19] Fix | Delete
/**
[20] Fix | Delete
* Fires on the admin side when CMB2 is included/loaded.
[21] Fix | Delete
*
[22] Fix | Delete
* In most cases, this should be used to add metaboxes. See example-functions.php
[23] Fix | Delete
*/
[24] Fix | Delete
do_action( 'cmb2_admin_init' );
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Fires when CMB2 is included/loaded
[29] Fix | Delete
*
[30] Fix | Delete
* Can be used to add metaboxes if needed on the front-end or WP-API (or the front and backend).
[31] Fix | Delete
*/
[32] Fix | Delete
do_action( 'cmb2_init' );
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* For back-compat. Does the dirty-work of instantiating all the
[36] Fix | Delete
* CMB2 instances for the cmb2_meta_boxes filter
[37] Fix | Delete
*
[38] Fix | Delete
* @since 2.0.2
[39] Fix | Delete
*/
[40] Fix | Delete
$cmb_config_arrays = apply_filters( 'cmb2_meta_boxes', array() );
[41] Fix | Delete
foreach ( (array) $cmb_config_arrays as $cmb_config ) {
[42] Fix | Delete
new CMB2( $cmb_config );
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
/**
[46] Fix | Delete
* Fires after all CMB2 instances are created
[47] Fix | Delete
*/
[48] Fix | Delete
do_action( 'cmb2_init_before_hookup' );
[49] Fix | Delete
[50] Fix | Delete
/**
[51] Fix | Delete
* Get all created metaboxes, and instantiate CMB2_Hookup
[52] Fix | Delete
* on metaboxes which require it.
[53] Fix | Delete
*
[54] Fix | Delete
* @since 2.0.2
[55] Fix | Delete
*/
[56] Fix | Delete
foreach ( CMB2_Boxes::get_all() as $cmb ) {
[57] Fix | Delete
[58] Fix | Delete
/**
[59] Fix | Delete
* Initiates the box "hookup" into WordPress.
[60] Fix | Delete
*
[61] Fix | Delete
* Unless the 'hookup' box property is `false`, the box will be hooked in as
[62] Fix | Delete
* a post/user/comment/option/term box.
[63] Fix | Delete
*
[64] Fix | Delete
* And if the 'show_in_rest' box property is set, the box will be hooked
[65] Fix | Delete
* into the CMB2 REST API.
[66] Fix | Delete
*
[67] Fix | Delete
* The dynamic portion of the hook name, $cmb->cmb_id, is the box id.
[68] Fix | Delete
*
[69] Fix | Delete
* @since 2.2.6
[70] Fix | Delete
*
[71] Fix | Delete
* @param array $cmb The CMB2 object to hookup.
[72] Fix | Delete
*/
[73] Fix | Delete
do_action( "cmb2_init_hookup_{$cmb->cmb_id}", $cmb );
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
/**
[77] Fix | Delete
* Fires after CMB2 initiation process has been completed
[78] Fix | Delete
*/
[79] Fix | Delete
do_action( 'cmb2_after_init' );
[80] Fix | Delete
}
[81] Fix | Delete
[82] Fix | Delete
/* End. That's it, folks! */
[83] Fix | Delete
[84] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function