本文整理汇总了PHP中do_meta_boxes函数的典型用法代码示例。如果您正苦于以下问题:PHP do_meta_boxes函数的具体用法?PHP do_meta_boxes怎么用?PHP do_meta_boxes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_meta_boxes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: move_fgms_html_title_meta
function move_fgms_html_title_meta()
{
global $post, $wp_meta_boxes;
do_meta_boxes(get_current_screen(), 'advanced', $post);
# Remove the initial "advanced" meta boxes:
unset($wp_meta_boxes['post']['advanced']);
}
示例2: nggallery_admin_overview
/**
* nggallery_admin_overview()
*
* Add the admin overview in wp2.7 style
* @return mixed content
*/
function nggallery_admin_overview()
{
?>
<div class="wrap ngg-wrap">
<h2><?php
_e('NextGEN Gallery Overview', 'nggallery');
?>
</h2>
<div id="dashboard-widgets-wrap" class="ngg-overview">
<div id="dashboard-widgets" class="metabox-holder">
<div id="side-info-column" class="inner-sidebar">
<?php
do_meta_boxes('ngg_overview', 'right', '');
?>
</div>
<div id="post-body" class="has-sidebar">
<div id="dashboard-widgets-main-content" class="has-sidebar-content">
<?php
do_meta_boxes('ngg_overview', 'left', '');
?>
</div>
</div>
</div>
</div>
</div>
<?php
}
示例3: page
/**
* Page content.
*/
public function page($page)
{
global $wp_meta_boxes;
if (!($boxes = beans_get($page, $wp_meta_boxes))) {
return;
}
// Only add column class if there is more than 1 metaboxes.
$column_class = beans_get('column', $boxes, array()) ? ' column' : false;
// Set page data which will be used by the postbox.
echo '<form action="" method="post" class="bs-options" data-page="' . beans_get('page') . '">';
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
echo '<input type="hidden" name="beans_options_nonce" value="' . esc_attr(wp_create_nonce('beans_options_nonce')) . '" />';
echo '<div class="metabox-holder' . $column_class . '">';
do_meta_boxes($page, 'normal', null);
if ($column_class) {
do_meta_boxes($page, 'column', null);
}
echo '</div>';
echo '<p class="bs-options-form-actions">
<input type="submit" name="beans_save_options" value="Save" class="button-primary">
<input type="submit" name="beans_reset_options" value="Reset" class="button-secondary">
</p>';
echo '</form>';
}
示例4: render
/**
* Render option page type.
*/
public function render()
{
?>
<div class="wrap">
<h2><?php
echo esc_html($this->name);
?>
</h2>
<form id="post" method="post" name="post">
<div id="papi-hidden-editor" class="hide-if-js">
<?php
wp_nonce_field('papi_save_data', 'papi_meta_nonce');
?>
<?php
wp_editor('', 'papiHiddenEditor');
?>
</div>
<div id="poststuff">
<div id="post-body">
<?php
do_meta_boxes($this->post_type[0], 'normal', null);
?>
<?php
submit_button();
?>
</div>
</div>
</form>
</div>
<?php
}
示例5: pageAddProduct
function pageAddProduct()
{
add_meta_box('add_product', __('New Product'), array(&$this, 'renderNewProduct'), 'add_product', 'normal');
echo '<div id="poststuff">';
do_meta_boxes('add_product', 'normal', null);
echo '</div>';
}
示例6: do_metabox
public function do_metabox($post)
{
if (!$this->is_add_gallery() && !$this->is_edit_gallery()) {
return;
}
do_meta_boxes(null, 'mediapress', $post);
}
示例7: dentix_move_metabox
function dentix_move_metabox()
{
global $post, $wp_meta_boxes;
if ('patient' === get_current_screen()->id) {
do_meta_boxes(get_current_screen(), 'advanced', $post);
unset($wp_meta_boxes['patient']['advanced']);
}
}
示例8: add_meta_box
function add_meta_box()
{
if (!current_user_can('publish_pages')) {
return;
}
add_meta_box('datepickerthemediv', __('Datepicker Theme'), array(__CLASS__, 'theme_metabox'), 'cfseven', 'datepicker-theme', 'core');
do_meta_boxes('cfseven', 'datepicker-theme', array());
}
示例9: page_content
public function page_content()
{
$title = $this->admin_heading('Footer Trademarks', FOOTER_PUTTER_ICON);
$this->print_admin_form_with_sidebar_start($title);
do_meta_boxes($this->get_screen_id(), 'side', null);
$this->print_admin_form_with_sidebar_middle();
do_meta_boxes($this->get_screen_id(), 'normal', null);
$this->print_admin_form_end(__CLASS__);
}
示例10: wp_event_calendar_editor_below
/**
* Custom metaboxes above th editor
*
* @global string $post_type
*/
function wp_event_calendar_editor_below()
{
global $post_type, $post;
// Description title
if (!in_array($post_type, wp_event_calendar_allowed_post_types())) {
return;
}
// Below editor
do_meta_boxes($post_type, 'below_event_editor', $post);
}
示例11: sugarform_box
function sugarform_box()
{
add_meta_box('sugarform_box', __('Form Options', 'myplugin_textdomain'), 'sugarform_box_content', 'sugarform', 'advanced', 'high');
add_meta_box('sugarmapping_box', __('SugarCRM Mapping', 'myplugin_textdomain'), 'sugarmapping_box_content', 'sugarform', 'normal', 'high');
// Move all "advanced" metaboxes above the default editor
add_action('edit_form_after_title', function () {
global $post, $wp_meta_boxes;
do_meta_boxes(get_current_screen(), 'advanced', $post);
unset($wp_meta_boxes[get_post_type($post)]['advanced']);
});
}
示例12: show_metabox
public function show_metabox($user)
{
if (!current_user_can('edit_user', $user->ID)) {
return;
}
if (isset($_GET['updated'])) {
$this->flush_cache($user_id);
}
echo '<div id="poststuff">';
do_meta_boxes('user', 'normal', $user);
echo '</div>';
}
示例13: deseret_connect_configuration_page
function deseret_connect_configuration_page()
{
global $deseret_connect;
deseret_connect_configuration_settings();
$plugin_data = get_plugin_data(DESERET_CONNECT_DIR . 'deseret_connect.php');
?>
<div class="wrap">
<?php
if (function_exists('screen_icon')) {
screen_icon();
}
?>
<?php
if (isset($_GET['updated']) && 'true' == esc_attr($_GET['updated'])) {
deseret_connect_update_message();
}
?>
<h2><?php
_e('General Settings', 'deseret_connect');
?>
</h2>
<form id="settings" method="post">
<div id="poststuff">
<?php
settings_fields('deseret_connect-settings-group');
?>
<div class="metabox-holder">
<div class="post-box-container column-1 cron"><?php
do_meta_boxes($deseret_connect->settings, 'pending', $plugin_data);
?>
</div>
</div>
</div><!-- #poststuff -->
<br class="clear">
<input class="button button-primary" type="submit" value="<?php
_e('Save');
?>
" name="settings" />
</form>
<!--<a href="<?php
echo $_SERVER['REQUEST_URI'];
?>
&action=run-now">Run Now</a>-->
</div><!-- .wrap -->
<?php
}
示例14: _printMetaBox
protected function _printMetaBox($sContext, $iContainerID)
{
$_sCurrentScreenID = $this->oUtil->getCurrentScreenID();
if (!isset($GLOBALS['wp_meta_boxes'][$_sCurrentScreenID][$sContext])) {
return;
}
if (count($GLOBALS['wp_meta_boxes'][$_sCurrentScreenID][$sContext]) <= 0) {
return;
}
echo "<div id='postbox-container-{$iContainerID}' class='postbox-container'>";
do_meta_boxes('', $sContext, null);
echo "</div>";
}
示例15: init_hooks
private static function init_hooks()
{
// Add hook to plugin activation event
register_activation_hook(__FILE__, array('Farmer', 'plugin_activation'));
// Add hook to plugin deactivation event
register_deactivation_hook(__FILE__, array('Farmer', 'plugin_deactivation'));
add_action('save_post', array('Farmer', 'save_meta_data'));
add_action('edit_form_after_title', function () {
global $post, $wp_meta_boxes;
do_meta_boxes(get_current_screen(), 'advanced', $post);
unset($wp_meta_boxes[get_post_type($post)]['advanced']);
});
add_action('init', array($this, 'load_plugin_textdomain'));
}