: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'image' => 'https://themify.me/wp-content/product-img/addons/pointers.jpg',
'desc' => 'Highlight certain areas of your image',
'page' => 'https://themify.me/addons/pointers',
'path' => 'builder-pointers/init.php'
'builder-pricing-table' => array(
'name' => __( 'Builder Pricing Table', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/pricing-table.jpg',
'desc' => 'Beautiful and responsive pricing table addon',
'page' => 'https://themify.me/addons/pricing-table',
'path' => 'builder-pricing-table/init.php'
'builder-progress-bar' => array(
'name' => __( 'Builder Progress Bar', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/progress-bar.jpg',
'desc' => 'Animated bars based on input percentage',
'page' => 'https://themify.me/addons/progress-bar',
'path' => 'builder-progress-bar/init.php'
'builder-slider-pro' => array(
'name' => __( 'Builder Slider Pro', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/slider-pro.jpg',
'desc' => 'Make stunning sliders with transition and animation effects',
'page' => 'https://themify.me/addons/slider-pro',
'path' => 'builder-slider-pro/init.php'
'builder-tiles' => array(
'name' => __( 'Builder Tiles', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/tiles.jpg',
'desc' => 'Drag & drop tiles to create Windows 8 Metro layouts',
'page' => 'https://themify.me/addons/tiles',
'path' => 'builder-tiles/init.php'
'builder-timeline' => array(
'name' => __( 'Builder Timeline', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/timeline.jpg',
'desc' => 'Display content in a timeline-styled layouts',
'page' => 'https://themify.me/addons/timeline',
'path' => 'builder-timeline/init.php'
'builder-typewriter' => array(
'name' => __( 'Builder Typewriter', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/typewriter.jpg',
'desc' => 'Display your text with eye-catching typing animation',
'page' => 'https://themify.me/addons/typewriter',
'path' => 'builder-typewriter/init.php'
'builder-woocommerce' => array(
'name' => __( 'Builder WooCommerce', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/woocommerce.jpg',
'desc' => 'Show WooCommerce products anywhere in the Builder',
'page' => 'https://themify.me/addons/woocommerce',
'path' => 'builder-woocommerce/init.php'
'contact-form-7' => array(
'name' => __( 'Contact Form 7', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
'page' => 'https://wordpress.org/plugins/contact-form-7/',
'path' => 'contact-form-7/wp-contact-form-7.php',
'themify-portfolio-post' => array(
'name' => __( 'Portfolio Posts', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
'page' => 'https://wordpress.org/plugins/themify-portfolio-post/',
'path' => 'themify-portfolio-post/themify-portfolio-post.php',
'mailchimp-for-wp' => array(
'name' => __( 'MailChimp for WordPress', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
'page' => 'https://wordpress.org/plugins/mailchimp-for-wp/',
'path' => 'mailchimp-for-wp/mailchimp-for-wp.php',
'name' => __( 'WooCommerce', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
'page' => 'https://wordpress.org/plugins/woocommerce/',
'path' => 'woocommerce/woocommerce.php',
'themify-wc-product-filter' => array(
'name' => __( 'Themify Product Filter', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/ab-image.jpg',
'page' => 'https://themify.me/themify-product-filter',
'path' => 'themify-wc-product-filter/themify-wc-product-filter.php'
'themify-shortcodes' => array(
'name' => __( 'Themify Shortcodes', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/themify-shortcodes.jpg',
'page' => 'https://wordpress.org/plugins/themify-shortcodes/',
'path' => 'themify-shortcodes/init.php',
'themify-event-post' => array(
'name' => __( 'Themify Event Post', 'themify' ),
'image' => 'https://themify.me/wp-content/product-img/addons/themify-shortcodes.jpg',
'page' => 'https://wordpress.org/plugins/themify-event-post/',
'path' => 'themify-event-post/themify-event-post.php',
'name' => __( 'LearnPress', 'themify' ),
'image' => 'https://ps.w.org/learnpress/assets/icon-256x256.png',
'page' => 'https://wordpress.org/plugins/learnpress/',
'path' => 'learnpress/learnpress.php',
'themify-store-locator'=>array(
'name' => __( 'Themify Store Locator', 'themify' ),
'image' => 'https://themify.me/wp-content/uploads/2016/12/store-locator-blog-image.jpg',
'page' => 'https://wordpress.org/plugins/themify-store-locator/',
'path' => 'themify-store-locator/store_locator.php',
'themify-updater' => array(
'name' => __( 'Themify Updater', 'themify' ),
'page' => 'https://themify.me/docs/themify-updater-documentation',
'path' => 'themify-updater/themify-updater.php'
'name' => __( 'Give', 'themify' ),
'image' => 'https://ps.w.org/give/assets/icon-256x256.jpg',
'page' => 'https://wordpress.org/plugins/give/',
'path' => 'give/give.php',
return $name===''?$plugins:(isset( $plugins[$name] )?$plugins[$name]:false);
if( !function_exists( 'themify_add_admin_widgets' ) ):
function themify_add_admin_widgets() {
wp_add_dashboard_widget( 'themify_news', esc_html__( 'Themify News', 'themify' ), 'themify_news_admin_widget' );
add_action( 'wp_dashboard_setup', 'themify_add_admin_widgets' );
// Themify News Admin Widget
function themify_news_admin_widget() {
$cache_key = 'themify_news_dashboard_widget';
echo '<div class="rss-widget">';
if ( false !== ( $output = Themify_Storage::get( $cache_key ) ) ) {
echo '<script async src="' . THEMIFY_URI . '/js/admin/admin-dashboard.min.js"></script>';
function themify_check_update_link( $plugin, $type ) {
global $admin_page_hooks;
if( !empty($admin_page_hooks[$plugin]) && $type === 'plugin' && strpos( 'builder-' , $plugin) === false ) {
return esc_url( admin_url( 'admin.php?page=' . $plugin ) );
return esc_url( admin_url( 'admin.php?page=themify#update-check' ) );
///////////////////////////////////////////
///////////////////////////////////////////
function themify_favicon( $data = array() ) {
if($data['attr']['target'] != ''){
$target = "<span class='hide target'>".$data['attr']['target']."</span>";
$setting_favicon = themify_get( 'setting-favicon','',true );
return '<div class="themify_field_row">
<span class="label">'. __('Custom Favicon', 'themify') . '</span>
<input id="setting-favicon" type="text" class="width10" name="setting-favicon" value="' . esc_attr( $setting_favicon ) . '" /> <br />
<span class="pushlabel" style="display:block;">
' . themify_get_uploader('setting-favicon', array('tomedia' => true)) . '
///////////////////////////////////////////
///////////////////////////////////////////
if (!function_exists('themify_custom_post_type_layouts')) :
* Default Custom Post sidebar Module
* @param array $data Theme settings data
* @return string Markup for module.
function themify_custom_post_type_layouts($data = array()){
$data = themify_get_data();
* Theme Settings Option Key Prefix
$prefix = 'setting-custom_post_';
$post_types = get_post_types(array('public' => true, 'publicly_queryable' => 'true'), 'objects');
$excluded_types = apply_filters( 'themify_exclude_CPT_for_sidebar', array('post', 'page', 'attachment', 'tbuilder_layout', 'tbuilder_layout_part', 'section','tglobal_style'));
foreach ($post_types as $key => $value) {
if (!in_array($key, $excluded_types)) {
$custom_posts[$key] = array( 'name' => $value->labels->singular_name, 'archive' => $value->has_archive );
$custom_posts = apply_filters('themify_get_public_post_types', $custom_posts);
* Sidebar placement options
$sidebar_location_options = apply_filters('themify_post_type_theme_sidebars' , array(
array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'title' => __('Sidebar Right', 'themify')),
array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')),
array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify'))
if(is_array($custom_posts)){
foreach($custom_posts as $key => $cPost){
$output .= sprintf('<h4>%s %s</h4>', strtoupper($cPost['name']), __('POST TYPE', 'themify'));
$output .= '<p>'. sprintf('<span class="label">%s %s</span>', ucfirst($cPost['name']), __('Archive Sidebar', 'themify'));
$val = isset( $data[$prefix.$key.'_archive'] ) ? $data[$prefix.$key.'_archive'] : '';
foreach ( $sidebar_location_options as $option ) {
if ( ( '' == $val || ! $val || ! isset( $val ) ) && ( isset( $option['selected'] ) && $option['selected'] ) ) {
$class = $val == $option['value']?'selected':'';
$w= isset($option['w'])?$option['w']:'46';
$h= isset($option['w'])?$option['w']:'35';
$output .= '<a href="#" class="preview-icon '.$class.'" title="'.$option['title'].'"><img width="'.$w.'" height="'.$h.'" loading="lazy" decoding="async" src="'.THEME_URI.'/'.$option['img'].'" alt="'.$option['value'].'" /></a>';
$output .= '<input type="hidden" name="'.$prefix.$key.'_archive" class="val" value="'.$val.'" /></p>';
$content_width = isset( $data[ $prefix . $key . '_archive_content_width'] ) ? $data[ $prefix . $key . '_archive_content_width'] : 'default_width';
'<p data-show-if-element="[name=' . ( $prefix . $key) . '_archive]" data-show-if-value=\'["sidebar-none"]\'>
<span class="label">' . sprintf( __( '%s Archive Content Width', 'themify' ), $cPost['name'] ) . '</span>
<a href="#" class="preview-icon' . ( $content_width === 'default_width' ? ' selected' : '' ) . '" title="' . __( 'Default Width', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/default.svg" alt="default_width" loading="lazy" decoding="async" width="46" height="35"></a>
<a href="#" class="preview-icon' . ( $content_width === 'full_width' ? ' selected' : '' ) . '" title="' . __( 'Fullwidth', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/fullwidth.svg" alt="full_width" loading="lazy" decoding="async" width="46" height="35"></a>
<input type="hidden" name="' . $prefix . $key . '_archive_content_width" value="' . esc_attr( $content_width ) . '" class="val">
$output .= '<p>'. sprintf('<span class="label">%s %s</span>', ucfirst($cPost['name']), __('Single Sidebar', 'themify'));
$val = isset( $data[$prefix.$key.'_single'] ) ? $data[$prefix.$key.'_single'] : '';
foreach ( $sidebar_location_options as $option ) {
if ( ( '' == $val || ! $val || ! isset( $val ) ) && ( isset( $option['selected'] ) && $option['selected'] ) ) {
$class = $val == $option['value']?'selected':'';
$w= isset($option['w'])?$option['w']:'46';
$h= isset($option['w'])?$option['w']:'35';
$output .= '<a href="#" class="preview-icon '.$class.'" title="'.$option['title'].'"><img width="'.$w.'" height="'.$h.'" loading="lazy" decoding="async" src="'.THEME_URI.'/'.$option['img'].'" alt="'.$option['value'].'" /></a>';
$output .= '<input type="hidden" name="'.$prefix.$key.'_single" class="val" value="'.$val.'" /></p>';
$content_width = isset( $data[ $prefix . $key . '_single_content_width'] ) ? $data[ $prefix . $key . '_single_content_width'] : 'default_width';
'<p data-show-if-element="[name=' . ( $prefix . $key) . '_single]" data-show-if-value=\'["sidebar-none"]\'>
<span class="label">' . __( 'Default Single Content Width', 'themify' ) . '</span>
<a href="#" class="preview-icon' . ( $content_width === 'default_width' ? ' selected' : '' ) . '" title="' . __( 'Default Width', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/default.svg" alt="default_width" loading="lazy" decoding="async" width="46" height="35"></a>
<a href="#" class="preview-icon' . ( $content_width === 'full_width' ? ' selected' : '' ) . '" title="' . __( 'Fullwidth', 'themify' ) . '"><img src="' . THEME_URI . '/themify/img/fullwidth.svg" alt="full_width" loading="lazy" decoding="async" width="46" height="35"></a>
<input type="hidden" name="' . $prefix . $key . '_single_content_width" value="' . esc_attr( $content_width ) . '" class="val">
///////////////////////////////////////////
// Custom Feed URL Module
///////////////////////////////////////////
function themify_custom_feed_url( $data = array() ) {
$custom_feed_url = themify_get( 'setting-custom_feed_url','',true );
return '<p><span class="label">' . __( 'Custom Feed URL', 'themify' ) . '</span> <input type="text" class="width10" name="setting-custom_feed_url" value="' . esc_attr( $custom_feed_url ) . '" /> <br />
<span class="pushlabel"><small>' . __( 'e.g. http://feedburner.com/userid', 'themify' ) . '</small></span></p>';
///////////////////////////////////////////
// Meta Description Module
///////////////////////////////////////////
function themify_meta_description( $data = array() ) {
$data = themify_get_data();
return '<p><textarea name="setting-meta_description" class="widthfull" rows="4">'.$data['setting-meta_description'].'</textarea></p>';
function themify_header_html( $data = array() ) {
$header_html = themify_get( 'setting-header_html','',true );
return '<p>' . __('The following code will add to the <head> tag.', 'themify') . '</p>
<p><textarea class="widthfull tf_code_editor" rows="10" name="setting-header_html" id="setting-header_html">'. esc_html( $header_html ) .'</textarea><br />
<small>' . __('Useful if you need to add additional scripts such as CSS or JS.', 'themify') . '</small></p>';
function themify_footer_html( $data = array() ) {
$footer_html = themify_get( 'setting-footer_html','',true );
return '<p>' . __('The following code will be added to the footer before the closing </body> tag.', 'themify') . '</p>
<p><textarea type="text" class="widthfull tf_code_editor" rows="10" name="setting-footer_html" id="setting-footer_html">' . esc_html( $footer_html ) . '</textarea><br />
<small>' . __('Useful if you need to Javascript or tracking code.', 'themify') . '</small></p>';
///////////////////////////////////////////
// Search Settings Module
///////////////////////////////////////////
function themify_search_settings( $data = array() ) {
$data = themify_get_data();
$search_settings = themify_get( 'setting-search_settings','',true );
if ( themify_check( 'setting-search_settings_exclude',true ) ) {
$checked = 'checked="checked"';
if ( themify_check( 'setting-search_exclude_post',true ) ) {
$post_checked = 'checked="checked"';
<span class="label">' . __( 'Search in Category IDs', 'themify' ) .themify_help(__( 'Use minus sign (-) to exclude categories. Example: (1,4,-7) = search only in Category 1 & 4, and exclude Category 7.', 'themify' )) . ' </span>
<input type="text" class="width6" name="setting-search_settings" value="' . esc_attr( $search_settings ) . '" />
<span class="pushlabel"><label for="setting-search_exclude_post"><input type="checkbox" id="setting-search_exclude_post" name="setting-search_exclude_post" ' . $post_checked . '/> ' . __( 'Exclude Posts in search results', 'themify' ) . '</label></span>
<span class="pushlabel"><label for="setting-search_settings_exclude"><input type="checkbox" id="setting-search_settings_exclude" name="setting-search_settings_exclude" ' . $checked . '/> ' . __( 'Exclude Pages in search results', 'themify' ) . '</label></span>
$pre = 'setting-search_exclude_';
$exclude_types = apply_filters( 'themify_types_excluded_in_search', get_post_types( array(
'exclude_from_search' => false
foreach ( array_keys( $exclude_types ) as $post_type ) {
$type = get_post_type_object( $post_type );
if ( is_object( $type ) ) {
<label for="' . $pre . $type->name . '">
<input type="checkbox" id="' . $pre . $type->name . '" name="' . esc_attr( $pre . $type->name ) . '" ' . checked( isset( $data[ $pre . $type->name ] ) ? $data[ $pre . $type->name ] : '', 'on', false ) . '/> ' . sprintf( __( 'Exclude %s in search results', 'themify' ), $type->labels->name ) . '
if ( '' != $checkboxes ) {
return apply_filters('themify_search_settings_output', $out);
///////////////////////////////////////////
// 404 Page Settings Module
///////////////////////////////////////////
if( !function_exists( 'page_404_settings' ) ){
function page_404_settings(){
$data = themify_get_data();
$page_404 = themify_get( 'setting-page_404','',true );
'sort_column' => 'post_title',
'ignore_sticky_posts'=>true,
'post_status' => 'publish',
'update_post_term_cache'=>false,
'update_post_meta_cache'=>false,
$pages = new WP_Query( $args );
$front = get_option('page_on_front');
$out = '<p><span class="label">' . __( 'Custom 404 Page', 'themify' ) .themify_help(__('First create a new Page (eg. 404) and then select it here. The selected page will be used for error 404 (when a URL is not found on your site).', 'themify')). ' </span>';
if($pages->max_num_pages>1){
$post_name = get_post($page_404);
$post_name = esc_attr($post_name->post_title);
$out .= '<span class="themify_404_autocomplete_wrap">';
$out .= '<input type="text" value="'.$post_name.'" id="themify_404_page_autocomplete" /><input type="hidden" name="setting-page_404" value="'.$page_404.'" />';
$out.='<select name="setting-page_404">
<option value="0">'.esc_attr( __( 'Select page', 'themify' ) ).'</option>';
while ( $pages->have_posts() ) {
if ( $page_404 == $id ) {
$selected = 'selected="selected"';
$out .= '<option '.$selected.' value="' . $id . '">';
///////////////////////////////////////////
// RSS Feed Settings Module
///////////////////////////////////////////
function themify_feed_settings( $data = array() ) {
$feed_settings = themify_get( 'setting-feed_settings','',true );
$feed_custom_post = themify_get( 'setting-feed_custom_post','',true );
$custom_posts = array_diff( get_post_types( array('public' => true, 'publicly_queryable' => 'true' ) )
, array('attachment', 'tbuilder_layout', 'tbuilder_layout_part', 'section','tglobal_style') );
$custom_posts_options = '<option></option>';
if ( 'on' === themify_get( 'setting-exclude_img_rss','',true ) ) {
$checked_use = 'checked="checked"';
if( ! empty( $custom_posts ) ) {
array_unshift( $custom_posts, 'all' );
$feed_custom_post_arr = explode( ',', trim( $feed_custom_post ) );
foreach( $custom_posts as $c_post ) {
$custom_posts_options .= sprintf( '<option %s value="%s">%s</option>'
, in_array( $c_post, $feed_custom_post_arr ) ? 'selected="selected"' : ''
, ucfirst( preg_replace( "/[-_]/", ' ', $c_post ) ) );
return '<p><span class="label">' . __('Feed Category', 'themify') .themify_help(__('Use minus sign (-) to exclude categories. <br/> Example: (2,-9) = include only Category 2 in feeds and exclude Category 9.', 'themify')) . '</span> <input type="text" class="width6" name="setting-feed_settings" value="' . esc_attr( $feed_settings ) . '" /></p>
<p><span class="label">' . __('Post Image in RSS', 'themify') .themify_help(__('Check this to exclude post image in RSS feeds', 'themify')) . '</span> <label for="setting-exclude_img_rss"><input type="checkbox" id="setting-exclude_img_rss" name="setting-exclude_img_rss" '.$checked_use.'/> ' . __('Exclude featured image in RSS feeds', 'themify') . '</label></p>
<p><span class="label">' . __('Custom Posts in RSS', 'themify') .themify_help(__( 'Select "All" to add all available posts in your feed or select the specific ones.', 'themify')) . '</span>
<select size="6" multiple="multiple" class="width10 themify_multiselect">' . $custom_posts_options . '</select>