first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* WPML_TM_Reset_Options_Filter_Factory class file.
|
||||
*
|
||||
* @package WPML\TM
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPML_TM_Reset_Options_Filter_Factory
|
||||
*/
|
||||
class WPML_TM_Reset_Options_Filter_Factory implements IWPML_Backend_Action_Loader {
|
||||
|
||||
/**
|
||||
* Create reset options filter.
|
||||
*
|
||||
* @return WPML_TM_Reset_Options_Filter
|
||||
*/
|
||||
public function create() {
|
||||
|
||||
return new WPML_TM_Reset_Options_Filter();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* WPML_TM_Reset_Options_Filter class file
|
||||
*
|
||||
* @package WPML\TM
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPML_TM_Reset_Options_Filter
|
||||
*/
|
||||
class WPML_TM_Reset_Options_Filter implements IWPML_Action {
|
||||
|
||||
/**
|
||||
* Add hooks
|
||||
*/
|
||||
public function add_hooks() {
|
||||
add_filter( 'wpml_reset_options', array( $this, 'reset_options' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add options to reset.
|
||||
*
|
||||
* @param array $options Options.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function reset_options( array $options ) {
|
||||
$options[] = WPML_TM_Wizard_Options::WIZARD_COMPLETE_FOR_MANAGER;
|
||||
$options[] = WPML_TM_Wizard_Options::WIZARD_COMPLETE_FOR_ADMIN;
|
||||
$options[] = WPML_TM_Wizard_Options::CURRENT_STEP;
|
||||
$options[] = WPML_TM_Wizard_Options::WHO_WILL_TRANSLATE_MODE;
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user