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: PostDate.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_PostDate 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( 'text', 'textarea', 'wp_editor' );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
function get_label() {
[15] Fix | Delete
return __( 'Post Published Date', 'tbp' );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
function get_value( $args = array() ) {
[19] Fix | Delete
if (!isset($args['date_format']) || $args['date_format'] === 'default' ) {
[20] Fix | Delete
$date_format = get_option( 'date_format' );
[21] Fix | Delete
} elseif ( $args['date_format'] === 'custom' ) {
[22] Fix | Delete
$date_format = isset($args['custom_date_format'])?$args['custom_date_format']:'';
[23] Fix | Delete
} else {
[24] Fix | Delete
$date_format = $args['date_format'];
[25] Fix | Delete
}
[26] Fix | Delete
if(empty($args['post_id'])){
[27] Fix | Delete
$the_query = Tbp_Utils::get_actual_query();
[28] Fix | Delete
if($the_query===null || $the_query->have_posts()){
[29] Fix | Delete
if($the_query!==null){
[30] Fix | Delete
$the_query->the_post();
[31] Fix | Delete
}
[32] Fix | Delete
$value = get_the_date($date_format);
[33] Fix | Delete
}
[34] Fix | Delete
if($the_query!==null){
[35] Fix | Delete
wp_reset_postdata();
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
else{
[39] Fix | Delete
$value = get_the_date( $date_format,$args['post_id'] );
[40] Fix | Delete
}
[41] Fix | Delete
return $value;
[42] Fix | Delete
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
function get_options() {
[46] Fix | Delete
return array(
[47] Fix | Delete
array(
[48] Fix | Delete
'label' => __( 'Date Format', 'tbp' ),
[49] Fix | Delete
'id' => 'date_format',
[50] Fix | Delete
'type' => 'select',
[51] Fix | Delete
'options' => array(
[52] Fix | Delete
'default' => __( 'Default', 'tbp' ),
[53] Fix | Delete
'F j, Y' => date_i18n( 'F j, Y' ),
[54] Fix | Delete
'Y-m-d' => date_i18n( 'Y-m-d' ),
[55] Fix | Delete
'm/d/Y' => date_i18n( 'm/d/Y' ),
[56] Fix | Delete
'd/m/Y' => date_i18n( 'd/m/Y' ),
[57] Fix | Delete
'custom' => __( 'Custom', 'tbp' ),
[58] Fix | Delete
),
[59] Fix | Delete
'binding' =>array(
[60] Fix | Delete
'not_empty'=>array('hide'=>array('custom_date_format')),
[61] Fix | Delete
'custom'=>array('show'=>array('custom_date_format'))
[62] Fix | Delete
)
[63] Fix | Delete
),
[64] Fix | Delete
array(
[65] Fix | Delete
'label' => __( 'Custom Date Format', 'tbp' ),
[66] Fix | Delete
'id' => 'custom_date_format',
[67] Fix | Delete
'type' => 'text',
[68] Fix | Delete
'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' )
[69] Fix | Delete
),
[70] Fix | Delete
);
[71] Fix | Delete
}
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function