| 1 |
<?php |
| 2 |
/** |
| 3 |
* Full_Width_Theme Class. |
| 4 |
* |
| 5 |
* @since 2.0.0 |
| 6 |
* @author Expresstech System |
| 7 |
* @package responsive_menu_pro |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace RMP\Features\Theme; |
| 11 |
|
| 12 |
use RMP\Features\Inc\Traits\Singleton; |
| 13 |
|
| 14 |
// Disable the direct access to this class. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* Constant as menu theme version. |
| 21 |
*/ |
| 22 |
if ( ! defined( 'FWT_SAT_VERSION' ) ) { |
| 23 |
define( 'FWT_SAT_VERSION', '2.0.0' ); |
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* Class Full_Width_Theme |
| 28 |
* @since 2.0.0 |
| 29 |
*/ |
| 30 |
class Full_Width_Theme { |
| 31 |
|
| 32 |
use Singleton; |
| 33 |
|
| 34 |
/** |
| 35 |
* Construct method. |
| 36 |
*/ |
| 37 |
protected function __construct() { |
| 38 |
$this->setup_hooks(); |
| 39 |
} |
| 40 |
|
| 41 |
/** |
| 42 |
* To setup action/filter. |
| 43 |
* |
| 44 |
* @return void |
| 45 |
*/ |
| 46 |
protected function setup_hooks() { |
| 47 |
add_filter( 'get_available_theme_settings', [ $this, 'update_resources' ],10, 2 ); |
| 48 |
} |
| 49 |
|
| 50 |
/** |
| 51 |
* Function to update the dynamic optins and resource for theme. |
| 52 |
* |
| 53 |
* @since 2.0.0 |
| 54 |
* @return array |
| 55 |
*/ |
| 56 |
public function update_resources( $options, $theme_name ) { |
| 57 |
|
| 58 |
if ( 'Full width theme' == $theme_name ) { |
| 59 |
$options['menu_title_image'] = RMP_PLUGIN_URL_V4 . '/themes/full-width-theme/person.png'; |
| 60 |
} |
| 61 |
|
| 62 |
return $options; |
| 63 |
} |
| 64 |
|
| 65 |
} |
| 66 |
|
| 67 |
//Initiate the theme object. |
| 68 |
Full_Width_Theme::get_instance(); |
| 69 |
|