Opened 3 years ago
Closed 3 years ago
#57527 closed enhancement (fixed)
Duotone: PHP code quality improvements
| Reported by: | Mamaduka | Owned by: | hellofromTonya |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.2 |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch gutenberg-merge commit |
| Cc: | Focuses: | performance |
Description (last modified by )
PHP code quality improvements:
- Use in/decrementors where appropriate.
Why? They're more performant than an assignment with a calculation.
See https://github.com/WordPress/gutenberg/pull/44551.
- Don't check if constants set by
wp_initial_constants()are defined.
This reduces the number of defined() calls for constants which are always set. Why? wp_initial_constants() makes sure that all the default constants are set.
See https://github.com/WordPress/gutenberg/pull/45979.
Change History (9)
This ticket was mentioned in PR #3890 on WordPress/wordpress-develop by @Mamaduka.
3 years ago
#1
- Keywords has-patch added
@Mamaduka commented on PR #3890:
3 years ago
#3
cc @hellofromtonya
#4
@
3 years ago
- Description modified (diff)
- Focuses performance added
- Keywords gutenberg-merge added
- Owner set to
- Status new → reviewing
- Summary Duotone: Two minor code quality fixes → Duotone: PHP code quality improvements
#5
@
3 years ago
- Keywords commit added
Self-assigning for commit. Planning to do 2 separate atomic commits to capture the context of why each improvement is being made.
@hellofromTonya commented on PR #3890:
3 years ago
#8
Both atomic commits where committed via changesets https://core.trac.wordpress.org/changeset/55140 and https://core.trac.wordpress.org/changeset/55140.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/57527
Related Gutenberg PR:
Props @jrfnl, @ocean90