: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @package Themify Builder Pro
* @link https://themify.me/
class Tbp_Dynamic_Item_PostDate extends Tbp_Dynamic_Item {
function get_category() {
return array( 'text', 'textarea', 'wp_editor' );
return __( 'Post Published Date', 'tbp' );
function get_value( $args = array() ) {
if (!isset($args['date_format']) || $args['date_format'] === 'default' ) {
$date_format = get_option( 'date_format' );
} elseif ( $args['date_format'] === 'custom' ) {
$date_format = isset($args['custom_date_format'])?$args['custom_date_format']:'';
$date_format = $args['date_format'];
if(empty($args['post_id'])){
$the_query = Tbp_Utils::get_actual_query();
if($the_query===null || $the_query->have_posts()){
$value = get_the_date($date_format);
$value = get_the_date( $date_format,$args['post_id'] );
'label' => __( 'Date Format', 'tbp' ),
'default' => __( 'Default', 'tbp' ),
'F j, Y' => date_i18n( 'F j, Y' ),
'Y-m-d' => date_i18n( 'Y-m-d' ),
'm/d/Y' => date_i18n( 'm/d/Y' ),
'd/m/Y' => date_i18n( 'd/m/Y' ),
'custom' => __( 'Custom', 'tbp' ),
'not_empty'=>array('hide'=>array('custom_date_format')),
'custom'=>array('show'=>array('custom_date_format'))
'label' => __( 'Custom Date Format', 'tbp' ),
'id' => 'custom_date_format',
'help' => sprintf( __( 'For information on how to format date and time see <a href="%s" target="_blank">Codex</a>.', 'tbp' ), 'https://codex.wordpress.org/Formatting_Date_and_Time' )