Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_privacy_personal_data_exporters

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
4789       *
4790       *         @type callable $callback               Callable exporter function that accepts an
4791       *                                                email address and a page and returns an array
4792       *                                                of name => value pairs of personal data.
4793       *         @type string   $exporter_friendly_name Translated user facing friendly name for the
4794       *                                                exporter.
4795       *     }
4796       * }
4797       */
4798      $exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() );
4799
4800      if ( ! is_array( $exporters ) ) {
4801           wp_send_json_error( __( 'An exporter has improperly used the registration filter.' ) );
4802      }
4803
4804      // Do we have any registered exporters?
4805      if ( 0 < count( $exporters ) ) {
4806           if ( $exporter_index < 1 ) {
4807                wp_send_json_error( __( 'Exporter index cannot be negative.' ) );