Skip to content

Instantly share code, notes, and snippets.

@Codevz
Last active June 18, 2022 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Codevz/428b4dc7460e4682ea20db87a29b3148 to your computer and use it in GitHub Desktop.
Save Codevz/428b4dc7460e4682ea20db87a29b3148 to your computer and use it in GitHub Desktop.
XTRA WP Theme - Action hook after importing theme options from demo importer, https://xtratheme.com/
<?php
/**
* With this function you can modify imported theme options and change any options you want.
*
* @var $options = imported theme options array
*/
function my_prefix_after_import_theme_options( $options ) {
// Replace website logo after importing demo.
$options[ 'logo' ] = 'https://yoursite.com/new_logo.png';
// Update new options.
update_option( 'codevz_theme_options', $options );
}
add_action( 'codevz/importer/after_import_theme_options', 'my_prefix_after_import_theme_options' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment