WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
836 | * This hook provides back-compat for plugins using the back-compat |
837 | * Filters instead of add_screen_option(). |
838 | * |
839 | * @since 2.8.0 |
840 | * |
841 | * @param array $empty_columns Empty array. |
842 | * @param string $screen_id Screen ID. |
843 | * @param WP_Screen $this Current WP_Screen instance. |
844 | */ |
845 | $columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this ); |
846 |
|
847 | if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) ) |
848 | $this->add_option( 'layout_columns', array('max' => $columns[ $this->id ] ) ); |
849 |
|
850 | if ( $this->get_option( 'layout_columns' ) ) { |
851 | $this->columns = (int) get_user_option("screen_layout_$this->id"); |
852 |
|
853 | if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) ) |
854 | $this->columns = $this->get_option( 'layout_columns', 'default' ); |