|

srfm_languages_directory

Description

The ‘srfm_languages_directory‘ is a filter hook that lets you change the path to the languages directory used by SureForms. You can use this to set a custom location for your plugin’s language files.

Parameters

  • $lang_dir (string) – The path to the languages directory.

Filter Source

PHP
/**
* filter source
*/
apply_filters( ‘srfm_languages_directory’, $lang_dir );

Filter Usage

PHP
add_filter(‘srfm_languages_directory’, 'your_custom_function', 10, 1);

function your_custom_function( $lang_dir )
{
   //Add code here
   return $lang_dir;
}

Filter Example

PHP
add_filter(‘srfm_languages_directory’, your_custom_function, 10, 1);

function your_custom_function( $lang_dir )
{
        if ( empty( $lang_dir ) ) {
                return $lang_dir;
        }
          //Add code here
        return $lang_dir
}
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Scroll to Top