: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function et_tabcontainer($atts, $content = null) {
$content = et_content_helper($content);
<ul class='et-tabs-control'>
</ul> <!-- .et-tabs-control -->";
add_shortcode('imagetabcontainer', 'et_imagetabcontainer');
function et_imagetabcontainer($atts, $content = null) {
extract(shortcode_atts(array(
), $atts, 'imagetabcontainer'));
$content = et_content_helper($content);
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
$previous = esc_html__( 'Previous', $themename );
$next = esc_html__( 'Next', $themename );
<div{$id} class='controllers-wrapper{$class}'>
<div class='controllers'>
<a class='left-arrow' href='#'>{$previous}</a>
<a class='right-arrow' href='#'>{$next}</a>
</div> <!-- end #controllers -->
<div class='controllers-right'></div>
</div><!-- end #controllers-wrapper -->";
add_shortcode('imagetabtext', 'et_imagetabtext');
function et_imagetabtext($atts, $content = null) {
$content = et_content_helper($content);
<a href='#' class='switch'>
add_shortcode('tabtext', 'et_tabtext');
function et_tabtext($atts, $content = null) {
extract(shortcode_atts(array(
$content = et_content_helper($content);
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
<li{$id}{$class}><a href='#'>
add_shortcode('tabcontent', 'et_tabcontent');
function et_tabcontent($atts, $content = null) {
extract(shortcode_atts(array(
), $atts, 'tabcontent'));
$content = et_content_helper($content);
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
<div{$id} class='et-tabs-content{$class}'>
<div class='et-tabs-content-main-wrap'>
<div class='et-tabs-content-wrapper'>
add_shortcode('tab', 'et_tab');
function et_tab($atts, $content = null) {
extract(shortcode_atts(array(
$content = et_content_helper($content);
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
<div{$id} class='et_slidecontent{$class}'>
add_shortcode('imagetab', 'et_imagetab');
function et_imagetab($atts, $content = null) {
extract(shortcode_atts(array(
$target = '' !== $newwindow ? ' target="_blank"' : '';
$content = et_content_helper($content);
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
<div{$id} class='et_slidecontent et-image-slide{$class}'>" . ( '' !== $link ? "<a href='" . esc_url( $link ) . "'{$target}>" : '' ) . et_new_thumb_resize( $content, $width, $height, $alt ) . "<span class='et-image-overlay'> </span>" . ( '' !== $link ? '</a>' : '' ) . "</div>";
add_shortcode('author', 'et_author');
function et_author($atts, $content = null) {
extract(shortcode_atts(array(
$content = et_content_helper($content);
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
<div{$id} class='author-shortcodes{$class}'>
<div class='author-inner'>
</div> <!-- .author-inner -->
</div> <!-- .author-shortcodes -->";
add_shortcode('author_image', 'et_author_image');
function et_author_image($atts, $content = null) {
extract(shortcode_atts(array(
), $atts, 'author_image'));
$content = et_content_helper($content);
$src = ($timthumb === 'on') ? ( et_new_thumb_resize( $content, 60, 60, '', $forstyle = true ) ) : $content;
<div class='author-image'>
<img src='" . esc_attr( $src ) . "' alt='' />
<div class='author-overlay'></div>
</div> <!-- .author-image -->";
add_shortcode('author_info', 'et_author_info');
function et_author_info($atts, $content = null) {
$content = et_content_helper($content);
<div class='author-info'>
</div> <!-- .author-info -->";
add_shortcode('pricing_table', 'et_pricing_table');
function et_pricing_table($atts, $content = null) {
wp_enqueue_script( 'et-shortcodes-js' );
$content = et_content_helper($content);
<div class='et-pricing clearfix'>
</div> <!-- end .et-pricing -->";
add_shortcode('custom_list', 'et_custom_list');
function et_custom_list($atts, $content = null) {
extract(shortcode_atts(array(
), $atts, 'custom_list'));
$content = et_content_helper($content);
$type = ( $type !== 'checkmark' ) ? ' etlist-' . $type : '';
<div class='et-custom-list{$type}'>
</div> <!-- .et-custom-list -->";
add_shortcode('pricing', 'et_pricing');
function et_pricing($atts, $content = null) {
extract(shortcode_atts(array(
"title" => "professional",
"moretext" => esc_html__( 'Join Now', $themename ),
$content = et_content_helper($content);
$separator_sign = ( strpos($price, '.') !== false ) ? '.' : ',';
$price_array = explode($separator_sign, $price);
$link_target = ( $window === 'new' ) ? ' target="_blank"' : '';
$type = ( $type === 'big' ) ? ' pricing-big' : '';
<div class='" . esc_attr( 'pricing-table' . $type ) . "'>
<div class='pricing-table-wrap'>
<div class='pricing-heading'>
<h2 class='pricing-title'>" . esc_html( $title ) . "</h2>
<p>" . esc_html( $desc ) . "</p>
</div> <!-- end .pricing-heading -->
<div class='pricing-content'>
</div> <!-- end .pricing-content -->
<div class='pricing-content-bottom'>
<span class='et-price'><span class='dollar-sign'>" . esc_html( $currency ) . "</span>" . esc_html( $price_array[0] ) .
"<sup>" . esc_html( $price_array[1] ) . "</sup></span>
</div> <!-- end .pricing-content-bottom -->
<a href='" . esc_url( $url ) . "' class='icon-button'{$link_target}>" . esc_html( $moretext ) . "</a>
</div> <!-- end .pricing-table-wrap -->
</div> <!-- end .pricing-table -->";
add_shortcode('feature', 'et_pricing_feature');
function et_pricing_feature($atts, $content = null) {
extract(shortcode_atts(array(
$content = et_content_helper($content);
$class = ( $checkmark === 'x' ) ? ' class="x-mark"' : '';
$output = "<li{$class}>{$content}<span class='pricing-mark'></span></li>";
add_shortcode('dropcap', 'et_dropcap');
function et_dropcap($atts, $content = null) {
extract(shortcode_atts(array(
$content = et_content_helper($content);
$style = ( $style !== '' ) ? ' style="' . esc_attr( $style ) . '"' : '';
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
$output = "<span{$id} class='et-dropcap{$class}'{$style}>{$content}</span>";
add_shortcode('testimonial', 'et_testimonial');
function et_testimonial($atts, $content = null) {
extract(shortcode_atts(array(
), $atts, 'testimonial'));
$content = et_content_helper($content);
$style = ( $style !== '' ) ? ' style="' . esc_attr( $style ) . '"' : '';
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
$author = ( $author !== '' ) ? "<span class='t-author'>" . esc_html( $author ) . "</span>" : '';
$company = ( $company !== '' ) ? "<span class='t-position'>" . esc_html( $company ) . "</span>" : '';
$image = ( $timthumb === 'on' ) ? et_new_thumb_resize( $image, 60, 60, '', $forstyle = true ) : $image;
<img src='" . esc_attr( $image ) . "' alt='" . esc_attr( $orig_name ) . "' />
<span class='t-overlay'></span>
<div{$id} class='et-testimonial-box{$class}'{$style}>
<div class='et-testimonial-author-info clearfix'>
<div class='et-testimonial clearfix'>
<div class='t-bottom-arrow'></div>
add_shortcode('quote','et_quote');
function et_quote( $atts, $content = null ) {
if ( function_exists( 'bbpress' ) && function_exists( 'gdbbx_render_the_bbcode' ) ) {
// compat for gdbbpress tools plugin.
if ( isset( $atts['quote'] ) && ! empty( $atts['quote'] ) ) {
$output = gdbbx_render_the_bbcode( 'quote', $atts, $content );
if ( $output !== false ) {
extract(shortcode_atts(array(
$content = et_content_helper($content);
$style = ( $style !== '' ) ? ' style="' . esc_attr( $style ) . '"' : '';
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$class = ($class !== '') ? esc_attr( ' ' . $class ) : '';
if ( $type === 'center' ) $class = ' quote-center';
<div{$id} class='et_quote{$class}'{$style}>
<div class='et_right_quote'>
" . ( 'center' === $type ? "<span class='et_quote_additional_sign'></span>" : '' ) . "
<span class='et_quote_sign'></span>
add_shortcode('one_half', 'et_columns');
add_shortcode('one_half_last', 'et_columns');
add_shortcode('one_third', 'et_columns');
add_shortcode('one_third_last', 'et_columns');
add_shortcode('one_fourth', 'et_columns');
add_shortcode('one_fourth_last', 'et_columns');
add_shortcode('two_third', 'et_columns');
add_shortcode('two_third_last', 'et_columns');
add_shortcode('three_fourth', 'et_columns');
add_shortcode('three_fourth_last', 'et_columns');
function et_columns($atts, $content = null, $name='') {
extract(shortcode_atts(array(
$content = et_content_helper($content);
$id = ($id !== '') ? " id='" . esc_attr( $id ) . "'" : '';
$pos = strpos($name,'_last');
$name = str_replace('_last',' et_column_last',$name);
$output = "<div{$id} class='" . esc_attr( $name . $class ) . "'>
$output .= "<div class='clear'></div>";
if ( ! function_exists( 'et_paragraph_br_fix' ) ){
function et_paragraph_br_fix($content,$paragraph_tag=false,$br_tag=false){
$content = preg_replace('#^<\/p>|^<br \/>|<p>$#', '', $content);
$content = preg_replace('#<br \/>#', '', $content);
if ( $paragraph_tag ) $content = preg_replace('#<p>|</p>#', '', $content);
if ( ! function_exists( 'et_content_helper' ) ){
function et_content_helper($content,$paragraph_tag=false,$br_tag=false){
return et_paragraph_br_fix( do_shortcode(shortcode_unautop($content)), $paragraph_tag, $br_tag );
// Hook later into the request lifecycle so that we can check Gutenberg status.
// 'wp' is not run on edit pages so we use the next best thing.
add_action( 'admin_head', 'et_init_shortcodes' );
function et_init_shortcodes() {
$is_edit_url = in_array( basename( $_SERVER['PHP_SELF'] ), array( 'post-new.php', 'page-new.php', 'post.php', 'page.php' ) );
if ( ! is_admin() || ! $is_edit_url || ! current_user_can( 'edit_posts' ) || ! current_user_can( 'edit_pages' ) || et_core_is_gutenberg_enabled() ) {
add_filter('mce_buttons', 'et_filter_mce_button');
add_filter('mce_external_plugins', 'et_filter_mce_plugin');
add_action('edit_form_advanced', 'et_advanced_buttons');
add_action('edit_page_form', 'et_advanced_buttons');
function et_filter_mce_button($buttons) {
array_push( $buttons, '|', 'et_learn_more', 'et_box', 'et_button', 'et_tabs', 'et_author' );
function et_filter_mce_plugin($plugins) {
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
$plugins['et_quicktags'] = get_template_directory_uri(). "/epanel/shortcodes/js/editor_plugin{$suffix}.js";
function et_advanced_buttons(){
<script type="text/javascript">
var defaultSettings = {},
learn_more : "<?php esc_html_e( 'Add ET Learn more block', $themename ); ?>",
box : "<?php esc_html_e( 'Add ET Box', $themename ); ?>",
button : "<?php esc_html_e( 'Add ET Button', $themename ); ?>",
tabs : "<?php esc_html_e( 'Add ET Tabs', $themename ); ?>",
author : "<?php esc_html_e( 'Add Author Bio', $themename ); ?>",
shortcodes : "<?php esc_html_e( 'Shortcodes', $themename ); ?>",
defaultSettings['learn_more'] = {
name: '<?php esc_html_e( 'Caption', $themename ); ?>',
defaultvalue: '<?php esc_html_e( 'Caption goes here', $themename ); ?>',