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: CurrentDate.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_CurrentDate extends Tbp_Dynamic_Item {
[5] Fix | Delete
[6] Fix | Delete
function get_category() {
[7] Fix | Delete
return 'general';
[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 __( 'Current Date & Time', '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
'date_format' => 'F j, Y',
[21] Fix | Delete
'custom_date_format' => '',
[22] Fix | Delete
) );
[23] Fix | Delete
return $args['date_format'] === 'custom' ? date_i18n( $args['custom_date_format'] ):date_i18n( $args['date_format'] );
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
function get_options() {
[27] Fix | Delete
return array(
[28] Fix | Delete
array(
[29] Fix | Delete
'label' => __( 'Date Format', 'tbp' ),
[30] Fix | Delete
'id' => 'date_format',
[31] Fix | Delete
'type' => 'select',
[32] Fix | Delete
'options' => array(
[33] Fix | Delete
'F j, Y' => date_i18n( 'F j, Y' ),
[34] Fix | Delete
'Y-m-d' => date_i18n( 'Y-m-d' ),
[35] Fix | Delete
'm/d/Y' => date_i18n( 'm/d/Y' ),
[36] Fix | Delete
'd/m/Y' => date_i18n( 'd/m/Y' ),
[37] Fix | Delete
'custom' => __( 'Custom', 'tbp' ),
[38] Fix | Delete
),
[39] Fix | Delete
'binding' =>array(
[40] Fix | Delete
'not_empty' => array( 'hide' => array( 'custom_date_format' ) ),
[41] Fix | Delete
'custom' => array( 'show' => array( 'custom_date_format' ) )
[42] Fix | Delete
)
[43] Fix | Delete
),
[44] Fix | Delete
array(
[45] Fix | Delete
'label' => __( 'Custom Date Format', 'tbp' ),
[46] Fix | Delete
'id' => 'custom_date_format',
[47] Fix | Delete
'type' => 'text',
[48] 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' )
[49] Fix | Delete
),
[50] Fix | Delete
);
[51] Fix | Delete
}
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function