From 701af36fa890ebdd40876d5be7755912baa4da3d Mon Sep 17 00:00:00 2001 From: Corey McKrill <916023+coreymckrill@users.noreply.github.com> Date: Fri, 25 Oct 2019 12:10:44 -0700 Subject: [PATCH] Pledge: remove "number of employees" field This field isn't necessary because we will be counting the number of confirmed contributor posts associated with the pledge instead. --- plugins/wporg-5ftf/includes/pledge-meta.php | 14 ++++---------- .../wporg-5ftf/views/inputs-pledge-org-info.php | 14 -------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/plugins/wporg-5ftf/includes/pledge-meta.php b/plugins/wporg-5ftf/includes/pledge-meta.php index fae6281..e074ed8 100755 --- a/plugins/wporg-5ftf/includes/pledge-meta.php +++ b/plugins/wporg-5ftf/includes/pledge-meta.php @@ -32,36 +32,30 @@ add_action( 'added_post_meta', __NAMESPACE__ . '\update_generated_meta', 10, 4 */ function get_pledge_meta_config( $context = '' ) { $user_input = array( - 'org-description' => array( + 'org-description' => array( 'single' => true, 'sanitize_callback' => 'sanitize_text_field', 'show_in_rest' => true, 'php_filter' => FILTER_SANITIZE_STRING, ), - 'org-name' => array( + 'org-name' => array( 'single' => true, 'sanitize_callback' => 'sanitize_text_field', 'show_in_rest' => true, 'php_filter' => FILTER_SANITIZE_STRING, ), - 'org-url' => array( + 'org-url' => array( 'single' => true, 'sanitize_callback' => 'esc_url_raw', 'show_in_rest' => true, 'php_filter' => FILTER_VALIDATE_URL, ), - 'org-pledge-email' => array( + 'org-pledge-email' => array( 'single' => true, 'sanitize_callback' => 'sanitize_email', 'show_in_rest' => false, 'php_filter' => FILTER_VALIDATE_EMAIL, ), - 'org-number-employees' => array( - 'single' => true, - 'sanitize_callback' => 'absint', - 'show_in_rest' => false, - 'php_filter' => FILTER_VALIDATE_INT, - ), ); $generated = array( diff --git a/plugins/wporg-5ftf/views/inputs-pledge-org-info.php b/plugins/wporg-5ftf/views/inputs-pledge-org-info.php index c2e6064..a3fc05f 100644 --- a/plugins/wporg-5ftf/views/inputs-pledge-org-info.php +++ b/plugins/wporg-5ftf/views/inputs-pledge-org-info.php @@ -60,17 +60,3 @@ namespace WordPressDotOrg\FiveForTheFuture\View; echo esc_html( $data['org-description'] ); /* phpcs:ignore */ ?> - -