mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-28 11:22:21 +08:00
24 lines
736 B
Text
24 lines
736 B
Text
function cpro_callback_function( $display, $style_id ) {
|
|
|
|
if( $display ) {
|
|
// Replace call-to-action id with your call-to-action ID
|
|
if( '31' == $style_id ) {
|
|
|
|
if( defined( 'ICL_LANGUAGE_CODE' ) ) {
|
|
|
|
// get current language code
|
|
$language_code = ICL_LANGUAGE_CODE;
|
|
|
|
// replace fr with your language code
|
|
if( 'fr' == $language_code ) {
|
|
$display = true;
|
|
} else {
|
|
$display = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return $display;
|
|
}
|
|
add_filter( 'cp_pro_target_page_settings', 'cpro_callback_function', 10, 3 );
|