[wp-trac] [WordPress Trac] #42686: Default selected changeset status should not be publish when current user does not have publish capability
WordPress Trac
noreply at wordpress.org
Mon Jan 22 19:01:16 UTC 2018
#42686: Default selected changeset status should not be publish when current user
does not have publish capability
--------------------------+--------------------------
Reporter: sayedwp | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.9.3
Component: Customize | Version: 4.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
--------------------------+--------------------------
Comment (by westonruter):
@sayedwp one tweak I have for the patch:
{{{#!diff
--- src/wp-admin/js/customize-controls.js
+++ src/wp-admin/js/customize-controls.js
@@ -7938,7 +7938,7 @@
} else {
saveBtn.val(
api.l10n.schedule );
}
- } else {
+ } else if (
api.settings.changeset.currentUserCanPublish ) {
saveBtn.val(
api.l10n.publish );
}
closeBtn.find( '.screen-reader-
text' ).text( api.l10n.cancel );
}}}
It doesn't seem to change the end result, at least with Customize
Snapshots active, but it would seem that we should only be setting the
`saveBtn`'s label to publish if the user can indeed publish.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42686#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list