Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$option}

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
3781           else
3782                $per_page = 20;
3783      }
3784
3785      if ( 'edit_comments_per_page' == $option )
3786           $per_page = apply_filters( 'comments_per_page', $per_page, isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all' );
3787      elseif ( 'categories_per_page' == $option )
3788           $per_page = apply_filters( 'edit_categories_per_page', $per_page );
3789      else
3790           $per_page = apply_filters( $option, $per_page );
3791
3792      $return = "<div class='screen-options'>\n";
3793      if ( !empty($per_page_label) )
3794           $return .= "<input type='text' class='screen-per-page' name='wp_screen_options[value]' id='$option' maxlength='3' value='$per_page' /> <label for='$option'>$per_page_label</label>\n";
3795      $return .= "<input type='submit' class='button' value='" . esc_attr__('Apply') . "' />";
3796      $return .= "<input type='hidden' name='wp_screen_options[option]' value='" . esc_attr($option) . "' />";
3797      $return .= "</div>\n";
3798      return $return;
3799 }