: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<!------------------------------------------------------------------------------------>
<div id="setting" class="maintab">
<div class="search-setting-holder">
<label for="search-setting" class="search-icon"><?php echo themify_get_icon('search','ti')?></label>
<input id="search-setting" type="text" class="search-setting" name="search-setting">
<span class="clear-search"><?php echo themify_get_icon('close','ti')?></span>
foreach($themify_config['panel']['settings']['tab'] as $tab):?>
<?php if ( isset( $tab['id'] )):?>
<li<?php if( $x===true):?> class="selected"<?php $x = false;?><?php endif;?>><a href="<?php esc_attr_e( '#setting-' . themify_scrub_func( $tab['id'] ) )?>"><?php echo $tab['title']?></a></li>
<?php $themify_settings_notice = false; ?>
<?php foreach($themify_config['panel']['settings']['tab'] as $tab){ ?>
<!-- subtab: setting-<?php echo themify_scrub_func($tab['id']); ?> -->
<div id="<?php echo esc_attr( 'setting-' . themify_scrub_func( $tab['id'] ) ); ?>" class="subtab">
if(is_array($tab['custom-module'])){
if(isset($tab['custom-module']['title'],$tab['custom-module']['function']) ){
echo themify_fieldset( $tab['custom-module']['title'], $tab['custom-module']['function'], $tab['custom-module'] );
foreach($tab['custom-module'] as $module){
$wrap = ( ! isset( $module['wrap'] ) || $module['wrap'] ) ? true : false;
echo themify_fieldset( $module['title'], $module['function'], $module, $wrap );
if ( ! $themify_settings_notice ) :
<div class="themify-info-link"><?php printf( __( 'For more info about the options below, refer to the <a href="%s">General Settings</a> documentation.', 'themify' ), 'https://themify.me/docs/general-settings' ); ?></div>
$themify_settings_notice = true;
endif; // themify settings notice
if (themify_scrub_func($tab['id'])== 'default_layouts') {
echo '<div class="themify-info-link">' . __( 'Here you can set the <a href="https://themify.me/docs/default-layouts">Default Layouts</a> for WordPress archive post layout (category, search, archive, tag pages, etc.), single post layout (single post page), and the static Page layout. The default single post and page layout can be override individually on the post/page > edit > Themify Custom Panel.', 'themify' ) . '</div>';
<!-- /subtab: setting-<?php echo themify_scrub_func($tab['id']); ?> -->
</div><!--/setting tab -->
<!------------------------------------------------------------------------------------>
if ( ! empty( $themify_skins ) ) : ?>
<div id="skins" class="maintab">
<li class="selected"><a href="#setting-general"><?php _e('Skins', 'themify'); ?></a></li>
<div id="load-load" class="subtab">
<?php if( $skins_and_demos ) : ?>
<div class="themify-info-link"><?php _e( 'Select a skin and import the demo content (demo import is optional). Importing the demo content will override your Themify settings, menu and widget settings. It will also add the content (posts, pages, widgets, menus, etc.) to your site as per our demo setup. It is recommend to do on a fresh/development site. Erase demo will delete all the imported posts/pages (either modified or unmodified). Themify panel settings, user’s created content, and widgets will not be removed.', 'themify' ); ?></div>
<div class="themify-skins">
<input type="hidden" name="skin" value="<?php echo themify_get( 'skin','',true ); ?>">
<?php echo themify_get_skins_admin(); ?>
<!------------------------------------------------------------------------------------>
<div id="transfer" class="maintab">
<li><a href="#transfer-import"><?php _e( 'Theme Settings', 'themify' ); ?></a></li>
<div id="transfer-import" class="subtab">
<div class="themify-info-link"><?php _e( 'Click "Export" to export the Themify panel data which you can use to import in the future by clicking the "Import" button. Note: this will only export/import the data within the Themify panel (the WordPress settings, widgets, content, comments, page/post settings, etc. are not included).', 'themify' ) ?></div>
<div class="biggest-transfer-btn">
<a class="themify_button big-button" id="tf_import_settings"
data-msg-confirm="<?php esc_attr_e( 'Import will overwrite all settings and configurations. Press OK to continue, Cancel to stop.', 'themify' ); ?>"
data-msg-invalid="<?php esc_attr_e( 'Invalid file format. Please upload .txt or .zip file containing the exported data.', 'themify' ); ?>"
data-msg-error="<?php esc_attr_e( 'Failed to import, please try again later.', 'themify' ); ?>"
data-msg-importing="<?php esc_attr_e( 'Importing...', 'themify' ); ?>"
data-nonce="<?php esc_attr_e( wp_create_nonce( 'themify_import_settings' ) ); ?>"
><?php _e( 'Import', 'themify' ); ?></a>
<em><?php _e('or', 'themify'); ?></em>
<a href="#" class="themify_button big-button" id="tf_export_settings" data-nonce="<?php esc_attr_e( wp_create_nonce( 'themify_export_settings' ) ); ?>" data-filename="<?php echo esc_attr( $theme->display('Name') . '_themify_export_' . date('Y_m_d') ); ?>"><?php _e('Export', 'themify'); ?></a>
<?php if( ! $skins_and_demos ) : ?>
<div id="demo-import" class="maintab">
<li><a href="#demo-import"><?php _e( 'Demo Import', 'themify' ); ?></a></li>
<div id="demo-import" class="subtab demo-import-main">
<a href="#" class="themify_button big-button import-sample-content" data-plugins="<?php echo esc_attr(themify_get_theme_required_plugins()); ?>" data-default="<?php _e( 'Import Demo', 'themify' ); ?>" data-success="<?php _e( 'Done', 'themify' ); ?>" data-importing="<?php _e( 'Importing', 'themify' ) ?>"> <i class="ti-arrow-down"></i> <span><?php _e( 'Import Demo', 'themify' ); ?></span> </a>
<p><?php _e( 'Import demo will replicate your site like our demo setup.', 'themify' ); ?> <br><br>
<small><?php _e( 'WARNING: Importing the demo content will override your Themify settings, menu and widget settings. It will also add the content (posts, pages, widgets, menus, etc.) to your site as per our demo setup. It is recommend to do on a fresh/development site.', 'themify' ); ?></small></p>
<a href="#" class="themify_button big-button erase-sample-content" data-default="<?php _e( 'Erase Demo', 'themify' ); ?>" data-erasing="<?php _e( 'Erasing', 'themify' ); ?>" data-success="<?php _e( 'Done', 'themify' ); ?>"> <i class="tf_close"></i> <span><?php _e( 'Erase Demo', 'themify' ); ?></span> </a>
<p><small><?php _e( 'Erase demo will delete all the imported posts/pages (either modified or unmodified). Themify panel settings, user’s created content, and widgets will not be removed. You may import the content again later.', 'themify' ); ?></small></p>
<?php if ( themify_allow_update() ) : ?>
<!--update theme/framework tab -->
<div id="update-check" class="maintab">
<li><a href="#update-main"><?php _e( 'Update', 'themify' ); ?></a></li>
<li><a href="#child-theme"><?php _e( 'Child Theme', 'themify' ); ?></a></li>
<div id="update-main" class="subtab update-main">
<?php if ( defined('THEMIFY_UPDATER') ) :
$updater = Themify_Updater::get_instance();
$theme = is_child_theme() ? $theme->parent() : $theme;
if ( ! method_exists($updater, 'themify_reinstall_theme') ) : ?>
<?php _e( 'For theme re-installation feature, please update the Themify Updater plugin to latest version.', 'themify' ); ?>
elseif ( $updater->has_error() && !$updater->has_attribute( $theme->stylesheet, 'free') ) :
printf( __('Error: please check <a class="license-link" data-src="update" href="#">Themify License</a> settings.', 'themify'));
$updater->themify_reinstall_theme( $theme->stylesheet );
if(!empty($GLOBALS['tgmpa'])){
$tgmpa_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
$action = ! $tgmpa_instance->is_plugin_installed( 'themify-updater' )?'install':'activate';
$ajax_url = wp_nonce_url(
'plugin' => urlencode( 'themify-updater' ),
'tgmpa-' . $action => $action . '-plugin',
$tgmpa_instance->get_tgmpa_url()
$url=admin_url( 'admin.php?page=themify-install-plugins' );
<?php printf( __( 'To update theme automatically, please activate <a class="themify-ajax-installer" href="%s"%s>Themify Updater</a> plugin and insert your Themify username/license key.', 'themify' ), $url,('#'!==$url ? ' target="_blank" rel="noopener"' : ' data-ajax="'.esc_url($ajax_url).'"') ); ?>
<div id="child-theme" class="subtab">
<?php if ( is_child_theme() ) : ?>
<p><?php echo themify_get_icon( 'far thumbs-up' ); ?> <?php _e( 'You\'re already using a child theme. Well done!', 'themify' ); ?></p>
<?php Themify_Child_Theme_Generator::form(); ?>
<!--/update theme/framework tab -->
<?php endif; // user can update_themes ?>
<!------------------------------------------------------------------------------------>
<?php if( get_option( get_template() . '_themify_import_notice', 1 ) ) : ?>
<div id="demo-import-notice" class="themify-modal tf_scrollbar">
<?php if ( ! is_child_theme() ) : ?>
<?php Themify_Child_Theme_Generator::form(); ?>
<?php if( $skins_and_demos ) : ?>
<h3><?php _e( 'Skins & Demos', 'themify' ); ?></h3>
<p><?php _e( 'Select a skin and import the demo content as per our demo (optional). You can do this later at the Skins & Demos tab.', 'themify' ); ?></p>
<div class="skins-demo-import-notice">
<?php echo themify_get_skins_admin(); ?>
<h3><?php _e( 'Import Demo', 'themify' ); ?></h3>
<p><?php _e( 'Would you like to import the demo content to have the exact look as our demo?', 'themify' ); ?></p>
<p><?php _e( 'You may import or erase demo content later at the Import tab of the Themify panel.', 'themify' ); ?></p>
<a href="#" class="themify_button import-sample-content" data-plugins="<?php echo esc_attr(themify_get_theme_required_plugins()); ?>" data-default="<?php _e( 'Import Demo', 'themify' ); ?>" data-success="<?php _e( 'Done', 'themify' ); ?>" data-importing="<?php _e( 'Importing', 'themify' ) ?>"> <i class="ti-arrow-down"></i> <span><?php _e( 'Yes, import', 'themify' ); ?></span> </a>
<a href="#" class="thanks-button dismiss-import-notice"> <?php _e( 'No, thanks', 'themify' ); ?> </a>
<div class="note"><?php _e( 'WARNING: Importing the demo content will override your Themify settings, menu and widget settings. It will also add the content (posts, pages, widgets, menus, etc.) to your site as per our demo setup. It is recommend to do on a fresh/development site.', 'themify' ); ?></div>
<a href="#" class="close dismiss-import-notice"><i class="tf_close"></i></a>
// disable the demo import modal after first visit
$_key=get_template() . '_themify_import_notice';
add_option($_key,0, '', false );
<p id="logo">v<?php echo THEMIFY_VERSION; ?></p>
<strong><a href="#" id="reset-setting" class="reset-button"><?php _e( 'Reset Settings', 'themify' ); ?></a></strong>
<a href="#" class="save-button"><?php _e('Save', 'themify'); ?></a>
* Ensure checkboxes are included in the data sent to server
* Fixes checkboxes not being saved
const items=document.querySelectorAll('#themify input[type="checkbox"]');
for(var i=items.length-1;i>-1;--i){
let name=items[i].getAttribute('name');
if(name && (!items[i].previousElementSibling || items[i].previousElementSibling.type!=='hidden')){
let hidden=document.createElement('input');
<div class="clearBoth"></div>
do_action('themify_settings_panel_end');
* Return an array of available theme skins
function themify_get_skins(){
$dir = trailingslashit( get_template_directory() ) . 'skins';
'name' => __( 'Default', 'themify' ),
'screenshot' => get_template_directory_uri() . '/themify/img/non-skin.gif',
if ( is_dir( $dir ) && ($handle = opendir( $dir ) )) {
while ( false !== ( $dirTwo = readdir($handle) ) ) {
if( $dirTwo !== '.' && $dirTwo !== '..' ) {
$path = trailingslashit( $dir ) . $dirTwo;
if( is_file( $path . '/style.css' ) ) {
$info = get_file_data( $path . '/style.css', array( 'Skin Name', 'Version', 'Description', 'Demo URI', 'Required Plugins', 'Display Order' ) );
$order = empty( $info[5] ) ? 10 : $info[5];
$skins[ $order ][ $dirTwo ] = array(
'description' => $info[2],
'required_plugins' => $info[4],
ksort( $skins ); // sort skin groups
ksort( $skins[10] ); // sort by skin name
$skins = call_user_func_array( 'array_merge', $skins );
return apply_filters( 'themify_theme_skins', $skins );
* Display the admin field for the theme skins
function themify_get_skins_admin(){
$skins = themify_get_skins();
$template = get_template();
$skins_with_demos = current_theme_supports( 'themify-skins-and-demos' );
if( ! empty( $skins ) ) {
$current=themify_get_skin();
$canImport = current_user_can('manage_options');
$hasDemo=current_user_can('delete_pages') && Themify_Import_Helper::has_demo_content();
foreach( $skins as $id => $skin ) {
$selected = $current === $id ? 'selected' : '';
$screenshot = 0 === $id ? get_template_directory_uri() . '/themify/img/screenshot-na.png' : 'https://themify.org/public-api/screenshots/' . $template . '/' . $id . '/screenshot.jpg';
if( ($id === 'default' || 0 === $id) &&(!$current || $current==='default')) {
<div class="skin-preview '. $selected .'" data-skin="'. $id .'">
<a href="#"><img src="' . $screenshot . '" alt="' . esc_attr__( 'Skin', 'themify' ) . '" loading="lazy" decoding="async" width="300" height="225" /></a>
if(! empty( $skin['demo_uri'] ) ) {
$output .= sprintf( ' <span class="view-demo"><a href="%s" target="_blank" rel="noopener">%s</a></span>', $skin['demo_uri'], __( 'demo', 'themify' ) );
if( $skins_with_demos && $canImport) {
$output .= '<div class="skin-demo-content" data-skin="' . esc_attr( $id ) . '">';
$output .= __( 'Demo:', 'themify' );
$output .= ' <a href="#" class="skin-demo-import" data-id="'.esc_attr($id).'" data-plugins="'.esc_attr($skin['required_plugins']).'">' . __( 'Import', 'themify' ).'</a>';
$output.='<a href="#" class="skin-erase-link">' . __( 'Erase', 'themify' ) . '</a>';
$output .='<div class="tf_erase_box tf_abs_t tf_hide" tabindex="-1"><label><input type="checkbox" class="tf_modify_demo" id="_tf_modify_demo" checked="checked">'.__('Keep modified posts/pages','themify').'</label><a href="#" class="skin-erase-demo">'.__( 'Erase Demo', 'themify' ).'</a></div>';
* Create Settings Fieldset
* @param bool $wrap whether to output the module wrapper
function themify_fieldset( $title = '', $module = '', $attr = '', $wrap = true ) {
$data = themify_get_data();
$data_param = isset( $data['setting'][$title] )? $data['setting'][$title] : '';
if( is_array( $module ) && is_callable( $module ) ) {
$module = trim( $module );
$module = themify_scrub_func( $module );
if ( function_exists( 'themify_' . $module ) ) {
$function = 'themify_' . $module;
} else if ( function_exists( $module ) ) {
$output = call_user_func( $function, array(
$tmp_id = is_string( $function ) ? 'id="'. esc_attr( $function ) .'"' : '' ;
$output = '<fieldset '.$tmp_id.'><legend><span>' . esc_html( $title ) . '</span><i class="tf_plus_icon"></i></legend><div class="themify_panel_fieldset_wrap">'
* Get details about a known plugin
* @param $name if omitted, returns the entire list
function themify_get_known_plugin_info( $name = '' ) {
'builder-ab-image' => array(
'name' => __( 'Builder A/B Image', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
'desc' => 'Compare 2 images side by side',
'page' => 'https://themify.me/addons/ab-image',
'path' => 'builder-ab-image/init.php',
'builder-audio' => array(
'name' => __( 'Builder Audio', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/audio.jpg',
'desc' => 'Elegant audio playlist',
'page' => 'https://themify.me/addons/audio',
'path' => 'builder-audio/init.php'
'builder-button' => array(
'name' => __( 'Builder Button Pro', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/button.jpg',
'desc' => 'Custom designed action buttons',
'page' => 'https://themify.me/addons/button',
'path' => 'builder-button/init.php'
'builder-contact' => array(
'name' => __( 'Builder Contact', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/contact.jpg',
'desc' => 'Simple contact form',
'page' => 'https://themify.me/addons/contact',
'path' => 'builder-contact/init.php'
'builder-countdown' => array(
'name' => __( 'Builder Countdown', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/countdown.jpg',
'desc' => 'Count down events and promotions',
'page' => 'https://themify.me/addons/countdown',
'path' => 'builder-countdown/init.php'
'builder-counter' => array(
'name' => __( 'Builder Counter', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/counter.jpg',
'desc' => 'Animated circles and number counters',
'page' => 'https://themify.me/addons/counter',
'path' => 'builder-counter/init.php'
'builder-fittext' => array(
'name' => __( 'Builder FitText', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/fittext.jpg',
'desc' => 'Auto fit text in the container',
'page' => 'https://themify.me/addons/fittext',
'path' => 'builder-fittext/init.php'
'builder-image-pro' => array(
'name' => __( 'Builder Image Pro', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/image-pro.jpg',
'desc' => 'Beautify images with image filters, color/image overlay, and animation effects',
'page' => 'https://themify.me/addons/image-pro',
'path' => 'builder-image-pro/init.php'
'builder-infinite-posts' => array(
'name' => __( 'Builder Infinite Posts', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/infinite-posts.jpg',
'desc' => 'Display posts in infinite scrolling on parallax, grid, overlay, or list view',
'page' => 'https://themify.me/addons/infinite-posts',
'path' => 'builder-infinite-posts/init.php'
'builder-bar-chart' => array(
'name' => __( 'Builder Bat Chart', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/bar-chart.jpg',
'desc' => 'Display bar graphs',
'page' => 'https://themify.me/addons/bar-chart',
'path' => 'builder-bar-chart/init.php'
'builder-maps-pro' => array(
'name' => __( 'Builder Maps Pro', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/maps-pro.jpg',
'desc' => 'Multiple markers, custom icons, tooltips, and 40+ map styles',
'page' => 'https://themify.me/addons/maps-pro',
'path' => 'builder-maps-pro/init.php'
'builder-pie-chart' => array(
'name' => __( 'Builder Pie Chart', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/pie-chart.jpg',
'page' => 'https://themify.me/addons/pie-chart',
'path' => 'builder-pie-chart/init.php'
'builder-pointers' => array(
'name' => __( 'Builder Pointers', 'themify' ),