WPML.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\Options; |
| 4 | |
| 5 | use WPML\Settings\PostType\Automatic; |
| 6 | class WPML { |
| 7 | |
| 8 | public static function setAutomatic( $postType, $state ) { |
| 9 | if ( method_exists( Automatic::class, 'set' ) ) { |
| 10 | Automatic::set( $postType, $state ); |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | public static function isAutomatic( $postType ) { |
| 15 | if ( method_exists( Automatic::class, 'isAutomatic' ) ) { |
| 16 | return Automatic::isAutomatic( $postType ); |
| 17 | } |
| 18 | |
| 19 | return false; |
| 20 | } |
| 21 | |
| 22 | public static function useAte() { |
| 23 | return method_exists( \WPML_TM_ATE_Status::class, 'is_enabled_and_activated' ) |
| 24 | && \WPML_TM_ATE_Status::is_enabled_and_activated(); |
| 25 | } |
| 26 | } |
| 27 |