Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_authentication_errors

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
131            * match the format used by API methods internally (that is, the `status`
132            * data should be used). A callback can return `true` to indicate that
133            * the authentication method was used, and it succeeded.
134            *
135            * @since 4.4.0
136            *
137            * @param WP_Error|null|bool WP_Error if authentication error, null if authentication
138            *                              method wasn't used, true if authentication succeeded.
139            */
140           return apply_filters( 'rest_authentication_errors', null );
141      }
142
143      /**
144       * Converts an error to a response object.
145       *
146       * This iterates over all error codes and messages to change it into a flat
147       * array. This enables simpler client behaviour, as it is represented as a
148       * list in JSON rather than an object/map.
149       *