diff --git a/plugins/wporg-5ftf/includes/contributor.php b/plugins/wporg-5ftf/includes/contributor.php index e78e8c1..36500c4 100644 --- a/plugins/wporg-5ftf/includes/contributor.php +++ b/plugins/wporg-5ftf/includes/contributor.php @@ -252,21 +252,21 @@ function get_pledge_contributors_data( $pledge_id ) { foreach ( $contributors as $contributor_status => $group ) { $contrib_data[ $contributor_status ] = array_map( function( $contributor_post ) use ( $contributor_status, $pledge_id ) { - $name = $contributor_post->post_title; + $name = $contributor_post->post_title; $contributor = get_user_by( 'login', $name ); return [ - 'pledgeId' => $pledge_id, + 'pledgeId' => $pledge_id, 'contributorId' => $contributor_post->ID, - 'status' => $contributor_status, - 'avatar' => get_avatar( $contributor, 32 ), + 'status' => $contributor_status, + 'avatar' => get_avatar( $contributor, 32 ), // @todo Add full name, from `$contributor`? - 'name' => $name, - 'displayName' => $contributor->display_name, - 'publishDate' => get_the_date( '', $contributor_post ), - 'resendLabel' => __( 'Resend Confirmation', 'wporg' ), + 'name' => $name, + 'displayName' => $contributor->display_name, + 'publishDate' => get_the_date( '', $contributor_post ), + 'resendLabel' => __( 'Resend Confirmation', 'wporg' ), 'removeConfirm' => sprintf( __( 'Remove %s from this pledge?', 'wporg-5ftf' ), $name ), - 'removeLabel' => sprintf( __( 'Remove %s', 'wporg' ), $name ), + 'removeLabel' => sprintf( __( 'Remove %s', 'wporg' ), $name ), ]; }, $group diff --git a/plugins/wporg-5ftf/includes/endpoints.php b/plugins/wporg-5ftf/includes/endpoints.php index cc4799c..850072b 100644 --- a/plugins/wporg-5ftf/includes/endpoints.php +++ b/plugins/wporg-5ftf/includes/endpoints.php @@ -15,8 +15,8 @@ add_action( 'wp_ajax_manage_contributors', __NAMESPACE__ . '\handler' ); function handler() { check_ajax_referer( 'manage-pledge', '_ajax_nonce' ); - $action = filter_input( INPUT_POST, 'manage_action' ); - $pledge_id = filter_input( INPUT_POST, 'pledge_id', FILTER_VALIDATE_INT ); + $action = filter_input( INPUT_POST, 'manage_action' ); + $pledge_id = filter_input( INPUT_POST, 'pledge_id', FILTER_VALIDATE_INT ); $contributor_id = filter_input( INPUT_POST, 'contributor_id', FILTER_VALIDATE_INT ); switch ( $action ) { @@ -33,7 +33,7 @@ function handler() { // Trash contributor. Contributor\remove_contributor( $contributor_id ); wp_die( wp_json_encode( [ - 'success' => true, + 'success' => true, 'contributors' => Contributor\get_pledge_contributors_data( $pledge_id ), ] ) ); break; @@ -52,7 +52,7 @@ function handler() { $contributors = Contributor\get_pledge_contributors_data( $pledge_id ); wp_die( wp_json_encode( [ - 'success' => true, + 'success' => true, 'contributors' => $contributors, ] ) ); break; diff --git a/plugins/wporg-5ftf/includes/pledge-meta.php b/plugins/wporg-5ftf/includes/pledge-meta.php index e40f541..213b346 100755 --- a/plugins/wporg-5ftf/includes/pledge-meta.php +++ b/plugins/wporg-5ftf/includes/pledge-meta.php @@ -202,7 +202,7 @@ function add_meta_boxes() { * @param array $box */ function render_meta_boxes( $pledge, $box ) { - $readonly = ! current_user_can( 'edit_page', $pledge->ID ); + $readonly = ! current_user_can( 'edit_page', $pledge->ID ); $is_manage = true; $data = array();