-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fixed : Disable Post via Email #6693
base: trunk
Are you sure you want to change the base?
Fixed : Disable Post via Email #6693
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
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.
Thanks, @narenin, this is shaping up! A couple of comments here.
src/wp-admin/options.php
Outdated
/** | ||
* Filters whether the post-by-email functionality is enabled. | ||
* | ||
* @since 3.0.0 | ||
* | ||
* @param bool $enabled Whether post-by-email configuration is enabled. Default true. | ||
*/ | ||
if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { | ||
$allowed_options['writing'] = array_merge( $allowed_options['writing'], $mail_options ); | ||
} | ||
|
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.
What do you think about replacing line 161 with the filter conditional and assigning the $allowed_options['writing']
values within like the other conditionals do? I think that might read more clearly and consistently, and not have to merge arrays (maybe ever-so-slightly faster?)
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.
done
src/wp-admin/options.php
Outdated
|
||
$allowed_options['writing'] = array_merge( $allowed_options['writing'], $mail_options ); | ||
$allowed_options['writing'][] = 'ping_sites'; | ||
|
||
$allowed_options['media'][] = 'uploads_use_yearmonth_folders'; | ||
$allowed_options['media'][] = 'uploads_use_yearmonth_folders'; |
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 don't think these changes are in the scope of this update and would suggest leaving them out for now. The groupings here look intentional.
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.
done
Thanks for the feedback, I have implemented the suggestion can you please 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 is very succinct, well done! Aside from one small suggested nit, this LGTM.
@@ -179,8 +191,6 @@ | |||
|
|||
$allowed_options['general'][] = 'users_can_register'; | |||
$allowed_options['general'][] = 'default_role'; | |||
|
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.
One nit-pick -- I'd leave this blank line between general and writing.
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.
@ironprogrammer Thanks for the feedback, I have implemented the suggestions.
Trac ticket: https://core.trac.wordpress.org/ticket/61144
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.