| 1 |
<?php |
| 2 |
/** |
| 3 |
* Renders the campaign description field for the Campaign post type. |
| 4 |
* |
| 5 |
* @author WP Charitable LLC |
| 6 |
* @since 1.0.0 |
| 7 |
* @package Charitable/Admin Views/Metaboxes |
| 8 |
*/ |
| 9 |
|
| 10 |
global $post; |
| 11 |
|
| 12 |
$title = isset( $view_args['title'] ) ? $view_args['title'] : ''; |
| 13 |
$tooltip = isset( $view_args['tooltip'] ) ? '<span class="tooltip"> '. $view_args['tooltip'] . '</span>' : ''; |
| 14 |
$campaign_description = get_post_meta( $post->ID, '_campaign_description', true ); // esc_textarea was removed |
| 15 |
|
| 16 |
$textarea_name = 'content'; |
| 17 |
$textarea_rows = apply_filters( 'charitable_campaign_description_rows', 15 ); |
| 18 |
$textarea_tab_index = isset( $view_args['tab_index'] ) ? $view_args['tab_index'] : 0; |
| 19 |
|
| 20 |
wp_editor( $campaign_description, '_charitable_campaign_description', array( |
| 21 |
'textarea_name' => '_campaign_description', |
| 22 |
'textarea_rows' => $textarea_rows, |
| 23 |
'tabindex' => $textarea_tab_index, |
| 24 |
) ); |
| 25 |
|
| 26 |
// $textarea_name = 'content'; |
| 27 |
// $textarea_rows = apply_filters( 'charitable_extended_description_rows', 40 ); |
| 28 |
// $textarea_tab_index = isset( $view_args['tab_index'] ) ? $view_args['tab_index'] : 0; |
| 29 |
|
| 30 |
// wp_editor( $post->post_content, 'charitable-extended-description', array( |
| 31 |
// 'textarea_name' => 'post_content', |
| 32 |
// 'textarea_rows' => $textarea_rows, |
| 33 |
// 'tabindex' => $textarea_tab_index, |
| 34 |
// ) ); |
| 35 |
|
| 36 |
/* |
| 37 |
<div id="charitable-campaign-description-metabox-wrap" class="charitable-metabox-wrap"> |
| 38 |
<label class="screen-reader-text" for="campaign_description"><?php echo $campaign_description ?></label> |
| 39 |
<textarea name="_campaign_description" id="campaign_description" tabindex="" rows="10" placeholder="<?php _e( 'Enter a short description of your campaign', 'charitable' ); ?>"><?php echo $campaign_description ?></textarea> |
| 40 |
</div> |
| 41 |
*/ |
| 42 |
|
| 43 |
?> |