mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-14 14:25:45 +03:00
Contributors: Add Contributors CPT and related admin UI
This commit is contained in:
parent
aaf8b1a712
commit
75428a3c95
4 changed files with 158 additions and 36 deletions
|
@ -8,6 +8,7 @@ namespace WordPressDotOrg\FiveForTheFuture\PledgeMeta;
|
|||
use WordPressDotOrg\FiveForTheFuture;
|
||||
use WordPressDotOrg\FiveForTheFuture\Pledge;
|
||||
use WordPressDotOrg\FiveForTheFuture\PledgeForm;
|
||||
use WordPressDotOrg\FiveForTheFuture\Contributor;
|
||||
use WP_Post, WP_Error;
|
||||
|
||||
defined( 'WPINC' ) || die();
|
||||
|
@ -153,12 +154,14 @@ function add_meta_boxes() {
|
|||
*/
|
||||
function render_meta_boxes( $pledge, $box ) {
|
||||
$readonly = ! current_user_can( 'edit_page', $pledge->ID );
|
||||
$data = array();
|
||||
|
||||
$data = array();
|
||||
foreach ( get_pledge_meta_config() as $key => $config ) {
|
||||
$data[ $key ] = get_post_meta( $pledge->ID, META_PREFIX . $key, $config['single'] );
|
||||
}
|
||||
|
||||
$contributors = Contributor\get_pledge_contributors( $pledge->ID, 'all' );
|
||||
|
||||
echo '<div class="pledge-form">';
|
||||
|
||||
switch ( $box['id'] ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue