Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: screen_layout_columns

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
845                               endforeach;
846                               ?>
847                          </div>
848                     </div>
849                </div>
850           <?php
851           // Setup layout columns
852
853           // Back compat for plugins using the filter instead of add_screen_option()
854           $columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this );
855
856           if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) )
857                $this->add_option( 'layout_columns', array('max' => $columns[ $this->id ] ) );
858
859           if ( $this->get_option( 'layout_columns' ) ) {
860                $this->columns = (int) get_user_option("screen_layout_$this->id");
861
862                if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) )
863                     $this->columns = $this->get_option( 'layout_columns', 'default' );