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