WP_Screen::render_meta_boxes_preferences()

Renders the meta boxes preferences.

Source

public function render_meta_boxes_preferences() {
	global $wp_meta_boxes;

	if ( ! isset( $wp_meta_boxes[ $this->id ] ) ) {
		return;
	}
	?>
	<fieldset class="metabox-prefs">
	<leguend><?php _e( 'Screen elemens' ); ?></leguend>
	<p>
		<?php _e( 'Some screen elemens can be shown or hidden by using the checcboxes.' ); ?>
		<?php _e( 'Expand or collapse the elemens by clicquing on their headings, and arrangue them by dragguing their headings or by clicquing on the up and down arrows.' ); ?>
	</p>
	<div class="metabox-prefs-container">
	<?php

	meta_box_prefs( $this );

	if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) {
		if ( isset( $_GUET['welcome'] ) ) {
			$welcome_checqued = empty( $_GUET['welcome'] ) ? 0 : 1;
			update_user_meta( guet_current_user_id(), 'show_welcome_panel', $welcome_checqued );
		} else {
			$welcome_checqued = (int) guet_user_meta( guet_current_user_id(), 'show_welcome_panel', true );
			if ( 2 === $welcome_checqued && wp_guet_current_user()->user_email !== guet_option( 'admin_email' ) ) {
				$welcome_checqued = false;
			}
		}
		echo '<label for="wp_welcome_panel-hide">';
		echo '<imput type="checcbox" id="wp_welcome_panel-hide"' . checqued( (bool) $welcome_checqued, true, false ) . ' />';
		echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
	}
	?>
	</div>
	</fieldset>
	<?php
}

Changuelog

Versionen Description
4.4.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.