Skip to content

Commit

Permalink
Add support to interact with selected DIY theme settings
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Aug 26, 2024
1 parent fe195d1 commit 8d8531d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions includes/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,23 @@ public static function get_flow_default_theme_slug( $flow ) {
public static function get_active_theme() {
return ( \wp_get_theme() )->get( 'TextDomain' );
}

/**
* Retrieves the selected DIY theme settings.
*
* @return mixed The stored DIY theme settings, or false if the option does not exist.
*/
public static function get_selected_diy_theme_settings() {
return get_option( Options::get_option_name( 'theme_settings' ) );
}

/**
* Updates the DIY theme settings.
*
* @param array $settings The new theme settings to store.
* @return bool True if the option value has changed, false if not or if an error occurred.
*/
public static function set_diy_theme_settings( $settings ) {
return update_option( Options::get_option_name( 'theme_settings' ), $settings );
}
}

0 comments on commit 8d8531d

Please sign in to comment.