All good WordPress themes provide customization options through the WordPress Customizer and Genesis themes are no exception.
Unlike other themes, however, Genesis provides a way to check if the website is currently being previewed through the Customizer. You can use this feature to change the way the site appears when in preview mode, or even remove design elements that you do not want to be editable.
The function to check whether the Customizer is currently in use is
The below example uses
genesis_is_customizer to prevent the user from editing sidebar widgets via the Customizer.
This function does not accept arguments.
genesis_is_customizer returns true if the website is currently being previewed through the Customizer, and false if not.
There are no filters on the output of this function.
genesis_is_customizer has been included since version 2.0.0.
genesis_is_customizer is located in lib/functions/general.php.