-
Notifications
You must be signed in to change notification settings - Fork 800
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
Admin Page : Update static function in get_modules() with use :: operator. #8178
Admin Page : Update static function in get_modules() with use :: operator. #8178
Conversation
Hello sir Can you review this PR when you get a leisure time? Thanks |
This changes is same as MY PR gallery: use scope operator in static function Thanks |
@Umangvaghela, please, we need to have "Testing Instructions" in PRs. We need to check that everything still works after the changes in every PR. Writing Testing Instructions allow us to follow a series of steps to check that no regression is introduced... Sometimes small changes look great but they end up messing with other pieces. Writing Testing instructions is easy. For example, if you update a file related to stats, just add something like this to your PR description:
Also, you mentioned #8153 in your last comment. That's probably a typo. I'm labeling this PR as "Needs Author Reply" and blocking it requesting that you add testing instructions before it gets reviewed. I'm really thankful for your contributions to this codebase but we've already mentioned this a few times. |
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.
Add Testing Instructions to the Description
Thank you, sir, for your response. Testing instructionsBefore testing:
After Testing:
Existing code provides the same result as my changeable code. But I use the scop operator to call a static function. Thank you, Sir, To conscious me. while I Add PR that time I definitely add testing instruction. |
Author added Testing instructions. Thank you!
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.
Thank you, this makes sense, but I left one comment.
class.jetpack-admin.php
Outdated
@@ -60,12 +60,13 @@ static function sort_requires_connection_last( $module1, $module2 ) { | |||
// presentation like description, name, configuration url, etc. | |||
function get_modules() { | |||
include_once( JETPACK__PLUGIN_DIR . 'modules/module-info.php' ); | |||
$available_modules = $this->jetpack->get_available_modules(); | |||
$active_modules = $this->jetpack->get_active_modules(); | |||
$get_object_module = $this->jetpack; |
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.
Let's just call the method statically using the class name like it's done everywhere else: Jetpack::get_available_modules()
. Thank you!
@zinigor I add all changes which is you suggest me. Please let me know if I miss some thing. Sir new changes not tested so please test it when you get a chance. Thanks
I have added all changes which is you suggested me. Please let me know if i miss something. Thanks |
Tested :
Fix minor changes in class-jetpack-admin.php get_modules().