Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder/module
File: FullwidthPostSlider.php
<?php
[0] Fix | Delete
[1] Fix | Delete
require_once 'helpers/Slider.php';
[2] Fix | Delete
[3] Fix | Delete
class ET_Builder_Module_Fullwidth_Post_Slider extends ET_Builder_Module_Type_PostBased {
[4] Fix | Delete
function init() {
[5] Fix | Delete
$this->name = esc_html__( 'Fullwidth Post Slider', 'et_builder' );
[6] Fix | Delete
$this->plural = esc_html__( 'Fullwidth Post Sliders', 'et_builder' );
[7] Fix | Delete
$this->slug = 'et_pb_fullwidth_post_slider';
[8] Fix | Delete
$this->vb_support = 'on';
[9] Fix | Delete
$this->fullwidth = true;
[10] Fix | Delete
[11] Fix | Delete
// Save processed background so it can be modified & reapplied on another element
[12] Fix | Delete
$this->save_processed_background = true;
[13] Fix | Delete
[14] Fix | Delete
// need to use global settings from the fullwidth slider module
[15] Fix | Delete
$this->global_settings_slug = 'et_pb_fullwidth_slider';
[16] Fix | Delete
[17] Fix | Delete
$this->main_css_element = '%%order_class%%.et_pb_slider';
[18] Fix | Delete
[19] Fix | Delete
$this->settings_modal_toggles = array(
[20] Fix | Delete
'general' => array(
[21] Fix | Delete
'toggles' => array(
[22] Fix | Delete
'main_content' => et_builder_i18n( 'Content' ),
[23] Fix | Delete
'elements' => et_builder_i18n( 'Elements' ),
[24] Fix | Delete
'featured_image' => esc_html__( 'Featured Image', 'et_builder' ),
[25] Fix | Delete
),
[26] Fix | Delete
),
[27] Fix | Delete
'advanced' => array(
[28] Fix | Delete
'toggles' => array(
[29] Fix | Delete
'layout' => et_builder_i18n( 'Layout' ),
[30] Fix | Delete
'overlay' => et_builder_i18n( 'Overlay' ),
[31] Fix | Delete
'navigation' => esc_html__( 'Navigation', 'et_builder' ),
[32] Fix | Delete
'image' => et_builder_i18n( 'Image' ),
[33] Fix | Delete
'text' => array(
[34] Fix | Delete
'title' => et_builder_i18n( 'Text' ),
[35] Fix | Delete
'priority' => 49,
[36] Fix | Delete
),
[37] Fix | Delete
),
[38] Fix | Delete
),
[39] Fix | Delete
'custom_css' => array(
[40] Fix | Delete
'toggles' => array(
[41] Fix | Delete
'animation' => array(
[42] Fix | Delete
'title' => esc_html__( 'Animation', 'et_builder' ),
[43] Fix | Delete
'priority' => 90,
[44] Fix | Delete
),
[45] Fix | Delete
),
[46] Fix | Delete
),
[47] Fix | Delete
);
[48] Fix | Delete
[49] Fix | Delete
$this->advanced_fields = array(
[50] Fix | Delete
'fonts' => array(
[51] Fix | Delete
'header' => array(
[52] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[53] Fix | Delete
'css' => array(
[54] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_slide_description .et_pb_slide_title, {$this->main_css_element} .et_pb_slide_description .et_pb_slide_title a",
[55] Fix | Delete
'important' => array( 'size', 'font-size' ),
[56] Fix | Delete
),
[57] Fix | Delete
'header_level' => array(
[58] Fix | Delete
'default' => 'h2',
[59] Fix | Delete
),
[60] Fix | Delete
),
[61] Fix | Delete
'body' => array(
[62] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[63] Fix | Delete
'css' => array(
[64] Fix | Delete
'line_height' => "{$this->main_css_element}",
[65] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_slide_content, {$this->main_css_element} .et_pb_slide_content div",
[66] Fix | Delete
'important' => 'all',
[67] Fix | Delete
),
[68] Fix | Delete
'block_elements' => array(
[69] Fix | Delete
'tabbed_subtoggles' => true,
[70] Fix | Delete
'bb_icons_support' => true,
[71] Fix | Delete
'css' => array(
[72] Fix | Delete
'link' => "{$this->main_css_element} .et_pb_slide_content a",
[73] Fix | Delete
'ul' => "{$this->main_css_element} .et_pb_slide_content ul li",
[74] Fix | Delete
'ul_item_indent' => "{$this->main_css_element} .et_pb_slide_content ul",
[75] Fix | Delete
'ol' => "{$this->main_css_element} .et_pb_slide_content ol li",
[76] Fix | Delete
'ol_item_indent' => "{$this->main_css_element} .et_pb_slide_content ol",
[77] Fix | Delete
'quote' => "{$this->main_css_element} .et_pb_slide_content blockquote",
[78] Fix | Delete
),
[79] Fix | Delete
),
[80] Fix | Delete
),
[81] Fix | Delete
'meta' => array(
[82] Fix | Delete
'label' => esc_html__( 'Meta', 'et_builder' ),
[83] Fix | Delete
'css' => array(
[84] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_slide_content .post-meta, {$this->main_css_element} .et_pb_slide_content .post-meta a",
[85] Fix | Delete
'limited_main' => "{$this->main_css_element} .et_pb_slide_content .post-meta, {$this->main_css_element} .et_pb_slide_content .post-meta a, {$this->main_css_element} .et_pb_slide_content .post-meta span",
[86] Fix | Delete
'important' => 'all',
[87] Fix | Delete
),
[88] Fix | Delete
'line_height' => array(
[89] Fix | Delete
'default' => '1em',
[90] Fix | Delete
),
[91] Fix | Delete
'font_size' => array(
[92] Fix | Delete
'default' => '16px',
[93] Fix | Delete
),
[94] Fix | Delete
'letter_spacing' => array(
[95] Fix | Delete
'default' => '0',
[96] Fix | Delete
),
[97] Fix | Delete
),
[98] Fix | Delete
),
[99] Fix | Delete
'button' => array(
[100] Fix | Delete
'button' => array(
[101] Fix | Delete
'label' => et_builder_i18n( 'Button' ),
[102] Fix | Delete
'css' => array(
[103] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_more_button.et_pb_button",
[104] Fix | Delete
'limited_main' => "{$this->main_css_element} .et_pb_more_button.et_pb_button",
[105] Fix | Delete
'alignment' => "{$this->main_css_element} .et_pb_button_wrapper",
[106] Fix | Delete
),
[107] Fix | Delete
'use_alignment' => true,
[108] Fix | Delete
'box_shadow' => array(
[109] Fix | Delete
'css' => array(
[110] Fix | Delete
'main' => '%%order_class%% .et_pb_button',
[111] Fix | Delete
),
[112] Fix | Delete
),
[113] Fix | Delete
'margin_padding' => array(
[114] Fix | Delete
'css' => array(
[115] Fix | Delete
'important' => 'all',
[116] Fix | Delete
),
[117] Fix | Delete
),
[118] Fix | Delete
),
[119] Fix | Delete
),
[120] Fix | Delete
'box_shadow' => array(
[121] Fix | Delete
'default' => array(
[122] Fix | Delete
'css' => array(
[123] Fix | Delete
'overlay' => 'inset',
[124] Fix | Delete
),
[125] Fix | Delete
),
[126] Fix | Delete
'image' => array(
[127] Fix | Delete
'label' => esc_html__( 'Image Box Shadow', 'et_builder' ),
[128] Fix | Delete
'option_category' => 'layout',
[129] Fix | Delete
'tab_slug' => 'advanced',
[130] Fix | Delete
'toggle_slug' => 'image',
[131] Fix | Delete
'css' => array(
[132] Fix | Delete
'main' => '%%order_class%% .et_pb_slide_image img',
[133] Fix | Delete
),
[134] Fix | Delete
'default_on_fronts' => array(
[135] Fix | Delete
'color' => '',
[136] Fix | Delete
'position' => '',
[137] Fix | Delete
),
[138] Fix | Delete
),
[139] Fix | Delete
),
[140] Fix | Delete
'background' => array(
[141] Fix | Delete
'css' => array(
[142] Fix | Delete
'main' => '%%order_class%%, %%order_class%%.et_pb_bg_layout_dark, %%order_class%%.et_pb_bg_layout_light',
[143] Fix | Delete
),
[144] Fix | Delete
'options' => array(
[145] Fix | Delete
'background_color' => array(
[146] Fix | Delete
'default' => et_builder_accent_color(),
[147] Fix | Delete
),
[148] Fix | Delete
'background_position' => array(
[149] Fix | Delete
'default' => 'center',
[150] Fix | Delete
),
[151] Fix | Delete
'parallax_method' => array(
[152] Fix | Delete
'default' => 'off',
[153] Fix | Delete
),
[154] Fix | Delete
),
[155] Fix | Delete
),
[156] Fix | Delete
'margin_padding' => array(
[157] Fix | Delete
'css' => array(
[158] Fix | Delete
'main' => '%%order_class%%',
[159] Fix | Delete
'padding' => '%%order_class%% .et_pb_slide_description, .et_pb_slider_fullwidth_off%%order_class%% .et_pb_slide_description',
[160] Fix | Delete
'important' => array( 'custom_margin' ), // needed to overwrite last module margin-bottom styling
[161] Fix | Delete
),
[162] Fix | Delete
),
[163] Fix | Delete
'text' => array(
[164] Fix | Delete
'use_background_layout' => true,
[165] Fix | Delete
'css' => array(
[166] Fix | Delete
'main' => implode( ', ', array(
[167] Fix | Delete
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_title',
[168] Fix | Delete
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_title a',
[169] Fix | Delete
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content',
[170] Fix | Delete
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content .post-meta',
[171] Fix | Delete
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content .post-meta a',
[172] Fix | Delete
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content .et_pb_button',
[173] Fix | Delete
) ),
[174] Fix | Delete
'text_orientation' => '%%order_class%% .et_pb_slide .et_pb_slide_description',
[175] Fix | Delete
'text_shadow' => '%%order_class%% .et_pb_slide .et_pb_slide_description',
[176] Fix | Delete
),
[177] Fix | Delete
'options' => array(
[178] Fix | Delete
'text_orientation' => array(
[179] Fix | Delete
'default' => 'center',
[180] Fix | Delete
),
[181] Fix | Delete
'background_layout' => array(
[182] Fix | Delete
'default' => 'dark',
[183] Fix | Delete
'hover' => 'tabs',
[184] Fix | Delete
),
[185] Fix | Delete
),
[186] Fix | Delete
),
[187] Fix | Delete
'borders' => array(
[188] Fix | Delete
'default' => array(
[189] Fix | Delete
'css' => array(
[190] Fix | Delete
'main' => array(
[191] Fix | Delete
'border_radii' => "%%order_class%%, %%order_class%% .et_pb_slide, %%order_class%% .et_pb_slide_overlay_container",
[192] Fix | Delete
),
[193] Fix | Delete
),
[194] Fix | Delete
),
[195] Fix | Delete
'image' => array(
[196] Fix | Delete
'css' => array(
[197] Fix | Delete
'main' => array(
[198] Fix | Delete
'border_radii' => '%%order_class%% .et_pb_slide .et_pb_slide_image img',
[199] Fix | Delete
'border_styles' => '%%order_class%% .et_pb_slide .et_pb_slide_image img',
[200] Fix | Delete
)
[201] Fix | Delete
),
[202] Fix | Delete
'label_prefix' => et_builder_i18n( 'Image' ),
[203] Fix | Delete
'tab_slug' => 'advanced',
[204] Fix | Delete
'toggle_slug' => 'image',
[205] Fix | Delete
'depends_show_if' => 'off',
[206] Fix | Delete
'defaults' => array(
[207] Fix | Delete
'border_radii' => 'on||||',
[208] Fix | Delete
'border_styles' => array(
[209] Fix | Delete
'width' => '0px',
[210] Fix | Delete
'color' => '#333333',
[211] Fix | Delete
'style' => 'solid',
[212] Fix | Delete
),
[213] Fix | Delete
),
[214] Fix | Delete
),
[215] Fix | Delete
),
[216] Fix | Delete
'filters' => array(
[217] Fix | Delete
'child_filters_target' => array(
[218] Fix | Delete
'tab_slug' => 'advanced',
[219] Fix | Delete
'toggle_slug' => 'image',
[220] Fix | Delete
),
[221] Fix | Delete
),
[222] Fix | Delete
'image' => array(
[223] Fix | Delete
'css' => array(
[224] Fix | Delete
'main' => '%%order_class%% .et_pb_slide_image',
[225] Fix | Delete
),
[226] Fix | Delete
),
[227] Fix | Delete
'height' => array(
[228] Fix | Delete
'css' => array(
[229] Fix | Delete
'main' => '%%order_class%%, %%order_class%% .et_pb_slide',
[230] Fix | Delete
)
[231] Fix | Delete
),
[232] Fix | Delete
'max_width' => array(
[233] Fix | Delete
'extra' => array(
[234] Fix | Delete
'content' => array(
[235] Fix | Delete
'use_module_alignment' => false,
[236] Fix | Delete
'css' => array(
[237] Fix | Delete
'main' => '%%order_class%% .et_pb_slide > .et_pb_container',
[238] Fix | Delete
),
[239] Fix | Delete
'options' => array(
[240] Fix | Delete
'width' => array(
[241] Fix | Delete
'label' => esc_html__( 'Content Width', 'et_builder' ),
[242] Fix | Delete
'default' => '80%',
[243] Fix | Delete
),
[244] Fix | Delete
'max_width' => array(
[245] Fix | Delete
'label' => esc_html__( 'Content Max Width', 'et_builder' ),
[246] Fix | Delete
'default' => '1080px',
[247] Fix | Delete
),
[248] Fix | Delete
)
[249] Fix | Delete
)
[250] Fix | Delete
)
[251] Fix | Delete
),
[252] Fix | Delete
'position_fields' => array(
[253] Fix | Delete
'default' => 'relative',
[254] Fix | Delete
),
[255] Fix | Delete
);
[256] Fix | Delete
[257] Fix | Delete
$this->custom_css_fields = array(
[258] Fix | Delete
'slide_description' => array(
[259] Fix | Delete
'label' => esc_html__( 'Slide Description', 'et_builder' ),
[260] Fix | Delete
'selector' => '.et_pb_slide_description',
[261] Fix | Delete
),
[262] Fix | Delete
'slide_title' => array(
[263] Fix | Delete
'label' => esc_html__( 'Slide Title', 'et_builder' ),
[264] Fix | Delete
'selector' => '.et_pb_slide_description .et_pb_slide_title',
[265] Fix | Delete
),
[266] Fix | Delete
'slide_meta' => array(
[267] Fix | Delete
'label' => esc_html__( 'Slide Meta', 'et_builder' ),
[268] Fix | Delete
'selector' => '.et_pb_slide_description .post-meta',
[269] Fix | Delete
),
[270] Fix | Delete
'slide_button' => array(
[271] Fix | Delete
'label' => esc_html__( 'Slide Button', 'et_builder' ),
[272] Fix | Delete
'selector' => '.et_pb_slider a.et_pb_more_button.et_pb_button',
[273] Fix | Delete
'no_space_before_selector' => true,
[274] Fix | Delete
),
[275] Fix | Delete
'slide_controllers' => array(
[276] Fix | Delete
'label' => esc_html__( 'Slide Controllers', 'et_builder' ),
[277] Fix | Delete
'selector' => '.et-pb-controllers',
[278] Fix | Delete
),
[279] Fix | Delete
'slide_active_controller' => array(
[280] Fix | Delete
'label' => esc_html__( 'Slide Active Controller', 'et_builder' ),
[281] Fix | Delete
'selector' => '.et-pb-controllers .et-pb-active-control',
[282] Fix | Delete
),
[283] Fix | Delete
'slide_image' => array(
[284] Fix | Delete
'label' => esc_html__( 'Slide Image', 'et_builder' ),
[285] Fix | Delete
'selector' => '.et_pb_slide_image',
[286] Fix | Delete
),
[287] Fix | Delete
'slide_arrows' => array(
[288] Fix | Delete
'label' => esc_html__( 'Slide Arrows', 'et_builder' ),
[289] Fix | Delete
'selector' => '.et-pb-slider-arrows a',
[290] Fix | Delete
),
[291] Fix | Delete
);
[292] Fix | Delete
[293] Fix | Delete
$this->help_videos = array(
[294] Fix | Delete
array(
[295] Fix | Delete
'id' => 'rDaVUZjDaGQ',
[296] Fix | Delete
'name' => esc_html__( 'An introduction to the Fullwidth Post Slider module', 'et_builder' ),
[297] Fix | Delete
),
[298] Fix | Delete
);
[299] Fix | Delete
}
[300] Fix | Delete
[301] Fix | Delete
static function get_blog_posts( $args = array(), $conditional_tags = array(), $current_page = array(), $is_ajax_request = true ) {
[302] Fix | Delete
global $wp_query, $paged, $post;
[303] Fix | Delete
[304] Fix | Delete
$defaults = array(
[305] Fix | Delete
'use_current_loop' => 'off',
[306] Fix | Delete
'posts_number' => '',
[307] Fix | Delete
'include_categories' => '',
[308] Fix | Delete
'orderby' => '',
[309] Fix | Delete
'content_source' => '',
[310] Fix | Delete
'use_manual_excerpt' => '',
[311] Fix | Delete
'excerpt_length' => '',
[312] Fix | Delete
'offset_number' => '',
[313] Fix | Delete
);
[314] Fix | Delete
[315] Fix | Delete
$args = wp_parse_args( $args, $defaults );
[316] Fix | Delete
[317] Fix | Delete
// Include query args that we don't control.
[318] Fix | Delete
$query_args = array_merge( array_diff_key( $args, $defaults ), array(
[319] Fix | Delete
'posts_per_page' => (int) $args['posts_number'],
[320] Fix | Delete
'post_status' => array( 'publish', 'private' ),
[321] Fix | Delete
'perm' => 'readable',
[322] Fix | Delete
));
[323] Fix | Delete
[324] Fix | Delete
if ( 'on' === $args['use_current_loop'] ) {
[325] Fix | Delete
// Reset loop-affecting values to their defaults to simulate the current loop.
[326] Fix | Delete
$reset_keys = array( 'include_categories', 'orderby' );
[327] Fix | Delete
[328] Fix | Delete
foreach ( $reset_keys as $key ) {
[329] Fix | Delete
$args[ $key ] = $defaults[ $key ];
[330] Fix | Delete
}
[331] Fix | Delete
}
[332] Fix | Delete
[333] Fix | Delete
if ( '' !== $args['include_categories'] ) {
[334] Fix | Delete
$query_args['cat'] = $args['include_categories'];
[335] Fix | Delete
}
[336] Fix | Delete
[337] Fix | Delete
if ( 'date_desc' !== $args['orderby'] ) {
[338] Fix | Delete
switch( $args['orderby'] ) {
[339] Fix | Delete
case 'date_asc' :
[340] Fix | Delete
$query_args['orderby'] = 'date';
[341] Fix | Delete
$query_args['order'] = 'ASC';
[342] Fix | Delete
break;
[343] Fix | Delete
case 'title_asc' :
[344] Fix | Delete
$query_args['orderby'] = 'title';
[345] Fix | Delete
$query_args['order'] = 'ASC';
[346] Fix | Delete
break;
[347] Fix | Delete
case 'title_desc' :
[348] Fix | Delete
$query_args['orderby'] = 'title';
[349] Fix | Delete
$query_args['order'] = 'DESC';
[350] Fix | Delete
break;
[351] Fix | Delete
case 'rand' :
[352] Fix | Delete
$query_args['orderby'] = 'rand';
[353] Fix | Delete
break;
[354] Fix | Delete
}
[355] Fix | Delete
}
[356] Fix | Delete
[357] Fix | Delete
if ( '' !== $args['offset_number'] && ! empty( $args['offset_number'] ) ) {
[358] Fix | Delete
/**
[359] Fix | Delete
* Offset + pagination don't play well. Manual offset calculation required
[360] Fix | Delete
* @see: https://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination
[361] Fix | Delete
*/
[362] Fix | Delete
if ( $paged > 1 ) {
[363] Fix | Delete
$query_args['offset'] = ( ( $paged - 1 ) * intval( $args['posts_number'] ) ) + intval( $args['offset_number'] );
[364] Fix | Delete
} else {
[365] Fix | Delete
$query_args['offset'] = intval( $args['offset_number'] );
[366] Fix | Delete
}
[367] Fix | Delete
}
[368] Fix | Delete
[369] Fix | Delete
$query = new WP_Query( $query_args );
[370] Fix | Delete
// Keep page's $wp_query global
[371] Fix | Delete
$wp_query_page = $wp_query;
[372] Fix | Delete
[373] Fix | Delete
// Turn page's $wp_query into this module's query
[374] Fix | Delete
$wp_query = $query; //phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
[375] Fix | Delete
[376] Fix | Delete
if ( $query->have_posts() ) {
[377] Fix | Delete
$post_index = 0;
[378] Fix | Delete
while ( $query->have_posts() ) {
[379] Fix | Delete
$query->the_post();
[380] Fix | Delete
ET_Post_Stack::replace( $post );
[381] Fix | Delete
[382] Fix | Delete
$post_author_id = $query->posts[ $post_index ]->post_author;
[383] Fix | Delete
[384] Fix | Delete
$categories = array();
[385] Fix | Delete
[386] Fix | Delete
$categories_object = get_the_terms( get_the_ID(), 'category' );
[387] Fix | Delete
[388] Fix | Delete
if ( ! empty( $categories_object ) ) {
[389] Fix | Delete
foreach ( $categories_object as $category ) {
[390] Fix | Delete
$categories[] = array(
[391] Fix | Delete
'id' => $category->term_id,
[392] Fix | Delete
'label' => $category->name,
[393] Fix | Delete
'permalink' => get_term_link( $category ),
[394] Fix | Delete
);
[395] Fix | Delete
}
[396] Fix | Delete
}
[397] Fix | Delete
[398] Fix | Delete
$has_post_thumbnail = has_post_thumbnail();
[399] Fix | Delete
[400] Fix | Delete
$query->posts[ $post_index ]->has_post_thumbnail = $has_post_thumbnail;
[401] Fix | Delete
$query->posts[ $post_index ]->post_thumbnail = $has_post_thumbnail ? get_the_post_thumbnail() : '';
[402] Fix | Delete
$query->posts[ $post_index ]->post_featured_image = $has_post_thumbnail ? esc_url( wp_get_attachment_url( get_post_thumbnail_id() ) ) : '';
[403] Fix | Delete
$query->posts[ $post_index ]->post_permalink = get_the_permalink();
[404] Fix | Delete
$query->posts[ $post_index ]->post_author_url = get_author_posts_url( $post_author_id );
[405] Fix | Delete
$query->posts[ $post_index ]->post_author_name = get_the_author_meta( 'display_name', $post_author_id );
[406] Fix | Delete
$query->posts[ $post_index ]->post_date_readable = get_the_date();
[407] Fix | Delete
$query->posts[ $post_index ]->categories = $categories;
[408] Fix | Delete
$query->posts[ $post_index ]->post_comment_popup = et_core_maybe_convert_to_utf_8( sprintf( esc_html( _nx( '%s Comment', '%s Comments', get_comments_number(), 'number of comments', 'et_builder' ) ), number_format_i18n( get_comments_number() ) ) );
[409] Fix | Delete
[410] Fix | Delete
$post_content = et_strip_shortcodes( get_the_content(), true );
[411] Fix | Delete
[412] Fix | Delete
global $et_fb_processing_shortcode_object, $et_pb_rendering_column_content;
[413] Fix | Delete
[414] Fix | Delete
$global_processing_original_value = $et_fb_processing_shortcode_object;
[415] Fix | Delete
[416] Fix | Delete
// reset the fb processing flag
[417] Fix | Delete
$et_fb_processing_shortcode_object = false;
[418] Fix | Delete
// set the flag to indicate that we're processing internal content
[419] Fix | Delete
$et_pb_rendering_column_content = true;
[420] Fix | Delete
[421] Fix | Delete
if ( $is_ajax_request ) {
[422] Fix | Delete
// reset all the attributes required to properly generate the internal styles
[423] Fix | Delete
ET_Builder_Element::clean_internal_modules_styles();
[424] Fix | Delete
}
[425] Fix | Delete
[426] Fix | Delete
if ( 'both' === $args['content_source'] ) {
[427] Fix | Delete
global $more;
[428] Fix | Delete
[429] Fix | Delete
// Page builder doesn't support more tag, so display the_content() in case of post made with page builder.
[430] Fix | Delete
if ( et_pb_is_pagebuilder_used( get_the_ID() ) || has_block( 'divi/layout', get_the_ID() ) ) {
[431] Fix | Delete
[432] Fix | Delete
// do_shortcode for Divi Plugin instead of applying `the_content` filter to avoid conflicts with 3rd party themes.
[433] Fix | Delete
$builder_post_content = et_is_builder_plugin_active() ? do_shortcode( $post_content ) : apply_filters( 'the_content', $post_content );
[434] Fix | Delete
[435] Fix | Delete
// Overwrite default content, in case the content is protected.
[436] Fix | Delete
$query->posts[ $post_index ]->post_content = $builder_post_content;
[437] Fix | Delete
} else {
[438] Fix | Delete
$more = null; // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
[439] Fix | Delete
[440] Fix | Delete
// Overwrite default content, in case the content is protected.
[441] Fix | Delete
$query->posts[ $post_index ]->post_content = et_is_builder_plugin_active() ? do_shortcode( get_the_content('') ) : apply_filters( 'the_content', get_the_content('') );
[442] Fix | Delete
}
[443] Fix | Delete
[444] Fix | Delete
if ( has_excerpt() && 'off' !== $args['use_manual_excerpt'] ) {
[445] Fix | Delete
$query->posts[ $post_index ]->post_excerpt = et_is_builder_plugin_active() ? do_shortcode( et_strip_shortcodes( get_the_excerpt(), true ) ) : apply_filters( 'the_content', et_strip_shortcodes( get_the_excerpt(), true ) );
[446] Fix | Delete
} else {
[447] Fix | Delete
$query->posts[ $post_index ]->post_excerpt = strip_shortcodes( truncate_post( intval( $args['excerpt_length'] ), false, '', true ) );
[448] Fix | Delete
}
[449] Fix | Delete
} else if ( 'on' === $args['content_source'] ) {
[450] Fix | Delete
global $more;
[451] Fix | Delete
[452] Fix | Delete
// page builder doesn't support more tag, so display the_content() in case of post made with page builder.
[453] Fix | Delete
if ( et_pb_is_pagebuilder_used( get_the_ID() || has_block( 'divi/layout', get_the_ID() ) ) ) {
[454] Fix | Delete
[455] Fix | Delete
// do_shortcode for Divi Plugin instead of applying `the_content` filter to avoid conflicts with 3rd party themes.
[456] Fix | Delete
$builder_post_content = et_is_builder_plugin_active() ? do_shortcode( $post_content ) : apply_filters( 'the_content', $post_content );
[457] Fix | Delete
[458] Fix | Delete
// Overwrite default content, in case the content is protected.
[459] Fix | Delete
$query->posts[ $post_index ]->post_content = $builder_post_content;
[460] Fix | Delete
} else {
[461] Fix | Delete
$more = null; // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
[462] Fix | Delete
[463] Fix | Delete
// Overwrite default content, in case the content is protected.
[464] Fix | Delete
$query->posts[ $post_index ]->post_content = et_is_builder_plugin_active() ? do_shortcode( get_the_content('') ) : apply_filters( 'the_content', get_the_content('') );
[465] Fix | Delete
}
[466] Fix | Delete
} else {
[467] Fix | Delete
if ( has_excerpt() && 'off' !== $args['use_manual_excerpt'] ) {
[468] Fix | Delete
$query->posts[ $post_index ]->post_content = et_is_builder_plugin_active() ? do_shortcode( et_strip_shortcodes( get_the_excerpt(), true ) ) : apply_filters( 'the_content', et_strip_shortcodes( get_the_excerpt(), true ) );
[469] Fix | Delete
} else {
[470] Fix | Delete
$query->posts[ $post_index ]->post_content = strip_shortcodes( truncate_post( intval( $args['excerpt_length'] ), false, '', true ) );
[471] Fix | Delete
}
[472] Fix | Delete
}
[473] Fix | Delete
[474] Fix | Delete
$et_fb_processing_shortcode_object = $global_processing_original_value;
[475] Fix | Delete
[476] Fix | Delete
if ( $is_ajax_request ) {
[477] Fix | Delete
// retrieve the styles for the modules inside Blog content
[478] Fix | Delete
$internal_style = ET_Builder_Element::get_style( true );
[479] Fix | Delete
[480] Fix | Delete
// reset all the attributes after we retrieved styles
[481] Fix | Delete
ET_Builder_Element::clean_internal_modules_styles( false );
[482] Fix | Delete
[483] Fix | Delete
$query->posts[ $post_index ]->internal_styles = $internal_style;
[484] Fix | Delete
}
[485] Fix | Delete
[486] Fix | Delete
$et_pb_rendering_column_content = false;
[487] Fix | Delete
[488] Fix | Delete
ET_Post_Stack::pop();
[489] Fix | Delete
$post_index++;
[490] Fix | Delete
} // end while
[491] Fix | Delete
ET_Post_Stack::reset();
[492] Fix | Delete
} else if ( self::is_processing_computed_prop() ) {
[493] Fix | Delete
// This is for the VB
[494] Fix | Delete
$query = '<div class="et_pb_row et_pb_no_results">';
[495] Fix | Delete
$query .= self::get_no_results_template();
[496] Fix | Delete
$query .= '</div>';
[497] Fix | Delete
[498] Fix | Delete
$query = array( 'posts' => $query );
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function