pll_ajax_posts_not_translated_args
Filter the query args when auto suggesting untranslated posts in the Languages metabox This should help plugins to fix some edge cases.
Description
Parameters (1)
- 0. $args (array)
-
WP_Query
arguments
Usage
- To run the hook, copy the example below.
- $args = apply_filters( 'pll_ajax_posts_not_translated_args', $args );
- if ( !empty( $args ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the pll_ajax_posts_not_translated_args callback
- function filter_pll_ajax_posts_not_translated_args( $args ) {
- // make filter magic happen here...
- return $args;
- };
- // add the filter
- add_filter( 'pll_ajax_posts_not_translated_args', 'filter_pll_ajax_posts_not_translated_args', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'pll_ajax_posts_not_translated_args', 'filter_pll_ajax_posts_not_translated_args', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /admin/admin-filters-post.php
- $args = apply_filters( 'pll_ajax_posts_not_translated_args', $args );