mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-03 01:31:17 +03:00
Add employee number meta field
This commit is contained in:
parent
985521b4da
commit
1944ab6cf6
|
@ -26,30 +26,36 @@ add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_asse
|
||||||
*/
|
*/
|
||||||
function get_pledge_meta_config( $context = '' ) {
|
function get_pledge_meta_config( $context = '' ) {
|
||||||
$user_input = array(
|
$user_input = array(
|
||||||
'org-description' => array(
|
'org-description' => array(
|
||||||
'single' => true,
|
'single' => true,
|
||||||
'sanitize_callback' => 'sanitize_text_field',
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
'show_in_rest' => true,
|
'show_in_rest' => true,
|
||||||
'php_filter' => FILTER_SANITIZE_STRING,
|
'php_filter' => FILTER_SANITIZE_STRING,
|
||||||
),
|
),
|
||||||
'org-name' => array(
|
'org-name' => array(
|
||||||
'single' => true,
|
'single' => true,
|
||||||
'sanitize_callback' => 'sanitize_text_field',
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
'show_in_rest' => true,
|
'show_in_rest' => true,
|
||||||
'php_filter' => FILTER_SANITIZE_STRING,
|
'php_filter' => FILTER_SANITIZE_STRING,
|
||||||
),
|
),
|
||||||
'org-url' => array(
|
'org-url' => array(
|
||||||
'single' => true,
|
'single' => true,
|
||||||
'sanitize_callback' => 'esc_url_raw',
|
'sanitize_callback' => 'esc_url_raw',
|
||||||
'show_in_rest' => true,
|
'show_in_rest' => true,
|
||||||
'php_filter' => FILTER_VALIDATE_URL,
|
'php_filter' => FILTER_VALIDATE_URL,
|
||||||
),
|
),
|
||||||
'org-pledge-email' => array(
|
'org-pledge-email' => array(
|
||||||
'single' => true,
|
'single' => true,
|
||||||
'sanitize_callback' => 'sanitize_email',
|
'sanitize_callback' => 'sanitize_email',
|
||||||
'show_in_rest' => false,
|
'show_in_rest' => false,
|
||||||
'php_filter' => FILTER_VALIDATE_EMAIL,
|
'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(
|
$generated = array(
|
||||||
|
@ -149,6 +155,7 @@ function render_meta_boxes( $pledge, $box ) {
|
||||||
case 'pledge-email':
|
case 'pledge-email':
|
||||||
require FiveForTheFuture\get_views_path() . 'inputs-pledge-org-email.php';
|
require FiveForTheFuture\get_views_path() . 'inputs-pledge-org-email.php';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'org-info':
|
case 'org-info':
|
||||||
require FiveForTheFuture\get_views_path() . 'inputs-pledge-org-info.php';
|
require FiveForTheFuture\get_views_path() . 'inputs-pledge-org-info.php';
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue