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/wp-conte.../plugins/themify-.../includes/dynamic-...
File: PostImageAttachments.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @package Themify Builder Pro
[2] Fix | Delete
* @link https://themify.me/
[3] Fix | Delete
*/
[4] Fix | Delete
class Tbp_Dynamic_Item_PostImageAttachments extends Tbp_Dynamic_Item {
[5] Fix | Delete
[6] Fix | Delete
function get_category() {
[7] Fix | Delete
return 'post';
[8] Fix | Delete
}
[9] Fix | Delete
[10] Fix | Delete
function get_type() {
[11] Fix | Delete
return array( 'gallery' );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
function get_label() {
[15] Fix | Delete
return __( 'Post Image Attachments', 'tbp' );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
function get_value( $args = array() ) {
[19] Fix | Delete
$args = wp_parse_args( $args, array(
[20] Fix | Delete
'post_id' => Tbp_Utils::get_actual_viewing_post_id(),
[21] Fix | Delete
) );
[22] Fix | Delete
[23] Fix | Delete
if ( $post = get_post( $args['post_id'] ) ) {
[24] Fix | Delete
$attachments = get_posts( array(
[25] Fix | Delete
'post_type' => 'attachment',
[26] Fix | Delete
'posts_per_page' => -1,
[27] Fix | Delete
'no_found_rows'=>true,
[28] Fix | Delete
'ignore_sticky_posts'=>true,
[29] Fix | Delete
'post_parent' => $post->ID,
[30] Fix | Delete
'exclude' => get_post_thumbnail_id( $post->ID )
[31] Fix | Delete
) );
[32] Fix | Delete
[33] Fix | Delete
if ( $attachments ) {
[34] Fix | Delete
$ids = wp_list_pluck( $attachments, 'ID' );
[35] Fix | Delete
return '[gallery ids="' . implode( ',', $ids ) . '"]';
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
function get_options() {
[41] Fix | Delete
return array(
[42] Fix | Delete
array(
[43] Fix | Delete
'label' => __( 'Post ID', 'tbp' ),
[44] Fix | Delete
'id' => 'post_id',
[45] Fix | Delete
'type' => 'number',
[46] Fix | Delete
'help' => __( 'Leave empty to get the data from current post in the loop.', 'tbp' ),
[47] Fix | Delete
),
[48] Fix | Delete
);
[49] Fix | Delete
}
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function