name = esc_html__( 'Campaign Title', 'charitable' ); $this->type = 'campaign-title'; $this->icon = 'fa-text-width'; $this->order = 10; // Edit/Duplication information. $this->can_be_edited = true; $this->can_be_deleted = true; $this->can_be_duplicated = true; $this->edit_label = esc_html__( 'Edit Campaign Title', 'charitable' ); $this->edit_type = 'campaign-title'; $this->edit_section = 'standard'; // Misc. $this->tooltip = esc_html__( 'Placeholder tool tip', 'charitable' ); $this->preview_character_limit = 150; // Define additional field properties. add_action( 'charitable_frontend_js', [ $this, 'frontend_js' ] ); } /** * Campaign Title options panel inside the builder. * * @since 1.8.0 * * @param array $field Campaign Title 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_title = ! empty( $campaign_data['title'] ) ? esc_html( stripslashes( $campaign_data['title'] ) ) : esc_html__( 'Campaign', 'charitable' ); $html = '