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/embedpre.../EmbedPre.../Ends/Back/Settings/template...
File: google-calendar.php
<?php
[0] Fix | Delete
/*
[1] Fix | Delete
* Google Calendar Settings page
[2] Fix | Delete
* All undefined vars comes from 'render_settings_page' method
[3] Fix | Delete
* */
[4] Fix | Delete
[5] Fix | Delete
$epgc_client_secret = get_option('epgc_client_secret', '');
[6] Fix | Delete
$epgc_cache_time = get_option('epgc_cache_time', 0);
[7] Fix | Delete
$calendarList = Embedpress_Google_Helper::getDecoded( 'epgc_calendarlist' ); //settings_selected_calendar_ids_json_cb
[8] Fix | Delete
[9] Fix | Delete
?>
[10] Fix | Delete
[11] Fix | Delete
<div class="embedpress__settings background__white radius-25 p40">
[12] Fix | Delete
<h3><?php esc_html_e( "Google Calendar Settings", "embedpress" ); ?></h3>
[13] Fix | Delete
<div class="embedpress__settings__form">
[14] Fix | Delete
<form action="" method="post" class="embedpress-settings-form">
[15] Fix | Delete
<?php
[16] Fix | Delete
do_action( 'embedpress_before_gcalendar_settings_fields');
[17] Fix | Delete
echo $nonce_field ; ?>
[18] Fix | Delete
<div class="form__group">
[19] Fix | Delete
<label for="epgc_client_secret" class="form__label" ><?php esc_html_e( "Google Auth JSON (Refresh after saving)", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>': ''; ?> </label>
[20] Fix | Delete
[21] Fix | Delete
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
[22] Fix | Delete
<textarea name="epgc_client_secret" id="epgc_client_secret" class="form__control" data-default="<?php echo esc_attr( $epgc_client_secret); ?>" value="<?php echo esc_attr( $epgc_client_secret); ?>" rows="5" ><?php echo esc_html( $epgc_client_secret) ?></textarea>
[23] Fix | Delete
<p>
[24] Fix | Delete
<?php esc_html_e( 'Enter the JSON string downloaded from the Google Console.', 'embedpress'); ?>
[25] Fix | Delete
<br>
[26] Fix | Delete
</p>
[27] Fix | Delete
<p class="ep-note"> <?php printf(__('Note: Create a new project in the Google developer console and make sure you set <code>%s</code> as the authorized redirect URI.', 'embedpress'), $ep_page . '&page_type=google-calendar'); ?></p>
[28] Fix | Delete
[29] Fix | Delete
</div>
[30] Fix | Delete
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
[31] Fix | Delete
[32] Fix | Delete
</div>
[33] Fix | Delete
[34] Fix | Delete
<div class="form__group">
[35] Fix | Delete
<label for="epgc_cache_time" class="form__label" ><?php esc_html_e( "Caching time (in Minutes)", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </label>
[36] Fix | Delete
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
[37] Fix | Delete
<input name="epgc_cache_time" type="number" id="epgc_cache_time" class="form__control" data-default="<?php echo esc_attr( $epgc_cache_time); ?>" value="<?php echo esc_attr( $epgc_cache_time); ?>" >
[38] Fix | Delete
<p><?php esc_html_e( 'How long do you want to cache the data? Set it 0 to disable caching', 'embedpress'); ?></p>
[39] Fix | Delete
[40] Fix | Delete
</div>
[41] Fix | Delete
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
[42] Fix | Delete
[43] Fix | Delete
</div>
[44] Fix | Delete
<h2>Calendars</h2>
[45] Fix | Delete
<div class="form__group">
[46] Fix | Delete
<label for="epgc_cache_time" class="form__label" ><?php esc_html_e( "Select calendars to show", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </label>
[47] Fix | Delete
<div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
[48] Fix | Delete
<?php if ( !empty( $calendarList) ) {
[49] Fix | Delete
Embedpress_Google_Helper::print_calendar_list($calendarList); ?>
[50] Fix | Delete
<p><?php esc_html_e( 'Select which calendars you want to show', 'embedpress'); ?></p>
[51] Fix | Delete
<?php }else{ ?>
[52] Fix | Delete
<p><?php esc_html_e( 'No calendar was found', 'embedpress'); ?></p>
[53] Fix | Delete
<?php } ?>
[54] Fix | Delete
</div>
[55] Fix | Delete
<?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
[56] Fix | Delete
[57] Fix | Delete
</div>
[58] Fix | Delete
[59] Fix | Delete
[60] Fix | Delete
<?php do_action( 'embedpress_after_gcalendar_settings_fields'); ?>
[61] Fix | Delete
[62] Fix | Delete
<button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="gcalendar"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
[63] Fix | Delete
</form>
[64] Fix | Delete
<br><br>
[65] Fix | Delete
<?php if ( !empty( $epgc_client_secret) ) { ?>
[66] Fix | Delete
<h2><?php esc_html_e( 'Authorization', 'embedpress'); ?></h2>
[67] Fix | Delete
<p><?php esc_html_e( 'You need to authorize before fetching new calendars', 'embedpress'); ?></p>
[68] Fix | Delete
[69] Fix | Delete
<br>
[70] Fix | Delete
<form style="display:inline" method="post" action="<?php echo admin_url('admin-post.php'); ?>">
[71] Fix | Delete
<?php wp_nonce_field( 'epgc_authorize', 'epgc_authorize_data' ); ?>
[72] Fix | Delete
<input type="hidden" name="action" value="epgc_authorize">
[73] Fix | Delete
<?php submit_button(__('Authorize', 'embedpress'), 'primary', 'epgc_authorize', false); ?>
[74] Fix | Delete
</form>
[75] Fix | Delete
[76] Fix | Delete
<form style="display:inline" method="post" action="<?php echo admin_url('admin-post.php'); ?>">
[77] Fix | Delete
<?php wp_nonce_field( 'epgc_remove_private', 'epgc_remove_private_data' ); ?>
[78] Fix | Delete
<input type="hidden" name="action" value="epgc_remove_private">
[79] Fix | Delete
<?php submit_button(__('Stop', 'embedpress'), '', 'epgc_remove_private', false); ?>
[80] Fix | Delete
</form>
[81] Fix | Delete
<?php } ?>
[82] Fix | Delete
[83] Fix | Delete
[84] Fix | Delete
[85] Fix | Delete
</div>
[86] Fix | Delete
</div>
[87] Fix | Delete
[88] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function