Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_pre_insert_{$this->taxonomy}

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
662            * Filters term data before inserting term via the REST API.
663            *
664            * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
665            *
666            * @since 4.7.0
667            *
668            * @param object          $prepared_term Term object.
669            * @param WP_REST_Request $request       Request object.
670            */
671           return apply_filters( "rest_pre_insert_{$this->taxonomy}", $prepared_term, $request );
672      }
673
674      /**
675       * Prepares a single term output for response.
676       *
677       * @since 4.7.0
678       *
679       * @param obj             $item    Term object.
680       * @param WP_REST_Request $request Request object.