Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto update logging #565

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Add auto update logging #565

wants to merge 12 commits into from

Conversation

dalojikal
Copy link
Collaborator

No description provided.

$this->auto_update_log->add( '--------------------------------------------------' );
$this->auto_update_log->add( 'WP Core auto update settings' );

if ( isset( $wpcs['all'] ) && $wpcs['all'] ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isset( $wpcs['all'] && $wpcs['all'] could be simplified as ! empty( $wpcs['all']

This goes for the other statements as well. such as $dev = ! empty( $wpcs['dev'] ) ? 'true' : 'false'

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is updated

$item_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $offer );
$item_name = $item_data['Name'];
} else {
$item_data = get_plugin_data( get_template_directory() . '/../' . $offer . '/style.css' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$item_data doesn't seem to be used here.... Instead you're setting $item_name = $offer
This line could probably go away.... Especially since I don't think it's actually doing anything, since you would use wp_get_theme() for this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is updated

$type = isset( $options['type'] ) ? $options['type'] : 'WP Core';

$update_item = '';
if ( isset( $options['temp_backup'] ) && ! empty( $options['temp_backup'] ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isset( $options['temp_backup'] ) && ! empty( $options['temp_backup']
can be simplified to ! empty( $options['temp_backup']

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is updated

jamesros161
jamesros161 previously approved these changes Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants