mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-02 01:01:18 +03:00
Set deactivated pledges to readonly in the admin
Otherwise saving will reactivate them
This commit is contained in:
parent
012a6b76a0
commit
0584caed99
|
@ -208,7 +208,10 @@ function add_meta_boxes() {
|
||||||
* @param array $box
|
* @param array $box
|
||||||
*/
|
*/
|
||||||
function render_meta_boxes( $pledge, $box ) {
|
function render_meta_boxes( $pledge, $box ) {
|
||||||
$readonly = ! current_user_can( 'edit_page', $pledge->ID );
|
$readonly = (
|
||||||
|
! current_user_can( 'edit_page', $pledge->ID ) ||
|
||||||
|
Pledge\DEACTIVE_STATUS === $pledge->post_status
|
||||||
|
);
|
||||||
$is_manage = true;
|
$is_manage = true;
|
||||||
$pledge_id = $pledge->ID;
|
$pledge_id = $pledge->ID;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue