| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Renders the campaign title field 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 |
|
| 22 |
/** |
| 23 |
* Filter the title field placeholder text. |
| 24 |
* |
| 25 |
* @since 3.1.0 |
| 26 |
* |
| 27 |
* @param string $text Placeholder text. Default 'Enter title here'. |
| 28 |
* @param WP_Post $post Post object. |
| 29 |
*/ |
| 30 |
$charitable_title_placeholder = apply_filters( 'enter_title_here', __( 'Enter campaign title here', 'charitable' ), $post ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- 'enter_title_here' is a WordPress core filter hook. |
| 31 |
?> |
| 32 |
<div id="charitable-campaign-title-metabox-wrap" class="charitable-metabox-wrap"> |
| 33 |
<label class="screen-reader-text" for="title"><?php echo wp_kses_post( $charitable_title_placeholder ); ?></label> |
| 34 |
<input type="text" name="post_title" size="30" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" spellcheck="true" autocomplete="off" placeholder="<?php echo esc_attr( $charitable_title_placeholder ); ?>" tabindex="1" /> |
| 35 |
</div> |
| 36 |
|