get_columns example

submit_button( __( 'Save Changes' ) );
    echo '</form>';
}

/** * Displays the dashboard. * * @since 2.5.0 */
function wp_dashboard() {
    $screen      = get_current_screen();
    $columns     = absint( $screen->get_columns() );
    $columns_css = '';

    if ( $columns ) {
        $columns_css = " columns-$columns";
    }
    ?> <div id="dashboard-widgets" class="metabox-holder<?php echo $columns_css; ?>"> <div id="postbox-container-1" class="postbox-container"> <?php do_meta_boxes( $screen->id, 'normal', '' ); ?> </div> <div id="postbox-container-2" class="postbox-container">
return array();
    }

    /** * Gets the name of the default primary column. * * @since 4.3.0 * * @return string Name of the default primary column, in this case, an empty string. */
    protected function get_default_primary_column_name() {
        $columns = $this->get_columns();
        $column  = '';

        if ( empty( $columns ) ) {
            return $column;
        }

        /* * We need a primary defined so responsive views show something, * so let's fall back to the first non-checkbox column. */
        foreach ( $columns as $col => $column_name ) {
            

do_action( 'edit_form_top', $post );
?> <div id="poststuff"> <div id="post-body" class="metabox-holder columns-<?php echo ( 1 === get_current_screen()->get_columns() ) ? '1' : '2'; ?>"> <div id="post-body-content"> <?php if ( post_type_supports( $post_type, 'title' ) ) { ?> <div id="titlediv"> <div id="titlewrap"> <?php     /** * Filters the title field placeholder text. * * @since 3.1.0 * * @param string $text Placeholder text. Default 'Add title'. * @param WP_Post $post Post object. */
/** * Renders the option for number of columns on the page. * * @since 3.3.0 */
    public function render_screen_layout() {
        if ( ! $this->get_option( 'layout_columns' ) ) {
            return;
        }

        $screen_layout_columns = $this->get_columns();
        $num                   = $this->get_option( 'layout_columns', 'max' );

        ?> <fieldset class='columns-prefs'> <legend class="screen-layout"><?php _e( 'Layout' ); ?></legend> <?php for ( $i = 1; $i <= $num; ++$i ) : ?> <label class="columns-prefs-<?php echo $i; ?>"> <input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>' <?php checked( $screen_layout_columns$i ); ?> /> <?php                 printf(
                    /* translators: %s: Number of columns on the page. */
                    
if ( ! empty( $link_added ) ) {
    echo $link_added;
}

wp_nonce_field( $nonce_action );
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
?> <div id="poststuff"> <div id="post-body" class="metabox-holder columns-<?php echo ( 1 === get_current_screen()->get_columns() ) ? '1' : '2'; ?>"> <div id="post-body-content"> <div id="namediv" class="postbox"> <h2 class="postbox-header"><label for="link_name"><?php _ex( 'Name', 'link name' ); ?></label></h2> <div class="inside"> <input type="text" name="link_name" size="30" maxlength="255" value="<?php echo esc_attr( $link->link_name ); ?>" id="link_name" /> <p><?php _e( 'Example: Nifty blogging software' ); ?></p> </div> </div> <div id="addressdiv" class="postbox"> <h2 class="postbox-header"><label for="link_url"><?php _e( 'Web Address' ); ?></label></h2> <div class="inside"> <input type="text" name="link_url" size="30" maxlength="255" class="code" value="
Home | Imprint | This part of the site doesn't use cookies.