| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Renders the campaign goal block in the settings metabox for the Campaign post type. |
| 10 |
* |
| 11 |
* @author WP Charitable LLC |
| 12 |
* @since 1.0.0 |
| 13 |
* @package Charitable/Admin Views/Metaboxes |
| 14 |
* @version 1.8.8.6 |
| 15 |
*/ |
| 16 |
|
| 17 |
global $post; |
| 18 |
|
| 19 |
$title = isset( $view_args['title'] ) ? $view_args['title'] : ''; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited |
| 20 |
$charitable_tooltip = isset( $view_args['tooltip'] ) ? '<span class="tooltip"> ' . $view_args['tooltip'] . '</span>' : ''; |
| 21 |
$charitable_description = isset( $view_args['description'] ) ? '<span class="charitable-helper">' . wp_kses_post( $view_args['description'] ) . '</span>' : ''; |
| 22 |
$charitable_goal = get_post_meta( $post->ID, '_campaign_goal', true ); |
| 23 |
$charitable_goal = ! $charitable_goal ? '' : charitable_format_money( $charitable_goal ); |
| 24 |
?> |
| 25 |
<div id="charitable-campaign-goal-metabox-wrap" class="charitable-metabox-wrap"> |
| 26 |
<label class="screen-reader-text" for="campaign_goal"><?php echo wp_kses_post( $title ); ?></label> |
| 27 |
<input type="text" id="campaign_goal" name="_campaign_goal" placeholder="∞" value="<?php echo esc_attr( $charitable_goal ); ?>" /> |
| 28 |
<?php echo $charitable_description; // phpcs:ignore ?> |
| 29 |
</div> |
| 30 |
|