pll_copy_post_metas
Filter the custom fields to copy or synchronize.
Description
Parameters (2)
- 0. $keys (unknown) =>
empty( $keys ) ? array() : $keys
- The empty.
- 1. $false (bool) =>
false )
- The false.
Usage
- To run the hook, copy the example below.
- $keys = apply_filters( 'pll_copy_post_metas', $keys, $false );
- if ( !empty( $keys ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the pll_copy_post_metas callback
- function filter_pll_copy_post_metas( $keys, $false ) {
- // make filter magic happen here...
- return $keys;
- };
- // add the filter
- add_filter( 'pll_copy_post_metas', 'filter_pll_copy_post_metas', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'pll_copy_post_metas', 'filter_pll_copy_post_metas', 10, 2 );
Defined (2)
The filter is defined in the following location(s).
- /modules/wpml/wpml-legacy-api.php
- $arr['fields'] = array_unique( apply_filters( 'pll_copy_post_metas', empty( $keys ) ? array() : $keys, false ) );
- /modules/sync/admin-sync.php
- $keys = array_unique( apply_filters( 'pll_copy_post_metas', $keys, $sync, $from, $to, $lang ) );