/**
 * Adds the resource meta boxes.
 */
function add_team_member_meta_boxes()
{
    if (!is_admin()) {
        return;
    }
    add_meta_box('fz_team_member_meta_box', esc_html__('Team Member Profile Info', 'fzp'), __NAMESPACE__ . '\\display_team_member_meta_box', get_team_members_post_type_name(), 'normal', 'default');
}
 /**
  * Add meta boxes to primary options pages
  *
  * @return void
  */
 public function add_admin_meta_boxes()
 {
     $id = 'malware_options';
     $title = __('Malware Scanning', 'it-l10n-better-wp-security');
     add_meta_box($id, $title, array($this, 'metabox_malware_settings'), 'security_page_toplevel_page_itsec_settings', 'advanced', 'core');
     $this->core->add_toc_item(array('id' => $id, 'title' => $title));
 }
/**
 * Add post options (add metaboxes)
 */
function dslc_add_post_options()
{
    global $dslc_var_post_options;
    // If there are post options
    if (!empty($dslc_var_post_options)) {
        // Loop through all post options
        foreach ($dslc_var_post_options as $dslc_post_option_key => $dslc_post_option) {
            if (!isset($dslc_post_option['context'])) {
                $dslc_post_option['context'] = 'normal';
            }
            // If post options shown on multiple post types
            if (is_array($dslc_post_option['show_on'])) {
                // Loop through all post types
                foreach ($dslc_post_option['show_on'] as $dslc_post_option_show_on) {
                    // Add meta box for post type
                    add_meta_box($dslc_post_option_key, $dslc_post_option['title'], 'dslc_display_post_options', $dslc_post_option_show_on, $dslc_post_option['context'], 'high');
                }
                // If post options shown on single post type
            } else {
                // Add meta box to post type
                add_meta_box($dslc_post_option_key, $dslc_post_option['title'], 'dslc_display_post_options', $dslc_post_option['show_on'], $dslc_post_option['context'], 'high');
            }
        }
    }
}
Пример #4
0
 /**
  * Adds the author box container.
  */
 public function add_author_box($post_type)
 {
     $post_types = array('post', 'page');
     if (in_array($post_type, $post_types)) {
         add_meta_box('author_meta_box', __('Author of this article', 'myplugin_textdomain'), array($this, 'render_author_box'), $post_type, 'advanced', 'high');
     }
 }
/**
 * Init function.
 *
 * Enqueues styles and scripts on post edit page.
 *
 * @param type $post_type
 * @param type $post
 * @param type $groups
 * @param type $wpcf_active
 */
function wpcf_pr_admin_post_init_action($post_type, $post, $groups, $wpcf_active)
{
    // See if any data
    $has = wpcf_pr_admin_get_has($post_type);
    $belongs = wpcf_pr_admin_get_belongs($post_type);
    /*
     * Enqueue styles and scripts
     */
    if (!empty($has) || !empty($belongs)) {
        $output = wpcf_pr_admin_post_meta_box_output($post, array('post_type' => $post_type, 'has' => $has, 'belongs' => $belongs));
        add_meta_box('wpcf-post-relationship', __('Post Relationship', 'wpcf'), 'wpcf_pr_admin_post_meta_box', $post_type, 'normal', 'default', array('output' => $output));
        if (!empty($output)) {
            wp_enqueue_script('wpcf-post-relationship', WPCF_EMBEDDED_RELPATH . '/resources/js/post-relationship.js', array('jquery', 'select2'), WPCF_VERSION);
            wp_enqueue_style('wpcf-post-relationship', WPCF_EMBEDDED_RELPATH . '/resources/css/post-relationship.css', array(), WPCF_VERSION);
            if (!$wpcf_active) {
                wpcf_enqueue_scripts();
                wp_enqueue_style('wpcf-pr-post', WPCF_EMBEDDED_RES_RELPATH . '/css/fields-post.css', array(), WPCF_VERSION);
                wp_enqueue_script('wpcf-form-validation', WPCF_EMBEDDED_RES_RELPATH . '/js/' . 'jquery-form-validation/jquery.validate.min.js', array('jquery'), WPCF_VERSION);
                wp_enqueue_script('wpcf-form-validation-additional', WPCF_EMBEDDED_RES_RELPATH . '/js/' . 'jquery-form-validation/additional-methods.min.js', array('jquery'), WPCF_VERSION);
            }
            wpcf_admin_add_js_settings('wpcf_pr_del_warning', '\'' . __('Are you sure about deleting this post?', 'wpcf') . '\'');
            wpcf_admin_add_js_settings('wpcf_pr_pagination_warning', '\'' . __('If you continue without saving your changes, they might get lost.', 'wpcf') . '\'');
        }
    }
}
Пример #6
0
/**
 * Adds a box to the main column on the Post and Page edit screens.
 */
function meta_boxes_post_grid()
{
    $screens = array('post_grid');
    foreach ($screens as $screen) {
        add_meta_box('post_grid_metabox', __('Post Grid Options', 'post_grid'), 'meta_boxes_post_grid_input', $screen);
    }
}
Пример #7
0
/**
 * Adds a box to the main column on the Post and Page edit screens.
 */
function meta_boxes_accordions()
{
    $screens = array('accordions');
    foreach ($screens as $screen) {
        add_meta_box('accordions_metabox', __('Accordions Options', 'accordions'), 'meta_boxes_accordions_input', $screen);
    }
}
 function add_meta_box()
 {
     if (!$this->_model->has_newsletter()) {
         return false;
     }
     add_meta_box('eab-email-newsletter', __('e-Newsletter', Eab_EventsHub::TEXT_DOMAIN), array($this, 'create_meta_box'), 'incsub_event', 'side', 'low');
 }
Пример #9
0
function testimonial_add_meta_box()
{
    $screens = array('testimonial');
    foreach ($screens as $screen) {
        add_meta_box('myplugin_sectionid', __('Testimonial Fields', 'testimonial_meta_box'), 'testimonial_meta_box_callback', $screen);
    }
}
Пример #10
0
 function add_seo_meta_boxes()
 {
     $screens = array('post', 'page');
     foreach ($screens as $screen) {
         add_meta_box('op_seo_meta_box', __('SEO', OP_SN), array($this, 'meta_box'), $screen);
     }
 }
Пример #11
0
/**
 * Rename the 'Comments' meta box to 'User Contributed Notes' for reference-editing screens.
 *
 * @param string  $post_type Post type.
 * @param WP_Post $post      WP_Post object for the current post.
 */
function rename_comments_meta_box($post_type, $post)
{
    if (is_parsed_post_type($post_type)) {
        remove_meta_box('commentsdiv', $post_type, 'normal');
        add_meta_box('commentsdiv', __('User Contributed Notes', 'wporg'), 'post_comment_meta_box', $post_type, 'normal', 'high');
    }
}
Пример #12
0
function pt_layouts_metabox()
{
    $screens = array('post', 'page');
    foreach ($screens as $screen) {
        add_meta_box('layout_id', __('Layout Settings', 'plumtree'), 'pt_layout_metabox_contents', $screen, 'side');
    }
}
function pt_add_custom_box()
{
    if (get_post_templates() && function_exists('add_meta_box')) {
        add_meta_box('pt_post_templates', __('Single Post Template', 'pt'), 'pt_inner_custom_box', 'post', 'normal', 'high');
        //add the boxes under the post
    }
}
 public function page_init()
 {
     global $klikbayi_settings, $klikbayi_sanitize;
     $this->options = $klikbayi_settings;
     $this->groups = $this->mb_group();
     $this->default_setting = klikbayi_default_setting('reset');
     $this->url = klikbayi_url('url');
     $this->domain = klikbayi_url('domain');
     $this->blog = klikbayi_blog();
     $this->validate = $klikbayi_sanitize;
     $this->type = $this->validate->type_array();
     $this->style = $this->validate->style_array();
     $this->plugin_data = get_plugin_data(KLIKBAYI_PLUGIN_PATH . '/klikbayi.php');
     register_setting('option_klikbayi', 'klikbayi_option', array($this, 'sanitize'));
     foreach ($this->groups as $t => $arr) {
         add_settings_section('setting_section_' . $t, '', array($this, 'print_section_info_' . $t), 'klikbayi_option_' . $t);
         add_meta_box('meta-box-' . $t, __($arr[0], 'klikbayi'), array($this, 'box_' . $t), 'klikbayi_option_' . $t, 'normal', 'high');
         foreach ($arr[1] as $k => $v) {
             if ('shortcode' == $k || 'sidebar' == $k) {
                 continue;
             }
             add_settings_field($k, __($v, 'klikbayi'), array($this, $k . '_cb'), 'klikbayi_option_' . $t, 'setting_section_' . $t);
         }
     }
 }
 /**
  * Add meta boxes to primary options pages
  *
  * @return void
  */
 public function add_admin_meta_boxes()
 {
     $id = 'strong_passwords_options';
     $title = __('Strong Passwords', 'it-l10n-better-wp-security');
     add_meta_box($id, $title, array($this, 'metabox_strong_passwords_settings'), 'security_page_toplevel_page_itsec_settings', 'advanced', 'core');
     $this->core->add_toc_item(array('id' => $id, 'title' => $title));
 }
Пример #16
0
function add_map_meta_box()
{
    $screens = array('maps');
    foreach ($screens as $screen) {
        add_meta_box('map_point_maker', "Points Of Interest Map", 'map_meta_box_callback', $screen, 'normal');
    }
}
Пример #17
0
function asc_add_dashboard_widget($widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null)
{
    $screen = get_current_screen();
    global $asc_dashboard_control_callbacks;
    /*
    if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) {
    	$asc_dashboard_control_callbacks[$widget_id] = $control_callback;
    	if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) {
    		list($url) = explode( '#', add_query_arg( 'edit', false ), 2 );
    		$widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>';
    		$callback = '_asc_dashboard_control_callback';
    	} else {
    		list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 );
    		$widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>';
    	}
    }
    */
    $side_widgets = array('dashboard_revenue_last_10_days', 'dashboard_revenue_last_10_months');
    $location = 'normal';
    if (in_array($widget_id, $side_widgets)) {
        $location = 'side';
    }
    $priority = 'core';
    if ('dashboard_browser_nag' === $widget_id) {
        $priority = 'high';
    }
    add_meta_box($widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args);
}
/**
 * Register a new meta box to the post or page edit screen, so that the user can add landing section
 * on a per-post or per-page basis.
 */
function cuttz_add_landing_sections_meta_box()
{
    if (!current_theme_supports('cuttz-landing-sections')) {
        return;
    }
    global $post;
    if (get_option('show_on_front') == 'page') {
        $posts_page_id = get_option('page_for_posts');
        if ($posts_page_id == $post->ID) {
            add_action('edit_form_after_title', 'cuttz_landing_section_posts_notice');
            return;
        }
    }
    if (in_array('woocommerce/woocommerce.php', get_option('active_plugins'))) {
        if ($post->ID == wc_get_page_id('shop')) {
            add_action('edit_form_after_title', 'cuttz_landing_section_shop_notice');
            return;
        }
    }
    $context = 'normal';
    $priority = 'high';
    foreach ((array) get_post_types(array('public' => true)) as $type) {
        if (post_type_supports($type, 'cuttz-landing-sections')) {
            add_meta_box('landing-sections', __('Cuttz Landing Sections', 'cuttz-framework'), 'cuttz_landing_sections_box', $type, $context, $priority);
        }
    }
}
 function remove_dashboard_meta()
 {
     remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');
     remove_meta_box('dashboard_plugins', 'dashboard', 'normal');
     remove_meta_box('dashboard_primary', 'dashboard', 'side');
     remove_meta_box('dashboard_secondary', 'dashboard', 'normal');
     remove_meta_box('dashboard_quick_press', 'dashboard', 'side');
     remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side');
     remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
     remove_meta_box('dashboard_right_now', 'dashboard', 'normal');
     remove_meta_box('dashboard_activity', 'dashboard', 'normal');
     //since 3.8
     remove_meta_box('wpseo-dashboard-overview', 'dashboard', 'normal');
     remove_meta_box('rg_forms_dashboard', 'dashboard', 'normal');
     //gravityforms
     remove_meta_box('auth0_dashboard_widget_age', 'dashboard', 'normal');
     remove_meta_box('auth0_dashboard_widget_gender', 'dashboard', 'normal');
     remove_meta_box('auth0_dashboard_widget_income', 'dashboard', 'normal');
     remove_meta_box('auth0_dashboard_widget_signups', 'dashboard', 'normal');
     remove_meta_box('auth0_dashboard_widget_Location', 'dashboard', 'normal');
     remove_meta_box('auth0_dashboard_widget_idp', 'dashboard', 'normal');
     // We're using add_meta_box() instead of wp_add_dashboard_widget() so we can set positioning
     // http://wordpress.stackexchange.com/questions/69729/dashboard-widget-custom-positioning
     add_meta_box('dashboard_proud_welcome', 'Make your city proud', array($this, 'checklist'), 'dashboard', 'normal', 'high');
     add_meta_box('dashboard_proud_video', 'Player', array($this, 'video'), 'dashboard', 'side', 'high');
     add_meta_box('dashboard_proud_help', 'Get help', array($this, 'help'), 'dashboard', 'side', 'high');
     add_meta_box('dashboard_proud_news', 'Recent news', array($this, 'news'), 'dashboard', 'side', 'high');
 }
Пример #20
0
 public static function create_meta_boxes()
 {
     global $post, $campaign_data, $cfg;
     $campaign_data = WPeMatico::get_campaign($post->ID);
     //$campaign_data = self :: check_campaigndata($campaign_data);
     $cfg = get_option(WPeMatico::OPTION_KEY);
     $cfg = WPeMatico::check_options($cfg);
     //	add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args );
     add_meta_box('cron-box', __('Campaign Schedule', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'cron_box'), 'wpematico', 'side', 'default');
     add_meta_box('cat-box', __('Campaign Categories', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'cat_box'), 'wpematico', 'side', 'default');
     add_meta_box('tags-box', __('Tags generation', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'tags_box'), 'wpematico', 'side', 'default');
     add_meta_box('log-box', __('Send log', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'log_box'), 'wpematico', 'side', 'default');
     add_meta_box('feeds-box', __('Feeds for this Campaign', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'feeds_box'), 'wpematico', 'normal', 'default');
     add_meta_box('options-box', __('Options for this campaign', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'options_box'), 'wpematico', 'normal', 'default');
     add_meta_box('images-box', __('Options for images', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'images_box'), 'wpematico', 'normal', 'default');
     add_meta_box('template-box', __('Post Template', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'template_box'), 'wpematico', 'normal', 'default');
     if ($cfg['enableword2cats']) {
         // Si está habilitado en settings, lo muestra
         add_meta_box('word2cats-box', __('Word to Category options', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'word2cats_box'), 'wpematico', 'normal', 'default');
     }
     if ($cfg['enablerewrite']) {
         // Si está habilitado en settings, lo muestra
         add_meta_box('rewrite-box', __('Rewrite options', WPeMatico::TEXTDOMAIN), array('WPeMatico_Campaign_edit', 'rewrite_box'), 'wpematico', 'normal', 'default');
     }
     //***** Call nonstatic
     if ($cfg['nonstatic']) {
         NoNStatic::meta_boxes($campaign_data, $cfg);
     }
     // Publish Meta_box edited
     add_action('post_submitbox_start', array(__CLASS__, 'post_submitbox_start'));
 }
function clbc_add_post_meta_boxes()
{
    global $post;
    if (($post->post_status == 'publish' || $post->post_status == 'pending' || $post->post_status == 'draft') && current_user_can('edit_post', $post->ID)) {
        add_meta_box('clbc-collabo-comments', 'Collabo Comments', 'clbc_meta_box_callback', null, 'normal', 'default');
    }
}
 /**
  * Add Meta boxes
  */
 public function add_meta_boxes()
 {
     add_meta_box('sp_shortcodediv', __('Shortcode', 'prosports'), array($this, 'shortcode'), 'sp_tournament', 'side', 'default');
     add_meta_box('sp_detailsdiv', __('Details', 'prosports'), array($this, 'details'), 'sp_tournament', 'side', 'default');
     add_meta_box('sp_datadiv', __('Tournament', 'prosports'), array($this, 'data'), 'sp_tournament', 'normal', 'high');
     add_meta_box('sp_editordiv', __('Description', 'prosports'), array($this, 'editor'), 'sp_tournament', 'normal', 'low');
 }
 function add_meta_boxes()
 {
     add_meta_box('ssp_slides_meta_box', __('Slides', 'ssp'), array($this, 'slides_meta_box'), SLIDER_PLUGIN_SLIDER_POST_TYPE, 'normal', 'high');
     add_meta_box('ssp_custom_publish_meta_box', __('Save', 'ssp'), array($this, 'custom_publish_meta_box'), SLIDER_PLUGIN_SLIDER_POST_TYPE, 'side');
     add_meta_box('ssp_shortcode_meta_box', __('Shortcode', 'ssp'), array($this, 'shortcode_meta_box'), SLIDER_PLUGIN_SLIDER_POST_TYPE, 'side');
     add_meta_box('ssp_slider_options_metabox', __('Options', 'ssp'), array($this, 'options_meta_box'), SLIDER_PLUGIN_SLIDER_POST_TYPE);
 }
Пример #24
0
	public function jsComposerEditPage() {
		$pt_array = vc_editor_post_types();
		foreach ( $pt_array as $pt ) {
			add_meta_box( 'vc_teaser', __( 'VC: Custom Teaser', "js_composer" ), Array( &$this, 'outputTeaser' ), $pt, 'side' );
		}
		add_action( 'save_post', array( &$this, 'saveTeaserMetaBox' ) );
	}
Пример #25
0
function sidebar_select_meta_box_init()
{
    // Create our custom META box
    add_meta_box('sidebar-select-meta', __('Sidebar Select', 'sidebarselect-plugin'), 'sidebar_select_meta_box', 'page', 'side', 'high');
    // Hook to save meta box value
    add_action('save_post', 'sidebar_save_meta_box');
}
Пример #26
0
 public static function add_custom_box()
 {
     foreach (Finder::factory('language')->findAll() as $language) {
         $id = 'acellpress_' . $language->name;
         add_meta_box($id, __($language->name, $id), 'Language::language_form', 'testimonials', 'advanced', 'core', array($language->id));
     }
 }
Пример #27
0
    public function meta_box()
    {
        add_action('add_meta_boxes', function () {
            // css id, title, cb func, page, priority, cb func arug
            add_meta_box("address", "Address", "address", "mjs_testimonial");
        });
        function address($post)
        {
            $meta_biography = get_post_meta($post->ID, 'mjs_address', true);
            ?>

        <p>

            <label for="gsize">Address</label>

            <input class="widefat" type="text" name="mjs_address" id="address" value="<?php 
            echo $meta_biography;
            ?>
" />

        </p>

        <?php 
        }
        add_action('save_post', function ($id) {
            if (isset($_POST['mjs_address'])) {
                update_post_meta($id, 'mjs_address', strip_tags($_POST['mjs_address']));
            }
        });
    }
Пример #28
0
function hupso_add_custom_box()
{
    $screens = array('post', 'page');
    foreach ($screens as $screen) {
        add_meta_box('', 'Hupso Share Buttons', 'hupso_inner_custom_box', $screen, 'side');
    }
}
Пример #29
0
/**
 * Set up the placeholder metaboxes for Pitch's slide
 */
function pitch_add_slide_metabox()
{
    if (defined('SITEORIGIN_IS_PREMIUM')) {
        return;
    }
    add_meta_box('pitch_slide_destination', __('Destination', 'pitch'), 'pitch_slide_destination_metabox', 'slide', 'side');
}
Пример #30
0
 function the_monday_sidebar_layout()
 {
     add_meta_box('the_monday_page_sidebar_settings', __('Sidebar Layout', 'the-monday'), 'the_monday_page_sidebar_settings_callback', 'post', 'normal', 'high');
     // $priority
     add_meta_box('the_monday_page_sidebar_settings', __('Sidebar Layout', 'the-monday'), 'the_monday_page_sidebar_settings_callback', 'page', 'normal', 'high');
     // $priority
 }