for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Update to 3.0.13
*
* @package SimpleCalendar/Updates
*/
namespace SimpleCalendar\Updates;
use Carbon\Carbon;
use SimpleCalendar\Post_Types;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Update_V3013 {
* Update posts and options.
* @param array $posts
public function __construct( $posts ) {
$posts
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$this->update_options();
* Update options.
public function update_options() {
$settings_advanced = get_option( 'simple-calendar_settings_advanced' );
// Remove stored always_enqueue value
if ( isset( $settings_advanced['assets']['always_enqueue'] ) ) {
unset( $settings_advanced['assets']['always_enqueue'] );
// Remove stored disable_js value
if ( isset( $settings_advanced['assets']['disable_js'] ) ) {
unset( $settings_advanced['assets']['disable_js'] );
update_option( 'simple-calendar_settings_advanced', $settings_advanced );
// Delete legacy options.
delete_option( 'simple-calendar_defaults' );
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.