PLL_Settings_Translate_Slugs

Settings class to advertize the Translate slugs module.

Defined (1)

The class is defined in the following location(s).

/modules/translate-slugs/settings-translate-slugs.php  
  1. class PLL_Settings_Translate_Slugs extends PLL_Settings_Module { 
  2. /** 
  3. * constructor 
  4. * @since 1.9 
  5. * @param object $polylang polylang object 
  6. */ 
  7. public function __construct( &$polylang ) { 
  8. parent::__construct( $polylang, array( 
  9. 'module' => 'translate-slugs',  
  10. 'title' => __( 'Translate slugs', 'polylang' ),  
  11. 'description' => __( 'Allows to translate custom post types and taxonomies slugs in urls.', 'polylang' ),  
  12. ) ); 
  13.  
  14. /** 
  15. * tells if the module is active 
  16. * @since 1.9 
  17. * @return bool 
  18. */ 
  19. public function is_active() { 
  20. return class_exists( 'PLL_Translate_Slugs_Model', true ) && get_option( 'permalink_structure' ); 
  21.  
  22. /** 
  23. * displays upgrade message 
  24. * @since 1.9 
  25. * @return string 
  26. */ 
  27. public function get_upgrade_message() { 
  28. return class_exists( 'PLL_Translate_Slugs_Model', true ) ? '' : $this->default_upgrade_message();