-
Notifications
You must be signed in to change notification settings - Fork 117
"Install::verify_db()" removed. #1201
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
Conversation
cea575e to
3516cb8
Compare
kasparsd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good!
I guess it was added originally to prevent the plugin from failing silently if the custom tables were not there. WP core should now deactivate the plugin automatically if it causes a PHP error so activating it again will run the installation steps.
classes/class-install.php
Outdated
| add_action( 'init', array( $this, 'verify_db' ) ); | ||
|
|
||
| // Install the plugin. | ||
| add_action( 'wp_stream_before_db_notices', array( $this, 'check' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can also be removed since we're removing the wp_stream_before_db_notices call already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kidunot89 Can we remove this now that the do_action( 'wp_stream_before_db_notices' ) is being removed?
3516cb8 to
9b88a07
Compare
|
|
||
| // Install the plugin. | ||
| add_action( 'wp_stream_before_db_notices', array( $this, 'check' ) ); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $this->stream_url = self_admin_url( $this->plugin->admin->admin_parent_page . '&page=' . $this->plugin->admin->settings_page_slug ); | ||
|
|
||
| // Check DB and display an admin notice if there are tables missing. | ||
| add_action( 'init', array( $this, 'verify_db' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kidunot89 I think removing this now makes the Travis checks fail because the table for the plugin is not created on the first run https://travis-ci.com/github/xwp/stream/jobs/468947527#L511
9b88a07 to
0afc790
Compare
c3a8ad7 to
e4de12d
Compare
c37f168 to
c98fad9
Compare
Fixes #1169
Describe your approach and how it fixes the issue.
Checklist
contributing.md).verify_db()from theWP_Stream\Installclass.