pods_data_query
The Pods - Custom Content Types and Fields pods data query hook.
Description
Parameters (2)
- 0. $params_sql (unknown)
- The params sql.
- 1. $params (unknown)
- The params.
Usage
- To run the hook, copy the example below.
- $params_sql = apply_filters( 'pods_data_query', $params_sql, $params );
- if ( !empty( $params_sql ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the pods_data_query callback
- function filter_pods_data_query( $params_sql, $params ) {
- // make filter magic happen here...
- return $params_sql;
- };
- // add the filter
- add_filter( 'pods_data_query', 'filter_pods_data_query', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'pods_data_query', 'filter_pods_data_query', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /classes/PodsData.php
- $params->sql = apply_filters( 'pods_data_query', $params->sql, $params );