Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_the_categories

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
83      }
84
85      /**
86       * Filter the array of categories to return for a post.
87       *
88       * @since 3.1.0
89       *
90       * @param array $categories An array of categories to return for the post.
91       */
92      return apply_filters( 'get_the_categories', $categories );
93 }
94
95 /**
96  * Sort categories by name.
97  *
98  * Used by usort() as a callback, should not be used directly. Can actually be
99  * used to sort any term object.
100  *
101  * @since 2.3.0