urces table & version stored in options table on update to 3.12 * * @since 3.12 * * @param string $new_version New plugin version. * @param string $old_version Previous plugin version. * * @return void */ public function drop_resources_table( $new_version, $old_version ) { if ( version_compare( $old_version, '3.12', '>=' ) ) { return; } $this->database->drop_resources_table(); } /** * Displays a notice if the used CSS folder is not writable * * @since 3.11.4 * * @return void */ public function notice_write_permissions() { $this->used_css->notice_write_permissions(); } /** * Display a notice on table missing. * * @return void */ public function display_no_table_notice() { $this->settings->display_no_table_notice(); } /** * Maybe delete transient. * * @param mixed $old_value Option old value. * @param mixed $value Option new value. * * @return void */ public function maybe_delete_transient( $old_value, $value ) { if ( ! isset( $old_value['remove_unused_css'], $value['remove_unused_css'] ) ) { return; } if ( 1 === (int) $value['remove_unused_css'] ) { return; } if ( $old_value['remove_unused_css'] === $value['remove_unused_css'] ) { return; } delete_transient( 'wp_rocket_no_licence' ); } /** * Checks if the RUCSS deletion is enabled. * * @return bool */ protected function is_deletion_enabled(): bool { /** * Filters the enable RUCSS deletion value * * @param bool $delete_rucss True to enable deletion, false otherwise. */ return (bool) apply_filters( 'rocket_rucss_deletion_enabled', true ); } }