PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 All 211 releases
charitable / includes / admin / campaign-builder / fields / class-social-links.php

class-social-links.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at includes/admin/campaign-builder/fields/class-social-links.php

571 lines 22.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class to add a social links area to a campaign form in the builder.
4 *
5 * @package Charitable
6 * @author David Bisset
7 * @copyright Copyright (c) 2023, WP Charitable LLC
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.8.0
10 * @version 1.8.0
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 if ( ! class_exists( 'Charitable_Field_Social_Links' ) ) :
18
19 /**
20 * Class to add campaign social links field to a campaign form in the builder.
21 */
22 class Charitable_Field_Social_Links extends Charitable_Builder_Field {
23
24 /**
25 * Primary class constructor.
26 *
27 * @since 1.8.0
28 */
29 public function init() {
30
31 // Basic information.
32 $this->name = esc_html__( 'Social Links', 'charitable' );
33 $this->type = 'social-links';
34 $this->icon = 'fa-link';
35 $this->order = 100;
36
37 $this->align_default = 'left';
38
39 // Edit/Duplication information.
40 $this->can_be_edited = true;
41 $this->can_be_deleted = true;
42 $this->can_be_duplicated = true;
43 $this->edit_label = esc_html__( 'Edit Social Links', 'charitable' );
44 $this->edit_type = 'social-links';
45 $this->edit_section = 'standard';
46
47 // Misc.
48 $this->tooltip = '';
49
50 // Define additional field properties.
51 add_action( 'charitable_frontend_js', [ $this, 'frontend_js' ] );
52 }
53
54 /**
55 * Social Links options panel inside the builder.
56 *
57 * @since 1.8.0
58 *
59 * @param array $field Social Links settings.
60 */
61 public function field_options( $field ) {
62 /*
63 * Basic field options.
64 */
65
66 // Options open markup.
67 }
68
69 /**
70 * Render the field.
71 *
72 * @since 1.8.0
73 *
74 * @param array $field_data Any field data.
75 * @param array $campaign_data Amount data and settings.
76 * @param integer $field_id The field ID.
77 * @param string $mode Where the field is being displayed ("preview" or "template").
78 * @param array $template_data Tempalate data.
79 */
80 public function render( $field_data = false, $campaign_data = false, $field_id = false, $mode = 'template', $template_data = false ) {
81
82 $social_networks_settings = $field_id !== false && ! empty( $campaign_data['fields'] ) && ! empty( $campaign_data['fields'][ intval( $field_id ) ] ) ? $campaign_data['fields'][ intval( $field_id ) ] : false;
83 $social_networks_settings = empty( $social_networks_settings ) && ! empty( $field_data ) ? $field_data : $social_networks_settings;
84 $headline = ! empty( $field_data['headline'] ) ? esc_html( $field_data['headline'] ) : false;
85 $headline = false === $headline ? esc_html__( 'Learn More:', 'charitable' ) : $headline;
86 $open_new_tab = ! empty( $field_data['open_new_tab'] ) ? esc_html( $field_data['open_new_tab'] ) : false;
87 $new_tab = ( 1 === intval( $open_new_tab ) ) ? 'target="_blank"' : false;
88
89 $html = '<div class="charitable-field-' . $mode . '-social-linking">';
90
91 if ( trim( $headline ) !== '' ) {
92 $html .= '<div class="charitable-field-' . $mode . '-social-linking-headline-container charitable-placeholder"><h5 class="charitable-field-' . $mode . '-headline">' . trim( $headline ) . '</h5></div>';
93 }
94
95 $html .= '<div class="charitable-field-row charitable-field-row-social-linking">';
96
97 $social_networks_settings = $this->custom_sort_social_network_preview( $social_networks_settings );
98 $suffix = ! empty( $template_data['meta']['suffixes'][ $this->type ] ) ? esc_attr( $template_data['meta']['suffixes'][ $this->type ] ) : false;
99 $social_networks_template = ( $mode === 'template' ) ? $this->get_social_networks( $campaign_data, $mode, $suffix ) : false;
100
101 foreach ( $social_networks_settings as $label => $value ) {
102
103 $label = str_replace( '_url', '', esc_attr( $label ) );
104 if ( ! array_intersect( array( 'twitter', 'facebook', 'linkedin', 'instagram', 'tiktok', 'pinterest', 'mastodon', 'youtube', 'threads', 'bluesky' ), array( $label ) ) ) {
105 continue;
106 }
107
108 if ( '' !== trim( $value ) ) {
109
110 if ( $mode === 'template' ) {
111
112 $icon_url = ( ! empty( $social_networks_template[ $label ]['icon_url'] ) ) ? $social_networks_template[ $label ]['icon_url'] : charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/mastodon.svg'; // todo: replace with a genric icon of some sort.
113 $link = isset( $field_data[ $label . '_url' ] ) ? esc_url( $field_data[ $label . '_url' ] ) : false;
114
115 if ( $link ) {
116
117 $html .= '<div class="charitable-social-field-column charitable-social-linking-' . $mode . '-' . $label . '">
118 <div class="charitable-campaign-social-link" data-social-network="' . $label . '">
119 <a href="' . esc_url( $link ) . '" ' . $new_tab . '>
120 <div><img title="' . $social_networks_template[ $label ]['public_label'] . '" src="' . $icon_url . '" alt="' . $social_networks_template[ $label ]['public_label'] . '" /></div>
121 <p>' . $social_networks_template[ $label ]['public_label'] . '</p>
122 </a>
123 </div>
124 </div>';
125
126 }
127 } else {
128 $html .= '<div class="charitable-social-field-column charitable-social-linking-' . $mode . '-' . $label . '">
129 <span class="charitable-placeholder"></span>
130 </div>';
131 }
132 } elseif ( $mode === 'preview' ) {
133 $html .= '<div class="charitable-social-field-column charitable-hidden charitable-social-linking-' . $mode . '-' . $label . '">
134 <span class="charitable-placeholder"></span>
135 </div>';
136 }
137 }
138
139 if ( 'template' === $mode && empty( array_filter( $social_networks_settings ) ) ) { // phpcs:ignore
140
141 } else {
142
143 $hide_class = ! empty( array_filter( $social_networks_settings ) ) ? 'charitable-hidden' : false;
144
145 $html .= '<div class="charitable-social-linking-no-links ' . $hide_class . '">
146 <p><em>' . esc_html__( 'Add a url to a social network in the field settings on the left to see icons start to appear here.', 'charitable' ) . '</em></p>
147 </div>';
148 }
149
150 $html .= '</div>';
151 $html .= '</div>';
152
153 return $html;
154 }
155
156 /**
157 * Social Links preview inside the builder.
158 *
159 * @since 1.8.0
160 *
161 * @param array $field_data Field data and settings.
162 * @param array $campaign_data Campaign data and settings.
163 * @param array $field_id Field ID.
164 * @param string $theme Template data.
165 */
166 public function field_preview( $field_data = false, $campaign_data = false, $field_id = false, $theme = '' ) {
167
168 $html = $this->field_title( $this->name );
169 $html .= $this->field_wrapper( $this->render( $field_data, $campaign_data, $field_id, 'preview', $theme ), $field_data );
170
171 echo $html; // phpcs:ignore
172 }
173
174 /**
175 * The display on the campaign front-end.
176 *
177 * @since 1.8.0
178 *
179 * @param string $field_type The passed field type.
180 * @param array $field_data Any field data.
181 * @param array $campaign_data Amount data and settings.
182 * @param bool $is_preview_page If the page is a preview page.
183 * @param int $field_id The field ID.
184 * @param array $template_data Template data.
185 */
186 public function field_display( $field_type = '', $field_data = false, $campaign_data = false, $is_preview_page = false, $field_id = false, $template_data = false ) {
187
188 $html = $this->field_display_wrapper( $this->render( $field_data, $campaign_data, $field_id, 'template', $template_data ), $field_data );
189
190 echo apply_filters( 'charitable_campaign_builder_' . $this->type . '_field_display', $html, $campaign_data ); // phpcs:ignore
191 }
192
193 /**
194 * The display on the form settings backend when the user clicks on the field/block.
195 *
196 * @since 1.8.0
197 *
198 * @param int $field_id Field ID.
199 * @param array $campaign_data Campaign data and settings.
200 */
201 public function settings_display( $field_id = false, $campaign_data = false ) {
202
203 if ( ! class_exists( 'Charitable_Builder_Form_Fields' ) ) {
204 return;
205 }
206
207 $charitable_builder_form_fields = new Charitable_Builder_Form_Fields();
208
209 $settings = isset( $campaign_data['fields'][ $field_id ] ) ? $campaign_data['fields'][ $field_id ] : false;
210 $social_html = array();
211 $social_networks = $this->get_social_networks( $campaign_data );
212
213 if ( empty( $social_networks ) ) {
214 return;
215 }
216
217 add_action( 'charitable_builder_' . $this->type . '_settings_display_start', [ $this, 'settings_section_top' ], 10, 2 );
218 add_action( 'charitable_builder_' . $this->type . '_settings_display_end', [ $this, 'settings_section_bottom' ], 10, 2 );
219
220 ob_start();
221
222 ?>
223
224 <h4 class="charitable-panel-field" data-field-id="<?php echo intval( $field_id ); ?>"><?php echo esc_html( $this->name ); ?> (ID: <?php echo intval( $field_id ); ?>)</h4>
225
226 <div class="charitable-panel-field charitable-panel-field-section" data-field-id="<?php echo intval( $field_id ); ?>">
227
228 <?php do_action( 'charitable_builder_' . $this->type . '_settings_display_start', $field_id, $campaign_data ); ?>
229
230 </div>
231
232 <?php
233
234 echo $charitable_builder_form_fields->generate_text( // phpcs:ignore
235 isset( $settings['headline'] ) ? $settings['headline'] : esc_html__( 'Learn More:', 'charitable' ),
236 esc_html__( 'Headline', 'charitable' ),
237 array(
238 'id' => 'field_' . esc_attr( $this->type ) . '_headline' . '_' . intval( $field_id ), // phpcs:ignore
239 'name' => array( '_fields', intval( $field_id ), 'headline' ),
240 'field_id' => intval( $field_id ),
241 'class' => 'charitable-campaign-builder-headline',
242 )
243 );
244
245 // Go through all the social networks.
246
247 foreach ( $social_networks as $social_id => $data ) :
248
249 $social_html[] = $charitable_builder_form_fields->generate_text(
250 isset( $settings[ $data['field_id'] ] ) ? $settings[ $data['field_id'] ] : false,
251 $data['label'],
252 array(
253 'id' => 'field_' . esc_attr( $this->type ) . '_' . $data['field_id'] . '_' . intval( $field_id ), // phpcs:ignore
254 'name' => array( '_fields', intval( $field_id ), $data['field_id'] ),
255 'field_id' => $field_id,
256 'type' => 'url',
257 'class' => 'charitable-campaign-builder-social-links-text-field',
258 'placeholder' => 'https://',
259 )
260 );
261
262 endforeach;
263
264 $social_html = apply_filters( 'charitable_campaign_builder_social_links_html', $social_html );
265
266 if ( empty( $social_html ) || ! is_array( $social_html ) ) {
267 return;
268 }
269
270 foreach ( $social_html as $html ) {
271 echo $html; // phpcs:ignore
272 }
273
274 echo $charitable_builder_form_fields->generate_toggle( // phpcs:ignore
275 isset( $settings['open_new_tab'] ) ? $settings['open_new_tab'] : false,
276 esc_html__( 'Open Links In New Tab', 'charitable' ),
277 array(
278 'id' => 'field_' . esc_attr( $this->type ) . '_open_new_tab' . '_' . intval( $field_id ), // phpcs:ignore
279 'name' => array( '_fields', intval( $field_id ), 'open_new_tab' ),
280 'field_id' => intval( $field_id ),
281 )
282 );
283
284 echo $charitable_builder_form_fields->generate_divider( false, false, array( 'field_id' => intval( $field_id ) ) ); // phpcs:ignore
285
286 echo $charitable_builder_form_fields->generate_number_slider( // phpcs:ignore
287 isset( $settings['width_percentage'] ) ? $settings['width_percentage'] : 100,
288 esc_html__( 'Width', 'charitable' ),
289 array(
290 'id' => 'field_' . esc_attr( $this->type ) . '_width_percentage' . '_' . intval( $field_id ), // phpcs:ignore
291 'name' => array( '_fields', intval( $field_id ), 'width_percentage' ),
292 'field_type' => esc_attr( $this->type ),
293 'field_id' => intval( $field_id ),
294 'symbol' => '%',
295 'min' => 0,
296 'min_actual' => 50,
297 'css_class' => 'charitable-indicator-on-hover',
298 'tooltip' => esc_html__( 'Adjust the width of the field within the column.', 'charitable' ),
299 )
300 );
301
302 echo $charitable_builder_form_fields->generate_align( // phpcs:ignore
303 isset( $settings['align'] ) ? $settings['align'] : esc_attr( $this->align_default ),
304 esc_html__( 'Align', 'charitable' ),
305 array(
306 'id' => 'field_' . esc_attr( $this->type ) . '_align' . '_' . intval( $field_id ), // phpcs:ignore
307 'name' => array( '_fields', intval( $field_id ), 'align' ),
308 'field_id' => intval( $field_id ),
309 'default' => 'left',
310 )
311 );
312
313 /* CSS CLASS */
314
315 echo $charitable_builder_form_fields->generate_text( // phpcs:ignore
316 isset( $settings['css_class'] ) ? $settings['css_class'] : false,
317 esc_html__( 'CSS Class', 'charitable' ),
318 array(
319 'id' => 'field_' . esc_attr( $this->type ) . '_css_class' . '_' . intval( $field_id ), // phpcs:ignore
320 'name' => array( '_fields', intval( $field_id ), 'css_class' ),
321 'field_id' => intval( $field_id ),
322 'tooltip' => esc_html__( 'Add CSS classes (seperated by a space) for this field to customize it\'s appearance in your theme.', 'charitable' ),
323 )
324 );
325
326 ?>
327
328 <div class="charitable-panel-field charitable-panel-field-section" data-field-id="<?php echo intval( $field_id ); ?>">
329
330 <?php do_action( 'charitable_builder_' . $this->type . '_settings_display_end', $field_id, $campaign_data ); ?>
331
332 </div>
333
334 <?php
335
336 remove_action( 'charitable_builder_' . $this->type . '_settings_display_start', [ $this, 'settings_section_top' ], 10 );
337 remove_action( 'charitable_builder_' . $this->type . '_settings_display_end', [ $this, 'settings_section_bottom' ], 10 );
338
339 $html = ob_get_clean();
340
341 return $html;
342 }
343
344 /**
345 * Display content above the content settings in the panel in the admin via hook.
346 *
347 * @since 1.8.0
348 *
349 * @param integer $field_id Field ID.
350 * @param array $campaign_data Data on campaign.
351 */
352 public function settings_section_top( $field_id = false, $campaign_data = false ) {
353
354 $message = '<p>' . esc_html__( 'Don\'t see a social network here that you use and would like added?', 'charitable' ) . ' <a target="_blank" class="charitable-new-tab-link" data-type="' . esc_attr( $this->edit_type ) . '" data-section="' . $this->edit_section . '" href="https://wpcharitable.com/contact">' . esc_html__( 'Let us know!', 'charitable' ) . '</a></p>';
355
356 echo $message; // phpcs:ignore
357 }
358
359 /**
360 * Display content above the content settings in the panel in the admin via hook.
361 *
362 * @since 1.8.0
363 *
364 * @param integer $field_id Field ID.
365 * @param array $campaign_data Data on campaign.
366 */
367 public function settings_section_bottom( $field_id = false, $campaign_data = false ) {
368 }
369
370 /**
371 * Enqueue frontend limit option js.
372 *
373 * @since 1.8.0
374 *
375 * @param array $forms Forms on the current page.
376 */
377 public function frontend_js( $forms ) {
378 }
379
380 /**
381 * Format and sanitize field.
382 *
383 * @since 1.8.0
384 *
385 * @param int $field_id Social Links ID.
386 * @param mixed $field_submit Social Links value that was submitted.
387 * @param array $campaign_data Form data and settings.
388 */
389 public function format( $field_id, $field_submit, $campaign_data ) {
390 }
391
392 /**
393 * Custom sort the array on the preview side.
394 *
395 * @since 1.8.0
396 *
397 * @param array $social_networks_settings Social networks.
398 */
399 public function custom_sort_social_network_preview( $social_networks_settings ) {
400
401 $updated_settings = array(
402 'twitter_url' => isset( $social_networks_settings['twitter_url'] ) ? esc_url( $social_networks_settings['twitter_url'] ) : '',
403 'facebook_url' => isset( $social_networks_settings['facebook_url'] ) ? esc_url( $social_networks_settings['facebook_url'] ) : '',
404 'linkedin_url' => isset( $social_networks_settings['linkedin_url'] ) ? esc_url( $social_networks_settings['linkedin_url'] ) : '',
405 'instagram_url' => isset( $social_networks_settings['instagram_url'] ) ? esc_url( $social_networks_settings['instagram_url'] ) : '',
406 'tiktok_url' => isset( $social_networks_settings['tiktok_url'] ) ? esc_url( $social_networks_settings['tiktok_url'] ) : '',
407 'pinterest_url' => isset( $social_networks_settings['pinterest_url'] ) ? esc_url( $social_networks_settings['pinterest_url'] ) : '',
408 'mastodon_url' => isset( $social_networks_settings['mastodon_url'] ) ? esc_url( $social_networks_settings['mastodon_url'] ) : '',
409 'youtube_url' => isset( $social_networks_settings['youtube_url'] ) ? esc_url( $social_networks_settings['youtube_url'] ) : '',
410 'threads_url' => isset( $social_networks_settings['threads_url'] ) ? esc_url( $social_networks_settings['threads_url'] ) : '',
411 'bluesky_url' => isset( $social_networks_settings['bluesky_url'] ) ? esc_url( $social_networks_settings['bluesky_url'] ) : '',
412 );
413
414 return apply_filters( 'charitable_campaign_social_links_networks_preview', $updated_settings, $social_networks_settings );
415 }
416
417 /**
418 * Format and sanitize field.
419 *
420 * @since 1.8.0
421 *
422 * @param string $social_network Text slug of social network.
423 */
424 public function format_share_link( $social_network = false ) {
425
426 if ( false === $social_network ) {
427 return;
428 }
429
430 global $post;
431
432 $url = ( get_permalink( $post->ID ) );
433
434 switch ( $social_network ) {
435 case 'twitter':
436 $link = 'http://twitter.com/share?text=&url=' . esc_url( $url ) . ''; // &hashtags=hashtag1,hashtag2,hashtag3
437 break;
438 case 'facebook':
439 $link = 'https://www.facebook.com/sharer/sharer.php?u=' . esc_url( $url );
440 break;
441 case 'linkedin':
442 $link = 'https://www.linkedin.com/links/share-offsite/?url=' . esc_url( $url );
443 break;
444 case 'instagram':
445 $link = 'https://www.instagram.com/?url=' . esc_url( $url );
446 break;
447 case 'tiktok':
448 $link = 'https://www.tiktok.com/?url=' . esc_url( $url );
449 break;
450 case 'pinterest':
451 $link = 'https://pinterest.com/pin/create/button/?url=' . esc_url( $url );
452 break;
453 case 'bluesky':
454 $link = 'https://bsky.app/intent/compose?text=' . esc_url( $url );
455 break;
456 case 'mastodon':
457 $link = esc_url( $url );
458 break;
459 default:
460 $link = false;
461 break;
462 }
463
464 return apply_filters( 'charitable_campaign_social_links_network_link', $link, $social_network );
465 }
466
467 /**
468 * Validate field on form submit.
469 *
470 * @since 1.8.0
471 *
472 * @param int $field_id Social Links ID.
473 * @param mixed $field_submit Social Links value that was submitted.
474 * @param array $campaign_data Form data and settings.
475 */
476 public function validate( $field_id, $field_submit, $campaign_data ) {
477 }
478
479 /**
480 * Return main list of social networks.
481 *
482 * @since 1.8.0
483 *
484 * @param array $campaign_data Form data and settings.
485 * @param string $mode Where the field is being displayed ("preview" or "template").
486 * @param string $suffix Suffix for the icon.
487 */
488 public function get_social_networks( $campaign_data = false, $mode = 'preview', $suffix = '' ) {
489
490 return (array) apply_filters(
491 'charitable_builder_social_links_networks',
492 array(
493 'twitter' => array(
494 'label' => 'Twitter / X URL',
495 'field_id' => 'twitter_url',
496 'public_label' => 'Twitter / X',
497 'icon' => 'fa-brands fa-twitter',
498 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/twitter' . $suffix . '.svg',
499 ),
500 'facebook' => array(
501 'label' => 'Facebook URL',
502 'field_id' => 'facebook_url',
503 'public_label' => 'Facebook',
504 'icon' => 'fa-brands fa-facebook',
505 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/facebook' . $suffix . '.svg',
506 ),
507 'linkedin' => array(
508 'label' => 'LinkedIn URL',
509 'field_id' => 'linkedin_url',
510 'public_label' => 'LinkedIn',
511 'icon' => 'fa-brands fa-linkedin',
512 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/linkedin' . $suffix . '.svg',
513 ),
514 'instagram' => array(
515 'label' => 'Instagram URL',
516 'field_id' => 'instagram_url',
517 'public_label' => 'Instagram',
518 'icon' => 'fa-brands fa-instagram',
519 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/instagram' . $suffix . '.svg',
520 ),
521 'tiktok' => array(
522 'label' => 'TikTok URL',
523 'field_id' => 'tiktok_url',
524 'public_label' => 'TikTok',
525 'icon' => 'fa-brands fa-tiktok',
526 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/tiktok' . $suffix . '.svg',
527 ),
528 'pinterest' => array(
529 'label' => 'Pinterest URL',
530 'field_id' => 'pinterest_url',
531 'public_label' => 'Pinterest',
532 'icon' => 'fa-brands fa-pinterest',
533 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/pinterest' . $suffix . '.svg',
534 ),
535 'youtube' => array(
536 'label' => 'YouTube URL',
537 'field_id' => 'youtube_url',
538 'public_label' => 'YouTube',
539 'icon' => 'fa-brands fa-youtube',
540 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/youtube' . $suffix . '.svg',
541 ),
542 'threads' => array(
543 'label' => 'Threads URL',
544 'field_id' => 'threads_url',
545 'public_label' => 'Threads',
546 'icon' => 'fa-brands fa-threads',
547 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/threads' . $suffix . '.svg',
548 ),
549 'bluesky' => array(
550 'label' => 'Bluesky URL',
551 'field_id' => 'bluesky_url',
552 'public_label' => 'Bluesky',
553 'icon' => 'fa-brands fa-bluesky',
554 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/bluesky' . $suffix . '.svg',
555 ),
556 'mastodon' => array(
557 'label' => 'Mastodon URL',
558 'field_id' => 'mastodon_url',
559 'public_label' => 'Mastodon',
560 'icon' => 'fa-brands fa-mastodon',
561 'icon_url' => charitable()->get_path( 'directory', false ) . 'assets/images/campaign-builder/fields/social-sharing/mastodon' . $suffix . '.svg',
562 ),
563 ),
564 $campaign_data
565 );
566 }
567 }
568
569 new Charitable_Field_Social_Links();
570
571 endif;