'none' ) );
if ( get_option( 'permalink_structure' ) ) {
add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) );
}
}
/**
* Returns the module description.
*
* @since 3.1
*
* @return string
*/
protected function get_description() {
return parent::get_description() . ' ' . __( 'The module is automatically deactivated when using plain permalinks or when the language is set from the content in the URL modifications.', 'polylang-pro' );
}
/**
* Tells if the module is active.
*
* @since 1.9
*
* @return bool
*/
public function is_active() {
return $this->options['force_lang'] && get_option( 'permalink_structure' );
}
/**
* Displays the javascript to handle dynamically the change in url modifications
* as sharing slugs is not possible when the language is set from the content
*
* @since 1.9
*
* @return void
*/
public function print_js() {
wp_enqueue_script( 'jquery' );
$activated = sprintf( '%s', $this->action_links['activated'] );
$deactivated = sprintf( '%s', $this->action_links['deactivated'] );
?>