From 849ce35cb9c9bbd8e869f606dd27e2200396c665 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 3 Mar 2014 17:20:16 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/includes/misc.php. Props JoshuaAbenazer. Fixes #26186 Built from https://develop.svn.wordpress.org/trunk@27375 git-svn-id: http://core.svn.wordpress.org/trunk@27224 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/misc.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index cf7dcb255f..3c341ba64c 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -27,7 +27,7 @@ function got_mod_rewrite() { * @since 2.5.0 * @param bool $got_rewrite Whether Apache and mod_rewrite are present. */ - return apply_filters('got_rewrite', $got_rewrite); + return apply_filters( 'got_rewrite', $got_rewrite ); } /** @@ -334,7 +334,16 @@ function wp_doc_link_parse( $content ) { $functions = array_unique( $functions ); sort( $functions ); + + /** + * Filter the list of functions/classes to be ignored from the documentation lookup. + * + * @since 2.8.0 + * + * @param array $ignore_functions Functions/Classes to be ignored. + */ $ignore_functions = apply_filters( 'documentation_ignore_functions', $ignore_functions ); + $ignore_functions = array_unique( $ignore_functions ); $out = array(); @@ -351,7 +360,7 @@ function wp_doc_link_parse( $content ) { * Saves option for number of rows when listing posts, pages, comments, etc. * * @since 2.8.0 -**/ + */ function set_screen_options() { if ( isset($_POST['wp_screen_options']) && is_array($_POST['wp_screen_options']) ) { @@ -394,7 +403,18 @@ function set_screen_options() { return; break; default: - $value = apply_filters('set-screen-option', false, $option, $value); + + /** + * Filter the default of number of rows value to use for item listings. + * + * @since 2.8.0 + * + * @param bool|int $value The number of rows value. Default false. + * @param string $option The option name. + * @param int $value The number of rows to use. + */ + $value = apply_filters( 'set-screen-option', false, $option, $value ); + if ( false === $value ) return; break;