Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: postmeta_form_limit

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
1048                FROM $wpdb->postmeta
1049                GROUP BY meta_key
1050                ORDER BY meta_key" );
1051
1052      return $keys;
1053 }
1054
1055 function meta_form() {
1056      global $wpdb;
1057      $limit = (int) apply_filters( 'postmeta_form_limit', 30 );
1058      $keys = $wpdb->get_col( "
1059           SELECT meta_key
1060           FROM $wpdb->postmeta
1061           GROUP BY meta_key
1062           ORDER BY meta_id DESC
1063           LIMIT $limit" );
1064      if ( $keys )
1065           natcasesort($keys);
1066 ?>