name = esc_html__( 'Campaign Description', 'charitable' ); $this->type = 'campaign-description'; $this->icon = 'fa-paragraph'; $this->order = 10; $this->align_default = 'center'; // Edit/Duplication information. $this->can_be_edited = true; $this->can_be_deleted = true; $this->can_be_duplicated = false; $this->edit_label = esc_html__( 'Edit Campaign Description', 'charitable' ); $this->edit_type = 'campaign-description'; // was settings. $this->edit_section = 'recommended'; $this->max_allowed = 1; // Misc. $this->tooltip = esc_html__( 'Placeholder tool tip', 'charitable' ); $this->preview_character_limit = 99550; // Define additional field properties. add_action( 'charitable_frontend_js', [ $this, 'frontend_js' ] ); } /** * Campaign Description options panel inside the builder. * * @since 1.8.0 * * @param array $field Campaign Description settings. */ public function field_options( $field ) { /* * Basic field options. */ // Options open markup. } /** * Render the field. * * @since 1.8.0 * * @param array $field_data Any field data. * @param array $campaign_data Amount data and settings. * @param integer $field_id The field ID. * @param string $mode Where the field is being displayed ("preview" or "template"). * @param array $template_data Tempalate data. */ public function render( $field_data = false, $campaign_data = false, $field_id = false, $mode = 'template', $template_data = false ) { $campaign_description = ! empty( $campaign_data['settings']['general']['description'] ) ? ( $campaign_data['settings']['general']['description'] ) : ''; // todo: santitize. $campaign_description = ( $campaign_description === '' && ! empty( $field_data['content'] ) ) ? ( $field_data['content'] ) : $campaign_description; // todo: santitize. $headline = ! empty( $field_data['headline'] ) ? esc_html( $field_data['headline'] ) : false; $field_preview_html = '
This is an example of a campaign description. It should summarize thoughtfully what your campaign is about and what your goal(s) are. If this is the only campaign of your site you can link to a more detailed About page that introduces into more detail. The description here might say something like this:
Hi there! This campaign is to raise money for equipment, uniforms, and various other supplies for our local school sport team, The Tigers.
...or something like this:
The Tigers basebase team was founded in 1971 and has been providing fun after school activities for young children in the Dalls, Texas USA public schools ever since. The campaign is run by Mr. and Mrs. Smith and employs about 5 people including coaches and staff.
Since this is a new campaign, you as a Charitable admin should update this content by clicking on this block in the preview area in the campaign builder. 😄