| 1 |
<?php |
| 2 |
|
| 3 |
namespace Better_Payment\Lite\Admin\Elementor; |
| 4 |
|
| 5 |
use Better_Payment\Lite\Admin\DB; |
| 6 |
use Better_Payment\Lite\Classes\Handler; |
| 7 |
use Better_Payment\Lite\Classes\Helper as ClassesHelper; |
| 8 |
use Better_Payment\Lite\Traits\Helper; |
| 9 |
use \Elementor\Controls_Manager as Controls_Manager; |
| 10 |
use Elementor\Core\Kits\Documents\Tabs\Global_Typography; |
| 11 |
use Elementor\Group_Control_Background; |
| 12 |
use Elementor\Group_Control_Border; |
| 13 |
use Elementor\Group_Control_Box_Shadow; |
| 14 |
use Elementor\Group_Control_Typography; |
| 15 |
use Elementor\Plugin; |
| 16 |
use \Elementor\Repeater; |
| 17 |
use Elementor\Utils; |
| 18 |
use \Elementor\Widget_Base as Widget_Base; |
| 19 |
|
| 20 |
/** |
| 21 |
* Exit if accessed directly |
| 22 |
*/ |
| 23 |
if (!defined('ABSPATH')) { |
| 24 |
exit; |
| 25 |
} |
| 26 |
|
| 27 |
/** |
| 28 |
* The elementor widget class |
| 29 |
* |
| 30 |
* @since 0.0.1 |
| 31 |
*/ |
| 32 |
class Fundraising_Campaign_Widget extends Widget_Base { |
| 33 |
|
| 34 |
use Helper; |
| 35 |
|
| 36 |
private $better_payment_campaign_global_settings = []; |
| 37 |
|
| 38 |
/** |
| 39 |
* @var mixed|void |
| 40 |
*/ |
| 41 |
protected $pro_enabled; |
| 42 |
|
| 43 |
/** |
| 44 |
* Login_Register constructor. |
| 45 |
* Initializing the Login_Register widget class. |
| 46 |
* @inheritDoc |
| 47 |
*/ |
| 48 |
public function __construct( $data = [], $args = null ) { |
| 49 |
parent::__construct( $data, $args ); |
| 50 |
$this->pro_enabled = apply_filters( 'better_payment/pro_enabled', false ); |
| 51 |
} |
| 52 |
|
| 53 |
public function get_name() { |
| 54 |
return 'fundraising-campaign'; |
| 55 |
} |
| 56 |
|
| 57 |
public function get_title() { |
| 58 |
return esc_html__( 'Fundraising Campaign', 'better-payment' ); |
| 59 |
} |
| 60 |
|
| 61 |
public function get_icon() { |
| 62 |
return 'bp-icon bp-fundraising-campaign'; |
| 63 |
} |
| 64 |
|
| 65 |
public function get_categories() { |
| 66 |
return ['better-payment']; |
| 67 |
} |
| 68 |
|
| 69 |
public function get_keywords() { |
| 70 |
return [ |
| 71 |
'payment', 'better-payment' ,'paypal', 'stripe', 'sell', 'donate', 'transaction', 'online-transaction', 'paystack', 'fundraising', 'campaign', 'better payment' |
| 72 |
]; |
| 73 |
} |
| 74 |
|
| 75 |
public function get_custom_help_url() { |
| 76 |
return 'https://betterpayment.co/docs/configure-fundraising-campaign-in-better-payment'; |
| 77 |
} |
| 78 |
|
| 79 |
public function get_style_depends() { |
| 80 |
return apply_filters( 'better_payment/elementor/editor/get_style_depends', [ 'fundraising-campaign-style' ] ); |
| 81 |
} |
| 82 |
|
| 83 |
public function get_script_depends() { |
| 84 |
return apply_filters( 'better_payment/elementor/editor/get_script_depends', [ 'fundraising-campaign-script' ] ); |
| 85 |
} |
| 86 |
|
| 87 |
function generate_short_unique_id( int $length = 8 ) { |
| 88 |
$timestamp = microtime(true); |
| 89 |
$random = random_int(0, 999999); |
| 90 |
$base = base_convert((int)($timestamp * 1000000) + $random, 10, 36); |
| 91 |
|
| 92 |
return strtoupper( substr(str_pad($base, $length, '0', STR_PAD_LEFT), -$length) ); |
| 93 |
} |
| 94 |
|
| 95 |
|
| 96 |
protected function register_controls() { |
| 97 |
$this->better_payment_campaign_global_settings = DB::get_settings(); |
| 98 |
|
| 99 |
$is_edit_mode = Plugin::instance()->editor->is_edit_mode(); |
| 100 |
|
| 101 |
if ( $is_edit_mode && ( ! current_user_can('manage_options') ) ) { |
| 102 |
$this->better_payment_campaign_global_settings = []; |
| 103 |
} |
| 104 |
|
| 105 |
$this->start_controls_section( |
| 106 |
'better_payment_campaign_settings_general', |
| 107 |
[ |
| 108 |
'label' => esc_html__( 'General', 'better-payment' ), |
| 109 |
] |
| 110 |
); |
| 111 |
|
| 112 |
$campaign_id = $this->generate_short_unique_id(); |
| 113 |
|
| 114 |
$this->add_control( |
| 115 |
'better_payment_campaign_id', |
| 116 |
[ |
| 117 |
'label' => esc_html__( 'Campaign ID', 'better-payment' ), |
| 118 |
'type' => Controls_Manager::TEXT, |
| 119 |
'placeholder' => $campaign_id, |
| 120 |
'default' => $campaign_id, |
| 121 |
'description' => esc_html__('Unique campaign ID required. It is auto-generated; if modified, don\'t make it repetitive.', 'better-payment'), |
| 122 |
'label_block' => false, |
| 123 |
'ai' => [ |
| 124 |
'active' => false, |
| 125 |
], |
| 126 |
] |
| 127 |
); |
| 128 |
|
| 129 |
$this->add_control( |
| 130 |
'better_payment_campaign_layout', |
| 131 |
[ |
| 132 |
'label' => esc_html__( 'Campaign Layout', 'better-payment' ), |
| 133 |
'type' => Controls_Manager::SELECT, |
| 134 |
'default' => 'layout-1', |
| 135 |
'options' => $this->better_payment_campaign_layouts(), |
| 136 |
] |
| 137 |
); |
| 138 |
|
| 139 |
$better_payment_helper = new ClassesHelper(); |
| 140 |
$better_payment_general_currency = $this->better_payment_campaign_global_settings['better_payment_settings_general_general_currency']; |
| 141 |
|
| 142 |
$this->add_control( |
| 143 |
'better_payment_campaign_currency', |
| 144 |
[ |
| 145 |
'label' => esc_html__( 'Currency', 'better-payment' ), |
| 146 |
'type' => Controls_Manager::SELECT, |
| 147 |
'default' => esc_html($better_payment_general_currency), |
| 148 |
'options' => $better_payment_helper->get_currency_list(), |
| 149 |
] |
| 150 |
); |
| 151 |
|
| 152 |
$this->add_control( |
| 153 |
'better_payment_campaign_general_header_enable', |
| 154 |
[ |
| 155 |
'label' => __( 'Header', 'better-payment' ), |
| 156 |
'type' => Controls_Manager::SWITCHER, |
| 157 |
'label_on' => __( 'Show', 'better-payment' ), |
| 158 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 159 |
'return_value' => 'yes', |
| 160 |
'default' => 'yes', |
| 161 |
'separator' => 'before', |
| 162 |
] |
| 163 |
); |
| 164 |
|
| 165 |
$this->add_control( |
| 166 |
'better_payment_campaign_general_overview_enable', |
| 167 |
[ |
| 168 |
'label' => __( 'Overview', 'better-payment' ), |
| 169 |
'type' => Controls_Manager::SWITCHER, |
| 170 |
'label_on' => __( 'Show', 'better-payment' ), |
| 171 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 172 |
'return_value' => 'yes', |
| 173 |
'default' => 'yes', |
| 174 |
] |
| 175 |
); |
| 176 |
|
| 177 |
if ( !$this->pro_enabled ) { |
| 178 |
$this->add_control( 'better_payment_campaign_updates_pro', [ |
| 179 |
'label' => sprintf( __( 'Updates %s', 'better-payment' ), '<i class="bpc-pro-labe eicon-pro-icon"></i>' ), |
| 180 |
'type' => Controls_Manager::SWITCHER, |
| 181 |
'classes' => 'bpc-pro-control', |
| 182 |
] ); |
| 183 |
} |
| 184 |
|
| 185 |
do_action('better_payment/elementor/editor/campaign_pro_sections', $this); |
| 186 |
|
| 187 |
$this->add_control( |
| 188 |
'better_payment_campaign_general_footer_team_enable_layout_1', |
| 189 |
[ |
| 190 |
'label' => __( 'Our Team', 'better-payment' ), |
| 191 |
'type' => Controls_Manager::SWITCHER, |
| 192 |
'label_on' => __( 'Show', 'better-payment' ), |
| 193 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 194 |
'return_value' => 'yes', |
| 195 |
'default' => 'yes', |
| 196 |
'condition' => [ |
| 197 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 198 |
], |
| 199 |
] |
| 200 |
); |
| 201 |
|
| 202 |
$this->add_control( |
| 203 |
'better_payment_campaign_general_footer_related_campaign_enable_layout_2', |
| 204 |
[ |
| 205 |
'label' => __( 'Related Campaigns', 'better-payment' ), |
| 206 |
'type' => Controls_Manager::SWITCHER, |
| 207 |
'label_on' => __( 'Show', 'better-payment' ), |
| 208 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 209 |
'return_value' => 'yes', |
| 210 |
'default' => 'yes', |
| 211 |
'condition' => [ |
| 212 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 213 |
], |
| 214 |
] |
| 215 |
); |
| 216 |
|
| 217 |
$this->end_controls_section(); |
| 218 |
|
| 219 |
$this->campaign_header_settings(); |
| 220 |
$this->campaign_form_settings(); |
| 221 |
$this->campaign_overview_settings(); |
| 222 |
$this->campaign_our_team_settings(); |
| 223 |
do_action('better_payment/elementor/editor/campaign_pro_updates_section', $this); |
| 224 |
$this->related_campaign_settings(); |
| 225 |
|
| 226 |
$this->form_style(); |
| 227 |
} |
| 228 |
|
| 229 |
public function campaign_header_settings() { |
| 230 |
$this->start_controls_section( |
| 231 |
'better_payment_campaign_header_title', |
| 232 |
[ |
| 233 |
'label' => esc_html__( 'Header', 'better-payment' ), |
| 234 |
'condition' => [ |
| 235 |
'better_payment_campaign_general_header_enable' => 'yes', |
| 236 |
], |
| 237 |
] |
| 238 |
); |
| 239 |
|
| 240 |
$this->add_control( |
| 241 |
'better_payment_campaign_general_title_enable', |
| 242 |
[ |
| 243 |
'label' => __( 'Title', 'better-payment' ), |
| 244 |
'type' => Controls_Manager::SWITCHER, |
| 245 |
'label_on' => __( 'Show', 'better-payment' ), |
| 246 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 247 |
'return_value' => 'yes', |
| 248 |
'default' => 'yes', |
| 249 |
'condition' => [ |
| 250 |
'better_payment_campaign_general_header_enable' => 'yes', |
| 251 |
], |
| 252 |
] |
| 253 |
); |
| 254 |
|
| 255 |
$this->add_control( |
| 256 |
'better_payment_campaign_header_title_text', |
| 257 |
[ |
| 258 |
'type' => Controls_Manager::TEXT, |
| 259 |
'label_block' => true, |
| 260 |
'ai' => [ |
| 261 |
'active' => false, |
| 262 |
], |
| 263 |
'placeholder' => __( 'Campaign Title Content', 'better-payment' ), |
| 264 |
'condition' => [ |
| 265 |
'better_payment_campaign_general_title_enable' => 'yes', |
| 266 |
], |
| 267 |
] |
| 268 |
); |
| 269 |
|
| 270 |
$this->add_control( |
| 271 |
'better_payment_campaign_general_short_description_enable', |
| 272 |
[ |
| 273 |
'label' => __( 'Subtitle', 'better-payment' ), |
| 274 |
'type' => Controls_Manager::SWITCHER, |
| 275 |
'label_on' => __( 'Show', 'better-payment' ), |
| 276 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 277 |
'return_value' => 'yes', |
| 278 |
'default' => 'yes', |
| 279 |
'condition' => [ |
| 280 |
'better_payment_campaign_general_header_enable' => 'yes', |
| 281 |
], |
| 282 |
] |
| 283 |
); |
| 284 |
|
| 285 |
$this->add_control( |
| 286 |
'better_payment_campaign_header_short_description', |
| 287 |
[ |
| 288 |
'type' => Controls_Manager::TEXTAREA, |
| 289 |
'label_block' => true, |
| 290 |
'ai' => [ |
| 291 |
'active' => false, |
| 292 |
], |
| 293 |
'placeholder' => __( 'Campaign Subtitle Description', 'better-payment' ), |
| 294 |
'condition' => [ |
| 295 |
'better_payment_campaign_general_short_description_enable' => 'yes', |
| 296 |
], |
| 297 |
] |
| 298 |
); |
| 299 |
|
| 300 |
$this->add_control( |
| 301 |
'better_payment_campaign_header_images_heading', |
| 302 |
[ |
| 303 |
'label' => __( 'Images', 'better-payment' ), |
| 304 |
'type' => \Elementor\Controls_Manager::HEADING, |
| 305 |
] |
| 306 |
); |
| 307 |
|
| 308 |
$this->start_controls_tabs( 'better_payment_campaign_header_images_tabs' ); |
| 309 |
|
| 310 |
$this->start_controls_tab( |
| 311 |
'better_payment_campaign_header_image_one_tab', |
| 312 |
[ |
| 313 |
'label' => __( 'One', 'better-payment' ), |
| 314 |
'condition' => [ |
| 315 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', 'layout-3' ], |
| 316 |
], |
| 317 |
] |
| 318 |
); |
| 319 |
|
| 320 |
$this->add_control( |
| 321 |
'better_payment_campaign_general_image_one_enable', |
| 322 |
[ |
| 323 |
'label' => __( 'Show', 'better-payment' ), |
| 324 |
'type' => Controls_Manager::SWITCHER, |
| 325 |
'label_on' => __( 'Yes', 'better-payment' ), |
| 326 |
'label_off' => __( 'No', 'better-payment' ), |
| 327 |
'return_value' => 'yes', |
| 328 |
'default' => 'yes', |
| 329 |
'condition' => [ |
| 330 |
'better_payment_campaign_general_header_enable' => 'yes', |
| 331 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', 'layout-3' ], |
| 332 |
], |
| 333 |
] |
| 334 |
); |
| 335 |
|
| 336 |
$this->add_control( |
| 337 |
'better_payment_campaign_header_image_one', |
| 338 |
[ |
| 339 |
'label' => __('Choose Image', 'better-payment'), |
| 340 |
'type' => Controls_Manager::MEDIA, |
| 341 |
'label_block' => true, |
| 342 |
'ai' => [ |
| 343 |
'active' => false, |
| 344 |
], |
| 345 |
'condition' => [ |
| 346 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', 'layout-3' ], |
| 347 |
'better_payment_campaign_general_image_one_enable' => 'yes', |
| 348 |
], |
| 349 |
] |
| 350 |
); |
| 351 |
|
| 352 |
$this->end_controls_tab(); |
| 353 |
|
| 354 |
$this->start_controls_tab( |
| 355 |
'better_payment_campaign_header_image_two_tab', |
| 356 |
[ |
| 357 |
'label' => __( 'Two', 'better-payment' ), |
| 358 |
'condition' => [ |
| 359 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ], |
| 360 |
], |
| 361 |
] |
| 362 |
); |
| 363 |
|
| 364 |
$this->add_control( |
| 365 |
'better_payment_campaign_general_image_two_enable', |
| 366 |
[ |
| 367 |
'label' => __( 'Show', 'better-payment' ), |
| 368 |
'type' => Controls_Manager::SWITCHER, |
| 369 |
'label_on' => __( 'Yes', 'better-payment' ), |
| 370 |
'label_off' => __( 'No', 'better-payment' ), |
| 371 |
'return_value' => 'yes', |
| 372 |
'default' => 'yes', |
| 373 |
'condition' => [ |
| 374 |
'better_payment_campaign_general_header_enable' => 'yes', |
| 375 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ], |
| 376 |
], |
| 377 |
] |
| 378 |
); |
| 379 |
|
| 380 |
$this->add_control( |
| 381 |
'better_payment_campaign_header_image_two', |
| 382 |
[ |
| 383 |
'label' => __('Choose Image', 'better-payment'), |
| 384 |
'type' => Controls_Manager::MEDIA, |
| 385 |
'label_block' => true, |
| 386 |
'ai' => [ |
| 387 |
'active' => false, |
| 388 |
], |
| 389 |
'condition' => [ |
| 390 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ], |
| 391 |
'better_payment_campaign_general_image_two_enable' => 'yes', |
| 392 |
], |
| 393 |
] |
| 394 |
); |
| 395 |
|
| 396 |
$this->end_controls_tab(); |
| 397 |
|
| 398 |
$this->start_controls_tab( |
| 399 |
'better_payment_campaign_header_image_three_tab', |
| 400 |
[ |
| 401 |
'label' => __( 'Three', 'better-payment' ), |
| 402 |
'condition' => [ |
| 403 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 404 |
], |
| 405 |
] |
| 406 |
); |
| 407 |
|
| 408 |
$this->add_control( |
| 409 |
'better_payment_campaign_general_image_three_enable', |
| 410 |
[ |
| 411 |
'label' => __( 'Show', 'better-payment' ), |
| 412 |
'type' => Controls_Manager::SWITCHER, |
| 413 |
'label_on' => __( 'Yes', 'better-payment' ), |
| 414 |
'label_off' => __( 'No', 'better-payment' ), |
| 415 |
'return_value' => 'yes', |
| 416 |
'default' => 'yes', |
| 417 |
'condition' => [ |
| 418 |
'better_payment_campaign_general_header_enable' => 'yes', |
| 419 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 420 |
], |
| 421 |
] |
| 422 |
); |
| 423 |
|
| 424 |
$this->add_control( |
| 425 |
'better_payment_campaign_header_image_three', |
| 426 |
[ |
| 427 |
'label' => __('Choose Image', 'better-payment'), |
| 428 |
'type' => Controls_Manager::MEDIA, |
| 429 |
'label_block' => true, |
| 430 |
'ai' => [ |
| 431 |
'active' => false, |
| 432 |
], |
| 433 |
'condition' => [ |
| 434 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 435 |
'better_payment_campaign_general_image_three_enable' => 'yes', |
| 436 |
], |
| 437 |
] |
| 438 |
); |
| 439 |
|
| 440 |
$this->end_controls_tab(); |
| 441 |
$this->end_controls_tabs(); |
| 442 |
|
| 443 |
$this->end_controls_section(); |
| 444 |
} |
| 445 |
|
| 446 |
public function campaign_form_settings() { |
| 447 |
$this->start_controls_section( |
| 448 |
'better_payment_campaign_form_settings', |
| 449 |
[ |
| 450 |
'label' => esc_html__( 'Form', 'better-payment' ), |
| 451 |
] |
| 452 |
); |
| 453 |
|
| 454 |
$this->add_control( |
| 455 |
'better_payment_campaign_form_title_text_layout_1', |
| 456 |
[ |
| 457 |
'label' => __( 'Title', 'better-payment' ), |
| 458 |
'type' => Controls_Manager::TEXT, |
| 459 |
'label_block' => true, |
| 460 |
'placeholder' => 'Enter your form title', |
| 461 |
'default' => 'Charity Raised', |
| 462 |
'ai' => [ |
| 463 |
'active' => false, |
| 464 |
], |
| 465 |
'condition' => [ |
| 466 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 467 |
], |
| 468 |
] |
| 469 |
); |
| 470 |
|
| 471 |
$this->add_control( |
| 472 |
'better_payment_campaign_form_title_text_layout_2', |
| 473 |
[ |
| 474 |
'label' => __( 'Title', 'better-payment' ), |
| 475 |
'type' => Controls_Manager::TEXT, |
| 476 |
'label_block' => true, |
| 477 |
'placeholder' => 'Enter your form title', |
| 478 |
'default' => 'Save Lives and Bring Hope to Children in Gaza', |
| 479 |
'ai' => [ |
| 480 |
'active' => false, |
| 481 |
], |
| 482 |
'condition' => [ |
| 483 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 484 |
], |
| 485 |
] |
| 486 |
); |
| 487 |
|
| 488 |
$this->add_control( |
| 489 |
'better_payment_campaign_form_sub_title_text', |
| 490 |
[ |
| 491 |
'label' => __( 'Sub Title', 'better-payment' ), |
| 492 |
'type' => Controls_Manager::TEXT, |
| 493 |
'label_block' => true, |
| 494 |
'placeholder' => 'Enter your form sub title', |
| 495 |
'default' => 'Urgent Cause', |
| 496 |
'ai' => [ |
| 497 |
'active' => false, |
| 498 |
], |
| 499 |
'condition' => [ |
| 500 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 501 |
], |
| 502 |
] |
| 503 |
); |
| 504 |
|
| 505 |
$this->add_control( |
| 506 |
'better_payment_campaign_form_image', |
| 507 |
[ |
| 508 |
'label' => __('Choose Image', 'better-payment'), |
| 509 |
'type' => Controls_Manager::MEDIA, |
| 510 |
'label_block' => true, |
| 511 |
'ai' => [ |
| 512 |
'active' => false, |
| 513 |
], |
| 514 |
'default' => [ |
| 515 |
'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/form.webp', |
| 516 |
], |
| 517 |
'condition' => [ |
| 518 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 519 |
], |
| 520 |
] |
| 521 |
); |
| 522 |
|
| 523 |
$this->add_control( |
| 524 |
'better_payment_campaign_form_goal_amount_label', |
| 525 |
[ |
| 526 |
'label' => __( 'Goal Amount Label', 'better-payment' ), |
| 527 |
'type' => Controls_Manager::TEXT, |
| 528 |
'label_block' => true, |
| 529 |
'ai' => [ |
| 530 |
'active' => false, |
| 531 |
], |
| 532 |
'placeholder' => 'Enter your goal amount label', |
| 533 |
'default' => 'Goal', |
| 534 |
'condition' => [ |
| 535 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 536 |
], |
| 537 |
] |
| 538 |
); |
| 539 |
|
| 540 |
$this->add_control( |
| 541 |
'better_payment_campaign_form_goal_amount', |
| 542 |
[ |
| 543 |
'label' => __( 'Goal Amount', 'better-payment' ), |
| 544 |
'type' => Controls_Manager::NUMBER, |
| 545 |
'placeholder' => 'Enter your goal amount', |
| 546 |
'default' => 5000, |
| 547 |
] |
| 548 |
); |
| 549 |
|
| 550 |
$this->add_control( |
| 551 |
'better_payment_campaign_form_goal_percentage_enable', |
| 552 |
[ |
| 553 |
'label' => __( 'Goal Percentage', 'better-payment' ), |
| 554 |
'type' => Controls_Manager::SWITCHER, |
| 555 |
'label_on' => __( 'Show', 'better-payment' ), |
| 556 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 557 |
'return_value' => 'yes', |
| 558 |
'default' => 'yes', |
| 559 |
'condition' => [ |
| 560 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 561 |
], |
| 562 |
] |
| 563 |
); |
| 564 |
|
| 565 |
$this->add_control( |
| 566 |
'better_payment_campaign_form_goal_bar_line_enable', |
| 567 |
[ |
| 568 |
'label' => __( 'Goal Bar Line', 'better-payment' ), |
| 569 |
'type' => Controls_Manager::SWITCHER, |
| 570 |
'label_on' => __( 'Show', 'better-payment' ), |
| 571 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 572 |
'return_value' => 'yes', |
| 573 |
'default' => 'yes', |
| 574 |
'condition' => [ |
| 575 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ], |
| 576 |
], |
| 577 |
] |
| 578 |
); |
| 579 |
|
| 580 |
$amount_list_repeater_l1 = new Repeater(); |
| 581 |
$amount_list_repeater_l1->add_control( |
| 582 |
'better_payment_campaign_form_amount_list_val_layout_1', |
| 583 |
[ |
| 584 |
'label' => esc_html__( 'Amount', 'better-payment' ), |
| 585 |
'type' => Controls_Manager::NUMBER, |
| 586 |
'min' => 1, |
| 587 |
'default' => 5, |
| 588 |
'placeholder' => 'Enter your amount', |
| 589 |
] |
| 590 |
); |
| 591 |
|
| 592 |
$this->add_control( |
| 593 |
'better_payment_campaign_form_amount_list_layout_1', |
| 594 |
[ |
| 595 |
'label' => esc_html__( 'Amount List', 'better-payment' ), |
| 596 |
'type' => Controls_Manager::REPEATER, |
| 597 |
'fields' => $amount_list_repeater_l1->get_controls(), |
| 598 |
'default' => [ |
| 599 |
[ |
| 600 |
'better_payment_campaign_form_amount_list_val_layout_1' => 10 |
| 601 |
], |
| 602 |
[ |
| 603 |
'better_payment_campaign_form_amount_list_val_layout_1' => 20 |
| 604 |
], |
| 605 |
[ |
| 606 |
'better_payment_campaign_form_amount_list_val_layout_1' => 30 |
| 607 |
], |
| 608 |
[ |
| 609 |
'better_payment_campaign_form_amount_list_val_layout_1' => 80 |
| 610 |
], |
| 611 |
[ |
| 612 |
'better_payment_campaign_form_amount_list_val_layout_1' => 100 |
| 613 |
], |
| 614 |
], |
| 615 |
'title_field' => '<i class="{{ better_payment_campaign_form_amount_list_val_layout_1 }}" aria-hidden="true"></i> {{{ better_payment_campaign_form_amount_list_val_layout_1 }}}', |
| 616 |
'condition' => [ |
| 617 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 618 |
], |
| 619 |
] |
| 620 |
); |
| 621 |
|
| 622 |
$amount_list_repeater_l3 = new Repeater(); |
| 623 |
$amount_list_repeater_l3->add_control( |
| 624 |
'better_payment_campaign_form_amount_list_val_layout_3', |
| 625 |
[ |
| 626 |
'label' => esc_html__( 'Amount', 'better-payment' ), |
| 627 |
'type' => Controls_Manager::NUMBER, |
| 628 |
'min' => 1, |
| 629 |
'default' => 5, |
| 630 |
'placeholder' => 'Enter your amount', |
| 631 |
] |
| 632 |
); |
| 633 |
|
| 634 |
$this->add_control( |
| 635 |
'better_payment_campaign_form_amount_list_layout_3', |
| 636 |
[ |
| 637 |
'label' => esc_html__( 'Amount List', 'better-payment' ), |
| 638 |
'type' => Controls_Manager::REPEATER, |
| 639 |
'fields' => $amount_list_repeater_l3->get_controls(), |
| 640 |
'default' => [ |
| 641 |
[ |
| 642 |
'better_payment_campaign_form_amount_list_val_layout_3' => 10 |
| 643 |
], |
| 644 |
[ |
| 645 |
'better_payment_campaign_form_amount_list_val_layout_3' => 20 |
| 646 |
], |
| 647 |
[ |
| 648 |
'better_payment_campaign_form_amount_list_val_layout_3' => 40 |
| 649 |
], |
| 650 |
[ |
| 651 |
'better_payment_campaign_form_amount_list_val_layout_3' => 80 |
| 652 |
], |
| 653 |
], |
| 654 |
'title_field' => '<i class="{{ better_payment_campaign_form_amount_list_val_layout_3 }}" aria-hidden="true"></i> {{{ better_payment_campaign_form_amount_list_val_layout_3 }}}', |
| 655 |
'condition' => [ |
| 656 |
'better_payment_campaign_layout' => [ 'layout-3' ], |
| 657 |
], |
| 658 |
] |
| 659 |
); |
| 660 |
|
| 661 |
$this->add_control( |
| 662 |
'better_payment_campaign_form_total_donation_enable', |
| 663 |
[ |
| 664 |
'label' => __( 'Total Donation', 'better-payment' ), |
| 665 |
'type' => Controls_Manager::SWITCHER, |
| 666 |
'label_on' => __( 'Show', 'better-payment' ), |
| 667 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 668 |
'return_value' => 'yes', |
| 669 |
'default' => 'yes', |
| 670 |
'condition' => [ |
| 671 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 672 |
], |
| 673 |
] |
| 674 |
); |
| 675 |
|
| 676 |
$this->add_control( |
| 677 |
'better_payment_campaign_form_total_donation_label', |
| 678 |
[ |
| 679 |
'label' => __( 'Total Donation Label', 'better-payment' ), |
| 680 |
'type' => Controls_Manager::TEXT, |
| 681 |
'label_block' => true, |
| 682 |
'placeholder' => 'Enter your total donation label', |
| 683 |
'default' => 'Donations', |
| 684 |
'ai' => [ |
| 685 |
'active' => false, |
| 686 |
], |
| 687 |
'condition' => [ |
| 688 |
'better_payment_campaign_form_total_donation_enable' => 'yes', |
| 689 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 690 |
], |
| 691 |
] |
| 692 |
); |
| 693 |
|
| 694 |
$this->add_control( |
| 695 |
'better_payment_campaign_form_goal_amount_raised_enable', |
| 696 |
[ |
| 697 |
'label' => __( 'Raised Amount', 'better-payment' ), |
| 698 |
'type' => Controls_Manager::SWITCHER, |
| 699 |
'label_on' => __( 'Show', 'better-payment' ), |
| 700 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 701 |
'return_value' => 'yes', |
| 702 |
'default' => 'yes', |
| 703 |
'condition' => [ |
| 704 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 705 |
], |
| 706 |
] |
| 707 |
); |
| 708 |
|
| 709 |
$this->add_control( |
| 710 |
'better_payment_campaign_form_goal_amount_raised_label', |
| 711 |
[ |
| 712 |
'label' => __( 'Raised Amount Label', 'better-payment' ), |
| 713 |
'type' => Controls_Manager::TEXT, |
| 714 |
'label_block' => true, |
| 715 |
'placeholder' => 'Enter your raised amount label', |
| 716 |
'default' => 'Raised', |
| 717 |
'ai' => [ |
| 718 |
'active' => false, |
| 719 |
], |
| 720 |
'condition' => [ |
| 721 |
'better_payment_campaign_form_goal_amount_raised_enable' => 'yes', |
| 722 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 723 |
], |
| 724 |
] |
| 725 |
); |
| 726 |
|
| 727 |
$this->add_control( |
| 728 |
'better_payment_campaign_form_placeholder_text_layout_1', |
| 729 |
[ |
| 730 |
'label' => __( 'Custom Placeholder Text', 'better-payment' ), |
| 731 |
'type' => Controls_Manager::TEXT, |
| 732 |
'label_block' => true, |
| 733 |
'placeholder' => 'Enter your placeholder text', |
| 734 |
'default' => 'Enter your amount', |
| 735 |
'ai' => [ |
| 736 |
'active' => false, |
| 737 |
], |
| 738 |
'condition' => [ |
| 739 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 740 |
], |
| 741 |
] |
| 742 |
); |
| 743 |
|
| 744 |
$this->add_control( |
| 745 |
'better_payment_campaign_form_placeholder_text_layout_3', |
| 746 |
[ |
| 747 |
'label' => __( 'Custom Placeholder Text', 'better-payment' ), |
| 748 |
'type' => Controls_Manager::TEXT, |
| 749 |
'label_block' => true, |
| 750 |
'placeholder' => 'Enter your placeholder text', |
| 751 |
'default' => '0', |
| 752 |
'ai' => [ |
| 753 |
'active' => false, |
| 754 |
], |
| 755 |
'condition' => [ |
| 756 |
'better_payment_campaign_layout' => [ 'layout-3' ], |
| 757 |
], |
| 758 |
] |
| 759 |
); |
| 760 |
|
| 761 |
$this->add_control( |
| 762 |
'better_payment_campaign_form_button_text', |
| 763 |
[ |
| 764 |
'label' => __( 'Button Text', 'better-payment' ), |
| 765 |
'type' => Controls_Manager::TEXT, |
| 766 |
'label_block' => true, |
| 767 |
'placeholder' => 'Enter your button text', |
| 768 |
'default' => 'Donate Now', |
| 769 |
'ai' => [ |
| 770 |
'active' => false, |
| 771 |
], |
| 772 |
] |
| 773 |
); |
| 774 |
|
| 775 |
$this->add_control( |
| 776 |
'better_payment_campaign_form_button_link', |
| 777 |
[ |
| 778 |
'label' => __( 'Button Link', 'better-payment' ), |
| 779 |
'type' => Controls_Manager::URL, |
| 780 |
'default' => [ |
| 781 |
'url' => '#', |
| 782 |
], |
| 783 |
'dynamic' => [ |
| 784 |
'active' => true, |
| 785 |
], |
| 786 |
'show_external' => false, |
| 787 |
'placeholder' => __( 'https://example.com/payment-form-page/', 'better-payment' ), |
| 788 |
] |
| 789 |
); |
| 790 |
|
| 791 |
$this->add_control( |
| 792 |
'better_payment_campaign_form_button_link_info', |
| 793 |
[ |
| 794 |
'type' => Controls_Manager::RAW_HTML, |
| 795 |
'raw' => sprintf( |
| 796 |
__( '<p>*You must create a separate payment form page with Better Payment and add the URL. Follow <a href="%1$s" target="_blank">this doc.</a></p>', 'better-payment' ), |
| 797 |
esc_url('//betterpayment.co/docs/configure-form-settings-in-better-payment/'), |
| 798 |
), |
| 799 |
'content_classes' => 'elementor-control-alert elementor-panel-alert elementor-panel-alert-info', |
| 800 |
'ai' => [ |
| 801 |
'active' => false, |
| 802 |
] |
| 803 |
] |
| 804 |
); |
| 805 |
|
| 806 |
$this->end_controls_section(); |
| 807 |
} |
| 808 |
|
| 809 |
public function campaign_overview_settings() { |
| 810 |
$this->start_controls_section( |
| 811 |
'better_payment_campaign_overview_settings', |
| 812 |
[ |
| 813 |
'label' => esc_html__( 'Overview', 'better-payment' ), |
| 814 |
'condition' => [ |
| 815 |
'better_payment_campaign_general_overview_enable' => 'yes' |
| 816 |
] |
| 817 |
] |
| 818 |
); |
| 819 |
|
| 820 |
$this->add_control( |
| 821 |
'better_payment_campaign_overview_title_text', |
| 822 |
[ |
| 823 |
'label' => __( 'Tab Title', 'better-payment' ), |
| 824 |
'type' => Controls_Manager::TEXT, |
| 825 |
'label_block' => true, |
| 826 |
'placeholder' => 'Enter your overview title', |
| 827 |
'ai' => [ |
| 828 |
'active' => false, |
| 829 |
], |
| 830 |
'condition' => [ |
| 831 |
'better_payment_campaign_general_overview_enable' => 'yes' |
| 832 |
] |
| 833 |
] |
| 834 |
); |
| 835 |
|
| 836 |
$this->add_control( |
| 837 |
'better_payment_campaign_overview_description_title', |
| 838 |
[ |
| 839 |
'label' => esc_html__( 'Descriptions', 'better-payment' ), |
| 840 |
'type' => Controls_Manager::HEADING, |
| 841 |
'condition' => [ |
| 842 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 843 |
] |
| 844 |
] |
| 845 |
); |
| 846 |
|
| 847 |
$this->add_control( |
| 848 |
'better_payment_campaign_general_overview_description_one_enable', |
| 849 |
[ |
| 850 |
'label' => __( 'Top Description', 'better-payment' ), |
| 851 |
'type' => Controls_Manager::SWITCHER, |
| 852 |
'label_on' => __( 'Show', 'better-payment' ), |
| 853 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 854 |
'return_value' => 'yes', |
| 855 |
'default' => 'yes', |
| 856 |
'condition' => [ |
| 857 |
'better_payment_campaign_general_overview_enable' => 'yes' |
| 858 |
] |
| 859 |
] |
| 860 |
); |
| 861 |
|
| 862 |
$this->add_control( |
| 863 |
'better_payment_campaign_overview_description_one', |
| 864 |
[ |
| 865 |
'label' => __( 'Description Field', 'better-payment' ), |
| 866 |
'type' => Controls_Manager::TEXTAREA, |
| 867 |
'label_block' => true, |
| 868 |
'placeholder' => 'Enter your campaign description', |
| 869 |
'ai' => [ |
| 870 |
'active' => false, |
| 871 |
], |
| 872 |
'condition' => [ |
| 873 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 874 |
'better_payment_campaign_general_overview_description_one_enable' => 'yes', |
| 875 |
] |
| 876 |
] |
| 877 |
); |
| 878 |
|
| 879 |
$this->add_control( |
| 880 |
'better_payment_campaign_general_overview_description_two_enable', |
| 881 |
[ |
| 882 |
'label' => __( 'Bottom Description', 'better-payment' ), |
| 883 |
'type' => Controls_Manager::SWITCHER, |
| 884 |
'label_on' => __( 'Show', 'better-payment' ), |
| 885 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 886 |
'return_value' => 'yes', |
| 887 |
'default' => 'yes', |
| 888 |
'condition' => [ |
| 889 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 890 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 891 |
] |
| 892 |
] |
| 893 |
); |
| 894 |
|
| 895 |
$this->add_control( |
| 896 |
'better_payment_campaign_overview_description_two', |
| 897 |
[ |
| 898 |
'label' => __( 'Description Field', 'better-payment' ), |
| 899 |
'type' => Controls_Manager::TEXTAREA, |
| 900 |
'label_block' => true, |
| 901 |
'placeholder' => 'Enter your campaign description', |
| 902 |
'ai' => [ |
| 903 |
'active' => false, |
| 904 |
], |
| 905 |
'condition' => [ |
| 906 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 907 |
'better_payment_campaign_general_overview_description_two_enable' => 'yes', |
| 908 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 909 |
] |
| 910 |
] |
| 911 |
); |
| 912 |
|
| 913 |
$this->add_control( |
| 914 |
'better_paymentcampaign_overview_images_heading', |
| 915 |
[ |
| 916 |
'label' => __( 'Images', 'better-payment' ), |
| 917 |
'type' => \Elementor\Controls_Manager::HEADING, |
| 918 |
'condition' => [ |
| 919 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 920 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 921 |
], |
| 922 |
'separator' => 'before', |
| 923 |
] |
| 924 |
); |
| 925 |
|
| 926 |
$this->add_control( |
| 927 |
'better_payment_campaign_general_overview_images_enable', |
| 928 |
[ |
| 929 |
'label' => __( 'Show', 'better-payment' ), |
| 930 |
'type' => Controls_Manager::SWITCHER, |
| 931 |
'label_on' => __( 'Yes', 'better-payment' ), |
| 932 |
'label_off' => __( 'No', 'better-payment' ), |
| 933 |
'return_value' => 'yes', |
| 934 |
'default' => 'yes', |
| 935 |
'condition' => [ |
| 936 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 937 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 938 |
] |
| 939 |
] |
| 940 |
); |
| 941 |
|
| 942 |
$this->start_controls_tabs( 'better_payment_campaign_overview_images_tabs' ); |
| 943 |
|
| 944 |
$this->start_controls_tab( |
| 945 |
'better_payment_campaign_overview_image_one_tab', |
| 946 |
[ |
| 947 |
'label' => __( 'One', 'better-payment' ), |
| 948 |
'condition' => [ |
| 949 |
'better_payment_campaign_general_overview_images_enable' => 'yes', |
| 950 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 951 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 952 |
] |
| 953 |
] |
| 954 |
); |
| 955 |
|
| 956 |
$this->add_control( |
| 957 |
'better_payment_campaign_overview_image_one', |
| 958 |
[ |
| 959 |
'label' => __('Choose Image', 'better-payment'), |
| 960 |
'type' => Controls_Manager::MEDIA, |
| 961 |
'label_block' => true, |
| 962 |
'ai' => [ |
| 963 |
'active' => false, |
| 964 |
], |
| 965 |
'condition' => [ |
| 966 |
'better_payment_campaign_general_overview_images_enable' => 'yes', |
| 967 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 968 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 969 |
] |
| 970 |
] |
| 971 |
); |
| 972 |
|
| 973 |
$this->end_controls_tab(); |
| 974 |
|
| 975 |
$this->start_controls_tab( |
| 976 |
'better_payment_campaign_overview_image_two_tab', |
| 977 |
[ |
| 978 |
'label' => __( 'Two', 'better-payment' ), |
| 979 |
'condition' => [ |
| 980 |
'better_payment_campaign_general_overview_images_enable' => 'yes', |
| 981 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 982 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 983 |
] |
| 984 |
] |
| 985 |
); |
| 986 |
|
| 987 |
$this->add_control( |
| 988 |
'better_payment_campaign_overview_image_two', |
| 989 |
[ |
| 990 |
'label' => __('Choose Image', 'better-payment'), |
| 991 |
'type' => Controls_Manager::MEDIA, |
| 992 |
'label_block' => true, |
| 993 |
'ai' => [ |
| 994 |
'active' => false, |
| 995 |
], |
| 996 |
'condition' => [ |
| 997 |
'better_payment_campaign_general_overview_images_enable' => 'yes', |
| 998 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 999 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 1000 |
] |
| 1001 |
] |
| 1002 |
); |
| 1003 |
|
| 1004 |
$this->end_controls_tab(); |
| 1005 |
|
| 1006 |
$this->start_controls_tab( |
| 1007 |
'better_payment_campaign_overview_image_three_tab', |
| 1008 |
[ |
| 1009 |
'label' => __( 'Three', 'better-payment' ), |
| 1010 |
'condition' => [ |
| 1011 |
'better_payment_campaign_general_overview_images_enable' => 'yes', |
| 1012 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1013 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 1014 |
] |
| 1015 |
] |
| 1016 |
); |
| 1017 |
|
| 1018 |
$this->add_control( |
| 1019 |
'better_payment_campaign_overview_image_three', |
| 1020 |
[ |
| 1021 |
'label' => __('Choose Image', 'better-payment'), |
| 1022 |
'type' => Controls_Manager::MEDIA, |
| 1023 |
'label_block' => true, |
| 1024 |
'ai' => [ |
| 1025 |
'active' => false, |
| 1026 |
], |
| 1027 |
'condition' => [ |
| 1028 |
'better_payment_campaign_general_overview_images_enable' => 'yes', |
| 1029 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1030 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 1031 |
] |
| 1032 |
] |
| 1033 |
); |
| 1034 |
|
| 1035 |
$this->end_controls_tab(); |
| 1036 |
$this->end_controls_tabs(); |
| 1037 |
|
| 1038 |
$this->add_control( |
| 1039 |
'better_paymentcampaign_overview_our_mission_heading', |
| 1040 |
[ |
| 1041 |
'label' => __( 'Our Mission', 'better-payment' ), |
| 1042 |
'type' => \Elementor\Controls_Manager::HEADING, |
| 1043 |
'condition' => [ |
| 1044 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1045 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 1046 |
], |
| 1047 |
'separator' => 'before', |
| 1048 |
] |
| 1049 |
); |
| 1050 |
|
| 1051 |
$this->add_control( |
| 1052 |
'better_payment_campaign_general_overview_mossion_enable', |
| 1053 |
[ |
| 1054 |
'label' => __( 'Show', 'better-payment' ), |
| 1055 |
'type' => Controls_Manager::SWITCHER, |
| 1056 |
'label_on' => __( 'Yes', 'better-payment' ), |
| 1057 |
'label_off' => __( 'No', 'better-payment' ), |
| 1058 |
'return_value' => 'yes', |
| 1059 |
'default' => 'yes', |
| 1060 |
'condition' => [ |
| 1061 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 1062 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1063 |
] |
| 1064 |
] |
| 1065 |
); |
| 1066 |
|
| 1067 |
$this->add_control( |
| 1068 |
'better_payment_campaign_overview_our_mission_title_text', |
| 1069 |
[ |
| 1070 |
'label' => __( 'Title', 'better-payment' ), |
| 1071 |
'type' => Controls_Manager::TEXT, |
| 1072 |
'label_block' => true, |
| 1073 |
'placeholder' => 'Our Mission', |
| 1074 |
'ai' => [ |
| 1075 |
'active' => false, |
| 1076 |
], |
| 1077 |
'condition' => [ |
| 1078 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 1079 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1080 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 1081 |
] |
| 1082 |
] |
| 1083 |
); |
| 1084 |
|
| 1085 |
$our_mission_repeater = new Repeater(); |
| 1086 |
$our_mission_repeater->add_control( |
| 1087 |
'better_payment_campaign_overview_our_mission_item', |
| 1088 |
[ |
| 1089 |
'label' => esc_html__('Mission', 'better-payment'), |
| 1090 |
'type' => Controls_Manager::TEXT, |
| 1091 |
'placeholder' => 'Mission item', |
| 1092 |
'label_block' => true, |
| 1093 |
'ai' => [ |
| 1094 |
'active' => false, |
| 1095 |
], |
| 1096 |
] |
| 1097 |
); |
| 1098 |
|
| 1099 |
$this->add_control( |
| 1100 |
'better_payment_campaign_overview_our_mission_items', |
| 1101 |
[ |
| 1102 |
'label' => esc_html__( 'Missions', 'better-payment' ), |
| 1103 |
'type' => Controls_Manager::REPEATER, |
| 1104 |
'fields' => $our_mission_repeater->get_controls(), |
| 1105 |
'default' => [ |
| 1106 |
[ |
| 1107 |
'better_payment_campaign_overview_our_mission_item' => 'Provide nutritious meals to children in need', |
| 1108 |
], |
| 1109 |
[ |
| 1110 |
'better_payment_campaign_overview_our_mission_item' => 'Offer educational support and resources', |
| 1111 |
], |
| 1112 |
[ |
| 1113 |
'better_payment_campaign_overview_our_mission_item' => 'Create safe and nurturing environments', |
| 1114 |
], |
| 1115 |
[ |
| 1116 |
'better_payment_campaign_overview_our_mission_item' => 'Promote awareness and advocacy for child rights', |
| 1117 |
], |
| 1118 |
], |
| 1119 |
'title_field' => '{{{ better_payment_campaign_overview_our_mission_item }}}', |
| 1120 |
'condition' => [ |
| 1121 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 1122 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1123 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 1124 |
] |
| 1125 |
] |
| 1126 |
); |
| 1127 |
|
| 1128 |
$this->end_controls_section(); |
| 1129 |
} |
| 1130 |
|
| 1131 |
public function campaign_our_team_settings() { |
| 1132 |
$this->start_controls_section( |
| 1133 |
'better_payment_campaign_our_team_settings', |
| 1134 |
[ |
| 1135 |
'label' => esc_html__( '⮑ Our Team', 'better-payment' ), |
| 1136 |
'condition' => [ |
| 1137 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 1138 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1139 |
] |
| 1140 |
] |
| 1141 |
); |
| 1142 |
|
| 1143 |
$this->add_control( |
| 1144 |
'better_payment_campaign_footer_our_team_title_text', |
| 1145 |
[ |
| 1146 |
'label' => __( 'Title', 'better-payment' ), |
| 1147 |
'type' => Controls_Manager::TEXT, |
| 1148 |
'label_block' => true, |
| 1149 |
'default' => 'Our Team', |
| 1150 |
'placeholder' => 'Our Team', |
| 1151 |
'ai' => [ |
| 1152 |
'active' => false, |
| 1153 |
], |
| 1154 |
'condition' => [ |
| 1155 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 1156 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1157 |
] |
| 1158 |
] |
| 1159 |
); |
| 1160 |
|
| 1161 |
$team_member_repeater = new Repeater(); |
| 1162 |
$team_member_repeater->add_control( |
| 1163 |
'better_payment_campaign_team_member_name', |
| 1164 |
[ |
| 1165 |
'label' => esc_html__('Name', 'better-payment'), |
| 1166 |
'type' => Controls_Manager::TEXT, |
| 1167 |
'placeholder' => 'Annette Black', |
| 1168 |
'label_block' => true, |
| 1169 |
'ai' => [ |
| 1170 |
'active' => false, |
| 1171 |
], |
| 1172 |
] |
| 1173 |
); |
| 1174 |
|
| 1175 |
$team_member_repeater->add_control( |
| 1176 |
'better_payment_campaign_team_member_image', |
| 1177 |
[ |
| 1178 |
'label' => __('Choose Image', 'better-payment'), |
| 1179 |
'type' => Controls_Manager::MEDIA, |
| 1180 |
'label_block' => true, |
| 1181 |
'ai' => [ |
| 1182 |
'active' => false, |
| 1183 |
], |
| 1184 |
] |
| 1185 |
); |
| 1186 |
|
| 1187 |
$team_member_repeater->add_control( |
| 1188 |
'better_payment_campaign_team_member_designation', |
| 1189 |
[ |
| 1190 |
'label' => esc_html__('Designation', 'better-payment'), |
| 1191 |
'type' => Controls_Manager::TEXT, |
| 1192 |
'placeholder' => 'Designation', |
| 1193 |
'label_block' => true, |
| 1194 |
'ai' => [ |
| 1195 |
'active' => false, |
| 1196 |
], |
| 1197 |
] |
| 1198 |
); |
| 1199 |
|
| 1200 |
$team_member_repeater->add_control( |
| 1201 |
'better_payment_campaign_team_member_social_links_enable', |
| 1202 |
[ |
| 1203 |
'label' => __( 'Social Links', 'better-payment' ), |
| 1204 |
'type' => Controls_Manager::SWITCHER, |
| 1205 |
'label_on' => __( 'Show', 'better-payment' ), |
| 1206 |
'label_off' => __( 'Hide', 'better-payment' ), |
| 1207 |
'return_value' => 'yes', |
| 1208 |
'default' => 'yes', |
| 1209 |
] |
| 1210 |
); |
| 1211 |
|
| 1212 |
$team_member_repeater->add_control( |
| 1213 |
'better_payment_campaign_team_member_social_links_facebook', |
| 1214 |
[ |
| 1215 |
'label' => esc_html__('Facebook', 'better-payment'), |
| 1216 |
'type' => Controls_Manager::URL, |
| 1217 |
'placeholder' => 'https://www.facebook.com/', |
| 1218 |
'label_block' => true, |
| 1219 |
'ai' => [ |
| 1220 |
'active' => false, |
| 1221 |
], |
| 1222 |
'condition' => [ |
| 1223 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1224 |
] |
| 1225 |
] |
| 1226 |
); |
| 1227 |
|
| 1228 |
$team_member_repeater->add_control( |
| 1229 |
'better_payment_campaign_team_member_social_links_facebook_icon', |
| 1230 |
[ |
| 1231 |
'label' => esc_html__('Facebook Icon', 'better-payment'), |
| 1232 |
'type' => Controls_Manager::ICONS, |
| 1233 |
'default' => [ |
| 1234 |
'value' => 'fab fa-facebook-f', |
| 1235 |
'library' => 'fa-brands', |
| 1236 |
], |
| 1237 |
'condition' => [ |
| 1238 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1239 |
] |
| 1240 |
] |
| 1241 |
); |
| 1242 |
|
| 1243 |
$team_member_repeater->add_control( |
| 1244 |
'better_payment_campaign_team_member_social_links_twitter', |
| 1245 |
[ |
| 1246 |
'label' => esc_html__('X/Twitter', 'better-payment'), |
| 1247 |
'type' => Controls_Manager::URL, |
| 1248 |
'placeholder' => 'https://www.twitter.com/ or https://www.x.com/', |
| 1249 |
'label_block' => true, |
| 1250 |
'ai' => [ |
| 1251 |
'active' => false, |
| 1252 |
], |
| 1253 |
'condition' => [ |
| 1254 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1255 |
] |
| 1256 |
] |
| 1257 |
); |
| 1258 |
|
| 1259 |
$team_member_repeater->add_control( |
| 1260 |
'better_payment_campaign_team_member_social_links_twitter_icon', |
| 1261 |
[ |
| 1262 |
'label' => esc_html__('X/Twitter Icon', 'better-payment'), |
| 1263 |
'type' => Controls_Manager::ICONS, |
| 1264 |
'default' => [ |
| 1265 |
'value' => 'fab fa-x-twitter', |
| 1266 |
'library' => 'fa-brands', |
| 1267 |
], |
| 1268 |
'condition' => [ |
| 1269 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1270 |
] |
| 1271 |
] |
| 1272 |
); |
| 1273 |
|
| 1274 |
$team_member_repeater->add_control( |
| 1275 |
'better_payment_campaign_team_member_social_links_linkedin', |
| 1276 |
[ |
| 1277 |
'label' => esc_html__('LinkedIn', 'better-payment'), |
| 1278 |
'type' => Controls_Manager::URL, |
| 1279 |
'placeholder' => 'https://www.linkedin.com/', |
| 1280 |
'label_block' => true, |
| 1281 |
'ai' => [ |
| 1282 |
'active' => false, |
| 1283 |
], |
| 1284 |
'condition' => [ |
| 1285 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1286 |
] |
| 1287 |
] |
| 1288 |
); |
| 1289 |
|
| 1290 |
$team_member_repeater->add_control( |
| 1291 |
'better_payment_campaign_team_member_social_links_linkedin_icon', |
| 1292 |
[ |
| 1293 |
'label' => esc_html__('LinkedIn Icon', 'better-payment'), |
| 1294 |
'type' => Controls_Manager::ICONS, |
| 1295 |
'default' => [ |
| 1296 |
'value' => 'fab fa-linkedin-in', |
| 1297 |
'library' => 'fa-brands', |
| 1298 |
], |
| 1299 |
'condition' => [ |
| 1300 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1301 |
] |
| 1302 |
] |
| 1303 |
); |
| 1304 |
|
| 1305 |
$team_member_repeater->add_control( |
| 1306 |
'better_payment_campaign_team_member_social_links_instagram', |
| 1307 |
[ |
| 1308 |
'label' => esc_html__('Instagram', 'better-payment'), |
| 1309 |
'type' => Controls_Manager::URL, |
| 1310 |
'placeholder' => 'https://www.instagram.com/', |
| 1311 |
'label_block' => true, |
| 1312 |
'ai' => [ |
| 1313 |
'active' => false, |
| 1314 |
], |
| 1315 |
'condition' => [ |
| 1316 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1317 |
] |
| 1318 |
] |
| 1319 |
); |
| 1320 |
|
| 1321 |
$team_member_repeater->add_control( |
| 1322 |
'better_payment_campaign_team_member_social_links_instagram_icon', |
| 1323 |
[ |
| 1324 |
'label' => esc_html__('Instagram Icon', 'better-payment'), |
| 1325 |
'type' => Controls_Manager::ICONS, |
| 1326 |
'default' => [ |
| 1327 |
'value' => 'fab fa-instagram', |
| 1328 |
'library' => 'fa-brands', |
| 1329 |
], |
| 1330 |
'condition' => [ |
| 1331 |
'better_payment_campaign_team_member_social_links_enable' => 'yes', |
| 1332 |
] |
| 1333 |
] |
| 1334 |
); |
| 1335 |
|
| 1336 |
$this->add_control( |
| 1337 |
'better_payment_campaign_team_members', |
| 1338 |
[ |
| 1339 |
'label' => esc_html__( 'Team Members', 'better-payment' ), |
| 1340 |
'type' => Controls_Manager::REPEATER, |
| 1341 |
'fields' => $team_member_repeater->get_controls(), |
| 1342 |
'default' => [ |
| 1343 |
[ |
| 1344 |
'better_payment_campaign_team_member_name' => 'Annette Black', |
| 1345 |
'better_payment_campaign_team_member_image' => [ |
| 1346 |
'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-1.webp', |
| 1347 |
], |
| 1348 |
], |
| 1349 |
[ |
| 1350 |
'better_payment_campaign_team_member_name' => 'Darrell Steward', |
| 1351 |
'better_payment_campaign_team_member_image' => [ |
| 1352 |
'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-2.webp', |
| 1353 |
], |
| 1354 |
], |
| 1355 |
[ |
| 1356 |
'better_payment_campaign_team_member_name' => 'Theresa Webb', |
| 1357 |
'better_payment_campaign_team_member_image' => [ |
| 1358 |
'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-3.webp', |
| 1359 |
], |
| 1360 |
], |
| 1361 |
[ |
| 1362 |
'better_payment_campaign_team_member_name' => 'Guy Hawkins', |
| 1363 |
'better_payment_campaign_team_member_image' => [ |
| 1364 |
'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-4.webp', |
| 1365 |
], |
| 1366 |
], |
| 1367 |
], |
| 1368 |
'title_field' => '{{{ better_payment_campaign_team_member_name }}}', |
| 1369 |
'condition' => [ |
| 1370 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 1371 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1372 |
] |
| 1373 |
] |
| 1374 |
); |
| 1375 |
|
| 1376 |
$this->end_controls_section(); |
| 1377 |
} |
| 1378 |
|
| 1379 |
public function related_campaign_settings() { |
| 1380 |
$this->start_controls_section( |
| 1381 |
'better_payment_campaign_related_campaign_settings', |
| 1382 |
[ |
| 1383 |
'label' => esc_html__( 'Related Campaigns', 'better-payment' ), |
| 1384 |
'condition' => [ |
| 1385 |
'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes', |
| 1386 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 1387 |
] |
| 1388 |
] |
| 1389 |
); |
| 1390 |
|
| 1391 |
$this->add_control( |
| 1392 |
'better_payment_campaign_related_campaign_sub_title_text', |
| 1393 |
[ |
| 1394 |
'label' => __( 'Sub Title', 'better-payment' ), |
| 1395 |
'type' => Controls_Manager::TEXT, |
| 1396 |
'label_block' => true, |
| 1397 |
'placeholder' => 'We Helped More Than 3,400 Children With Your Generosity', |
| 1398 |
'ai' => [ |
| 1399 |
'active' => false, |
| 1400 |
], |
| 1401 |
'condition' => [ |
| 1402 |
'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes', |
| 1403 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 1404 |
] |
| 1405 |
] |
| 1406 |
); |
| 1407 |
|
| 1408 |
$related_campaign_repeater = new Repeater(); |
| 1409 |
$related_campaign_repeater->add_control( |
| 1410 |
'better_payment_campaign_related_campaign_id', |
| 1411 |
[ |
| 1412 |
'label' => esc_html__('Campaign ID', 'better-payment'), |
| 1413 |
'type' => Controls_Manager::TEXT, |
| 1414 |
'placeholder' => '42b4249', |
| 1415 |
'label_block' => true, |
| 1416 |
'ai' => [ |
| 1417 |
'active' => false, |
| 1418 |
], |
| 1419 |
] |
| 1420 |
); |
| 1421 |
|
| 1422 |
$this->add_control( |
| 1423 |
'better_payment_campaign_related_campaigns', |
| 1424 |
[ |
| 1425 |
'label' => esc_html__( 'Campaigns', 'better-payment' ), |
| 1426 |
'type' => Controls_Manager::REPEATER, |
| 1427 |
'fields' => $related_campaign_repeater->get_controls(), |
| 1428 |
'default' => [ |
| 1429 |
[ |
| 1430 |
'better_payment_campaign_related_campaign_id' => '', |
| 1431 |
], |
| 1432 |
[ |
| 1433 |
'better_payment_campaign_related_campaign_id' => '', |
| 1434 |
], |
| 1435 |
[ |
| 1436 |
'better_payment_campaign_related_campaign_id' => '', |
| 1437 |
], |
| 1438 |
[ |
| 1439 |
'better_payment_campaign_related_campaign_id' => '', |
| 1440 |
], |
| 1441 |
], |
| 1442 |
'title_field' => '{{{ better_payment_campaign_related_campaign_id }}}', |
| 1443 |
'condition' => [ |
| 1444 |
'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes', |
| 1445 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 1446 |
] |
| 1447 |
] |
| 1448 |
); |
| 1449 |
|
| 1450 |
$this->add_control( |
| 1451 |
'better_payment_campaign_related_campaigns_info', |
| 1452 |
[ |
| 1453 |
'type' => Controls_Manager::RAW_HTML, |
| 1454 |
'raw' => sprintf( |
| 1455 |
__( '<p class="better-payment-dynamic-value-info" style="word-break: break-word;">Under Items, provide other campaign IDs. The first campaign will be featured. Follow <a href="%1$s" target="_blank">this doc</a> to retrieve campaign ID.</p>', 'better-payment' ), |
| 1456 |
esc_url('//betterpayment.co/docs/retrieve-fundraising-campaign-id') |
| 1457 |
), |
| 1458 |
'content_classes' => 'elementor-control-alert elementor-panel-alert elementor-panel-alert-info', |
| 1459 |
'ai' => [ |
| 1460 |
'active' => false, |
| 1461 |
], |
| 1462 |
'condition' => [ |
| 1463 |
'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes', |
| 1464 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 1465 |
], |
| 1466 |
] |
| 1467 |
); |
| 1468 |
|
| 1469 |
$this->end_controls_section(); |
| 1470 |
} |
| 1471 |
public function form_style() { |
| 1472 |
$this->campaign_container_style(); |
| 1473 |
$this->campaign_header_style(); |
| 1474 |
$this->campaign_form_style(); |
| 1475 |
$this->campaign_tab_navigation_style(); |
| 1476 |
$this->campaign_overview_style(); |
| 1477 |
$this->campaign_team_style(); |
| 1478 |
do_action('better_payment/elementor/editor/campaign_pro_updates_section_style', $this); |
| 1479 |
$this->related_campaign_style(); |
| 1480 |
} |
| 1481 |
|
| 1482 |
public function campaign_container_style() { |
| 1483 |
$this->start_controls_section( |
| 1484 |
'better_payment_campaign_container_style', |
| 1485 |
[ |
| 1486 |
'label' => esc_html__( 'Container', 'better-payment' ), |
| 1487 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1488 |
] |
| 1489 |
); |
| 1490 |
|
| 1491 |
$this->add_group_control( |
| 1492 |
Group_Control_Background::get_type(), |
| 1493 |
[ |
| 1494 |
'name' => 'better_payment_campaign_container_bg_color', |
| 1495 |
'types' => [ 'classic', 'gradient' ], |
| 1496 |
'selector' => ' |
| 1497 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1, |
| 1498 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2, |
| 1499 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 |
| 1500 |
', |
| 1501 |
] |
| 1502 |
); |
| 1503 |
|
| 1504 |
$this->add_responsive_control( |
| 1505 |
'better_payment_campaign_container_padding', |
| 1506 |
[ |
| 1507 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 1508 |
'type' => Controls_Manager::DIMENSIONS, |
| 1509 |
'size_units' => [ 'px', 'em', '%' ], |
| 1510 |
'selectors' => [ |
| 1511 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1512 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1513 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1514 |
], |
| 1515 |
] |
| 1516 |
); |
| 1517 |
|
| 1518 |
$this->add_responsive_control( |
| 1519 |
'better_payment_campaign_container_margin', |
| 1520 |
[ |
| 1521 |
'label' => esc_html__( 'Margin', 'better-payment' ), |
| 1522 |
'type' => Controls_Manager::DIMENSIONS, |
| 1523 |
'size_units' => [ 'px', 'em', '%' ], |
| 1524 |
'selectors' => [ |
| 1525 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1526 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1527 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1528 |
], |
| 1529 |
] |
| 1530 |
); |
| 1531 |
|
| 1532 |
$this->add_group_control( |
| 1533 |
Group_Control_Border::get_type(), |
| 1534 |
[ |
| 1535 |
'name' => 'better_payment_campaign_container_border', |
| 1536 |
'selector' => ' |
| 1537 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1, |
| 1538 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2, |
| 1539 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 |
| 1540 |
', |
| 1541 |
] |
| 1542 |
); |
| 1543 |
|
| 1544 |
$this->add_control( |
| 1545 |
'better_payment_campaign_container_border_radius', |
| 1546 |
[ |
| 1547 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 1548 |
'type' => Controls_Manager::DIMENSIONS, |
| 1549 |
'size_units' => [ 'px' ], |
| 1550 |
'selectors' => [ |
| 1551 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1552 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1553 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1554 |
], |
| 1555 |
] |
| 1556 |
); |
| 1557 |
|
| 1558 |
$this->add_group_control( |
| 1559 |
Group_Control_Box_Shadow::get_type(), |
| 1560 |
[ |
| 1561 |
'name' => 'better_payment_campaign_container_box_shadow', |
| 1562 |
'selector' => ' |
| 1563 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1, |
| 1564 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2, |
| 1565 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 |
| 1566 |
', |
| 1567 |
] |
| 1568 |
); |
| 1569 |
|
| 1570 |
$this->end_controls_section(); |
| 1571 |
} |
| 1572 |
|
| 1573 |
public function campaign_header_style() { |
| 1574 |
$this->start_controls_section( |
| 1575 |
'better_payment_campaign_header_style', |
| 1576 |
[ |
| 1577 |
'label' => esc_html__( 'Header', 'better-payment' ), |
| 1578 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1579 |
] |
| 1580 |
); |
| 1581 |
|
| 1582 |
$this->add_group_control( |
| 1583 |
Group_Control_Background::get_type(), |
| 1584 |
[ |
| 1585 |
'name' => 'better_payment_campaign_header_background', |
| 1586 |
'types' => [ 'classic', 'gradient' ], |
| 1587 |
'selector' => ' |
| 1588 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section, |
| 1589 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section, |
| 1590 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section', |
| 1591 |
] |
| 1592 |
); |
| 1593 |
|
| 1594 |
$this->add_control( |
| 1595 |
'better_payment_campaign_header_content', |
| 1596 |
[ |
| 1597 |
'label' => __( 'Content', 'better-payment' ), |
| 1598 |
'type' => \Elementor\Controls_Manager::HEADING, |
| 1599 |
] |
| 1600 |
); |
| 1601 |
|
| 1602 |
$this->start_controls_tabs( |
| 1603 |
'better_payment_campaign_header_content_tabs' |
| 1604 |
); |
| 1605 |
|
| 1606 |
$this->start_controls_tab( |
| 1607 |
'better_payment_campaign_header_title_tab', |
| 1608 |
[ |
| 1609 |
'label' => __( 'Title', 'better-payment' ), |
| 1610 |
] |
| 1611 |
); |
| 1612 |
|
| 1613 |
$this->add_control( |
| 1614 |
'better_payment_campaign_header_title_color', |
| 1615 |
[ |
| 1616 |
'label' => __( 'Color', 'better-payment' ), |
| 1617 |
'type' => Controls_Manager::COLOR, |
| 1618 |
'default' => '', |
| 1619 |
'selectors' => [ |
| 1620 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_primary' => 'color: {{VALUE}}', |
| 1621 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'color: {{VALUE}}', |
| 1622 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'color: {{VALUE}}', |
| 1623 |
], |
| 1624 |
] |
| 1625 |
); |
| 1626 |
|
| 1627 |
$this->add_group_control( |
| 1628 |
Group_Control_Typography::get_type(), |
| 1629 |
[ |
| 1630 |
'name' => 'better_payment_campaign_header_title_typography', |
| 1631 |
'selector' => ' |
| 1632 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_primary, |
| 1633 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary, |
| 1634 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary |
| 1635 |
', |
| 1636 |
] |
| 1637 |
); |
| 1638 |
|
| 1639 |
$this->add_responsive_control( |
| 1640 |
'better_payment_campaign_header_title_padding', |
| 1641 |
[ |
| 1642 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 1643 |
'type' => Controls_Manager::DIMENSIONS, |
| 1644 |
'size_units' => [ 'px', 'em', '%' ], |
| 1645 |
'selectors' => [ |
| 1646 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_primary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1647 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1648 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1649 |
], |
| 1650 |
] |
| 1651 |
); |
| 1652 |
|
| 1653 |
$this->end_controls_tab(); |
| 1654 |
|
| 1655 |
$this->start_controls_tab( |
| 1656 |
'better_payment_campaign_header_short_desc_tab', |
| 1657 |
[ |
| 1658 |
'label' => __( 'Short Description', 'better-payment' ), |
| 1659 |
] |
| 1660 |
); |
| 1661 |
|
| 1662 |
$this->add_control( |
| 1663 |
'better_payment_campaign_header_short_desc_color', |
| 1664 |
[ |
| 1665 |
'label' => __( 'Color', 'better-payment' ), |
| 1666 |
'type' => Controls_Manager::COLOR, |
| 1667 |
'default' => '', |
| 1668 |
'selectors' => [ |
| 1669 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_secondary' => 'color: {{VALUE}}', |
| 1670 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_xm' => 'color: {{VALUE}}', |
| 1671 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary' => 'color: {{VALUE}}', |
| 1672 |
], |
| 1673 |
] |
| 1674 |
); |
| 1675 |
|
| 1676 |
$this->add_group_control( |
| 1677 |
Group_Control_Typography::get_type(), |
| 1678 |
[ |
| 1679 |
'name' => 'better_payment_campaign_header_short_desc_typography', |
| 1680 |
'selector' => ' |
| 1681 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_secondary, |
| 1682 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary, |
| 1683 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_xm, |
| 1684 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary |
| 1685 |
', |
| 1686 |
] |
| 1687 |
); |
| 1688 |
|
| 1689 |
$this->add_responsive_control( |
| 1690 |
'better_payment_campaign_header_short_desc_padding', |
| 1691 |
[ |
| 1692 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 1693 |
'type' => Controls_Manager::DIMENSIONS, |
| 1694 |
'size_units' => [ 'px', 'em', '%' ], |
| 1695 |
'selectors' => [ |
| 1696 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_secondary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1697 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_xm' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1698 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1699 |
], |
| 1700 |
] |
| 1701 |
); |
| 1702 |
|
| 1703 |
$this->end_controls_tab(); |
| 1704 |
|
| 1705 |
$this->end_controls_tabs(); |
| 1706 |
|
| 1707 |
$this->add_control( |
| 1708 |
'better_payment_campaign_images', |
| 1709 |
[ |
| 1710 |
'label' => __( 'Images', 'better-payment' ), |
| 1711 |
'type' => \Elementor\Controls_Manager::HEADING, |
| 1712 |
'separator' => 'before', |
| 1713 |
'condition' => [ |
| 1714 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1715 |
], |
| 1716 |
] |
| 1717 |
); |
| 1718 |
|
| 1719 |
$this->start_controls_tabs( |
| 1720 |
'better_payment_campaign_images_tabs' |
| 1721 |
); |
| 1722 |
|
| 1723 |
$this->start_controls_tab( |
| 1724 |
'better_payment_campaign_image_one_tab', |
| 1725 |
[ |
| 1726 |
'label' => __( 'One', 'better-payment' ), |
| 1727 |
'condition' => [ |
| 1728 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1729 |
], |
| 1730 |
] |
| 1731 |
); |
| 1732 |
|
| 1733 |
$this->add_responsive_control( |
| 1734 |
'better_payment_campaign_image_one_padding', |
| 1735 |
[ |
| 1736 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 1737 |
'type' => Controls_Manager::DIMENSIONS, |
| 1738 |
'size_units' => [ 'px', 'em', '%' ], |
| 1739 |
'selectors' => [ |
| 1740 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1741 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1742 |
], |
| 1743 |
'condition' => [ |
| 1744 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1745 |
], |
| 1746 |
] |
| 1747 |
); |
| 1748 |
|
| 1749 |
$this->add_responsive_control( |
| 1750 |
'better_payment_campaign_image_one_margin', |
| 1751 |
[ |
| 1752 |
'label' => esc_html__( 'Margin', 'better-payment' ), |
| 1753 |
'type' => Controls_Manager::DIMENSIONS, |
| 1754 |
'size_units' => [ 'px', 'em', '%' ], |
| 1755 |
'selectors' => [ |
| 1756 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1757 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1758 |
], |
| 1759 |
'condition' => [ |
| 1760 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1761 |
], |
| 1762 |
] |
| 1763 |
); |
| 1764 |
|
| 1765 |
$this->add_group_control( |
| 1766 |
Group_Control_Border::get_type(), |
| 1767 |
[ |
| 1768 |
'name' => 'better_payment_campaign_image_one_border', |
| 1769 |
'selector' => ' |
| 1770 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img, |
| 1771 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img |
| 1772 |
', |
| 1773 |
'condition' => [ |
| 1774 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1775 |
], |
| 1776 |
] |
| 1777 |
); |
| 1778 |
|
| 1779 |
$this->add_control( |
| 1780 |
'better_payment_campaign_image_one_border_radius', |
| 1781 |
[ |
| 1782 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 1783 |
'type' => Controls_Manager::DIMENSIONS, |
| 1784 |
'size_units' => [ 'px' ], |
| 1785 |
'selectors' => [ |
| 1786 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1787 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1788 |
], |
| 1789 |
'condition' => [ |
| 1790 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1791 |
], |
| 1792 |
] |
| 1793 |
); |
| 1794 |
|
| 1795 |
$this->add_responsive_control( |
| 1796 |
'better_payment_campaign_image_one_width', |
| 1797 |
[ |
| 1798 |
'label' => esc_html__( 'Width', 'better-payment' ), |
| 1799 |
'type' => Controls_Manager::SLIDER, |
| 1800 |
'range' => [ |
| 1801 |
'px' => [ |
| 1802 |
'min' => 0, |
| 1803 |
'max' => 1200, |
| 1804 |
'step' => 1, |
| 1805 |
], |
| 1806 |
], |
| 1807 |
'size_units' => [ 'px', 'em', '%' ], |
| 1808 |
'selectors' => [ |
| 1809 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'width: {{SIZE}}{{UNIT}};', |
| 1810 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'width: {{SIZE}}{{UNIT}};', |
| 1811 |
], |
| 1812 |
'condition' => [ |
| 1813 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1814 |
], |
| 1815 |
] |
| 1816 |
); |
| 1817 |
|
| 1818 |
$this->add_responsive_control( |
| 1819 |
'better_payment_campaign_image_one_height', |
| 1820 |
[ |
| 1821 |
'label' => esc_html__( 'Height', 'better-payment' ), |
| 1822 |
'type' => Controls_Manager::SLIDER, |
| 1823 |
'range' => [ |
| 1824 |
'px' => [ |
| 1825 |
'min' => 0, |
| 1826 |
'max' => 1200, |
| 1827 |
'step' => 1, |
| 1828 |
], |
| 1829 |
], |
| 1830 |
'size_units' => [ 'px', 'em', '%' ], |
| 1831 |
'selectors' => [ |
| 1832 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'height: {{SIZE}}{{UNIT}};', |
| 1833 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'height: {{SIZE}}{{UNIT}};', |
| 1834 |
], |
| 1835 |
'condition' => [ |
| 1836 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ], |
| 1837 |
], |
| 1838 |
] |
| 1839 |
); |
| 1840 |
|
| 1841 |
$this->end_controls_tab(); |
| 1842 |
|
| 1843 |
$this->start_controls_tab( |
| 1844 |
'better_payment_campaign_image_two_tab', |
| 1845 |
[ |
| 1846 |
'label' => __( 'Two', 'better-payment' ), |
| 1847 |
'condition' => [ |
| 1848 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1849 |
], |
| 1850 |
] |
| 1851 |
); |
| 1852 |
|
| 1853 |
$this->add_responsive_control( |
| 1854 |
'better_payment_campaign_image_two_padding', |
| 1855 |
[ |
| 1856 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 1857 |
'type' => Controls_Manager::DIMENSIONS, |
| 1858 |
'size_units' => [ 'px', 'em', '%' ], |
| 1859 |
'selectors' => [ |
| 1860 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1861 |
], |
| 1862 |
'condition' => [ |
| 1863 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1864 |
], |
| 1865 |
] |
| 1866 |
); |
| 1867 |
|
| 1868 |
$this->add_responsive_control( |
| 1869 |
'better_payment_campaign_image_two_margin', |
| 1870 |
[ |
| 1871 |
'label' => esc_html__( 'Margin', 'better-payment' ), |
| 1872 |
'type' => Controls_Manager::DIMENSIONS, |
| 1873 |
'size_units' => [ 'px', 'em', '%' ], |
| 1874 |
'selectors' => [ |
| 1875 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1876 |
], |
| 1877 |
'condition' => [ |
| 1878 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1879 |
], |
| 1880 |
] |
| 1881 |
); |
| 1882 |
|
| 1883 |
$this->add_group_control( |
| 1884 |
Group_Control_Border::get_type(), |
| 1885 |
[ |
| 1886 |
'name' => 'better_payment_campaign_image_two_border', |
| 1887 |
'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img', |
| 1888 |
'condition' => [ |
| 1889 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1890 |
], |
| 1891 |
] |
| 1892 |
); |
| 1893 |
|
| 1894 |
$this->add_control( |
| 1895 |
'better_payment_campaign_image_two_border_radius', |
| 1896 |
[ |
| 1897 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 1898 |
'type' => Controls_Manager::DIMENSIONS, |
| 1899 |
'size_units' => [ 'px' ], |
| 1900 |
'selectors' => [ |
| 1901 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1902 |
], |
| 1903 |
'condition' => [ |
| 1904 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1905 |
], |
| 1906 |
] |
| 1907 |
); |
| 1908 |
|
| 1909 |
$this->add_responsive_control( |
| 1910 |
'better_payment_campaign_image_two_width', |
| 1911 |
[ |
| 1912 |
'label' => esc_html__( 'Width', 'better-payment' ), |
| 1913 |
'type' => Controls_Manager::SLIDER, |
| 1914 |
'range' => [ |
| 1915 |
'px' => [ |
| 1916 |
'min' => 0, |
| 1917 |
'max' => 1200, |
| 1918 |
'step' => 1, |
| 1919 |
], |
| 1920 |
], |
| 1921 |
'size_units' => [ 'px', 'em', '%' ], |
| 1922 |
'selectors' => [ |
| 1923 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'width: {{SIZE}}{{UNIT}};', |
| 1924 |
], |
| 1925 |
'condition' => [ |
| 1926 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1927 |
], |
| 1928 |
] |
| 1929 |
); |
| 1930 |
|
| 1931 |
$this->add_responsive_control( |
| 1932 |
'better_payment_campaign_image_two_height', |
| 1933 |
[ |
| 1934 |
'label' => esc_html__( 'Height', 'better-payment' ), |
| 1935 |
'type' => Controls_Manager::SLIDER, |
| 1936 |
'range' => [ |
| 1937 |
'px' => [ |
| 1938 |
'min' => 0, |
| 1939 |
'max' => 1200, |
| 1940 |
'step' => 1, |
| 1941 |
], |
| 1942 |
], |
| 1943 |
'size_units' => [ 'px', 'em', '%' ], |
| 1944 |
'selectors' => [ |
| 1945 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'height: {{SIZE}}{{UNIT}};', |
| 1946 |
], |
| 1947 |
'condition' => [ |
| 1948 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 1949 |
], |
| 1950 |
] |
| 1951 |
); |
| 1952 |
|
| 1953 |
$this->end_controls_tab(); |
| 1954 |
$this->end_controls_tabs(); |
| 1955 |
|
| 1956 |
$this->end_controls_section(); |
| 1957 |
} |
| 1958 |
|
| 1959 |
public function campaign_form_style() { |
| 1960 |
$this->start_controls_section( |
| 1961 |
'better_payment_campaign_form_style', |
| 1962 |
[ |
| 1963 |
'label' => esc_html__( 'Form', 'better-payment' ), |
| 1964 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1965 |
] |
| 1966 |
); |
| 1967 |
|
| 1968 |
$this->add_group_control( |
| 1969 |
Group_Control_Background::get_type(), |
| 1970 |
[ |
| 1971 |
'name' => 'better_payment_campaign_form_background_color', |
| 1972 |
'types' => [ 'classic', 'gradient' ], |
| 1973 |
'selector' => ' |
| 1974 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card, |
| 1975 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card |
| 1976 |
', |
| 1977 |
'condition' => [ |
| 1978 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 1979 |
], |
| 1980 |
] |
| 1981 |
); |
| 1982 |
|
| 1983 |
$this->add_group_control( |
| 1984 |
Group_Control_Border::get_type(), |
| 1985 |
[ |
| 1986 |
'name' => 'better_payment_campaign_form_border', |
| 1987 |
'selector' => ' |
| 1988 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card, |
| 1989 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card |
| 1990 |
', |
| 1991 |
'condition' => [ |
| 1992 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 1993 |
], |
| 1994 |
] |
| 1995 |
); |
| 1996 |
|
| 1997 |
$this->add_control( |
| 1998 |
'better_payment_campaign_form_border_radius', |
| 1999 |
[ |
| 2000 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 2001 |
'type' => Controls_Manager::DIMENSIONS, |
| 2002 |
'size_units' => [ 'px' ], |
| 2003 |
'selectors' => [ |
| 2004 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2005 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2006 |
], |
| 2007 |
'condition' => [ |
| 2008 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 2009 |
], |
| 2010 |
] |
| 2011 |
); |
| 2012 |
|
| 2013 |
$this->start_controls_tabs( |
| 2014 |
'better_payment_campaign_form_tabs', |
| 2015 |
[ |
| 2016 |
'condition' => [ |
| 2017 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 2018 |
], |
| 2019 |
'separator' => 'before', |
| 2020 |
] |
| 2021 |
); |
| 2022 |
|
| 2023 |
$this->start_controls_tab( |
| 2024 |
'better_payment_campaign_form_title_tab', |
| 2025 |
[ |
| 2026 |
'label' => __( 'Title', 'better-payment' ), |
| 2027 |
'condition' => [ |
| 2028 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 2029 |
], |
| 2030 |
] |
| 2031 |
); |
| 2032 |
|
| 2033 |
$this->add_control( |
| 2034 |
'better_payment_campaign_form_title_color', |
| 2035 |
[ |
| 2036 |
'label' => __( 'Color', 'better-payment' ), |
| 2037 |
'type' => Controls_Manager::COLOR, |
| 2038 |
'selectors' => [ |
| 2039 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper .bp-form_header' => 'color: {{VALUE}}', |
| 2040 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-header' => 'color: {{VALUE}}', |
| 2041 |
], |
| 2042 |
'condition' => [ |
| 2043 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 2044 |
], |
| 2045 |
] |
| 2046 |
); |
| 2047 |
|
| 2048 |
$this->add_group_control( |
| 2049 |
Group_Control_Typography::get_type(), |
| 2050 |
[ |
| 2051 |
'name' => 'better_payment_campaign_form_title_typography', |
| 2052 |
'selector' => ' |
| 2053 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper .bp-form_header, |
| 2054 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-header |
| 2055 |
', |
| 2056 |
'condition' => [ |
| 2057 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 2058 |
], |
| 2059 |
] |
| 2060 |
); |
| 2061 |
|
| 2062 |
$this->end_controls_tab(); |
| 2063 |
|
| 2064 |
$this->start_controls_tab( |
| 2065 |
'better_payment_campaign_form_sub_title_tab', |
| 2066 |
[ |
| 2067 |
'label' => __( 'Sub Title', 'better-payment' ), |
| 2068 |
'condition' => [ |
| 2069 |
'better_payment_campaign_layout' => [ 'layout-2', ], |
| 2070 |
], |
| 2071 |
] |
| 2072 |
); |
| 2073 |
|
| 2074 |
$this->add_control( |
| 2075 |
'better_payment_campaign_form_sub_title_color', |
| 2076 |
[ |
| 2077 |
'label' => __( 'Color', 'better-payment' ), |
| 2078 |
'type' => Controls_Manager::COLOR, |
| 2079 |
'selectors' => [ |
| 2080 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'color: {{VALUE}}', |
| 2081 |
], |
| 2082 |
'condition' => [ |
| 2083 |
'better_payment_campaign_layout' => [ 'layout-2', ], |
| 2084 |
], |
| 2085 |
] |
| 2086 |
); |
| 2087 |
|
| 2088 |
$this->add_group_control( |
| 2089 |
Group_Control_Typography::get_type(), |
| 2090 |
[ |
| 2091 |
'name' => 'better_payment_campaign_form_sub_title_typography', |
| 2092 |
'selector' => ' |
| 2093 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag |
| 2094 |
', |
| 2095 |
'condition' => [ |
| 2096 |
'better_payment_campaign_layout' => [ 'layout-2', ], |
| 2097 |
], |
| 2098 |
] |
| 2099 |
); |
| 2100 |
|
| 2101 |
$this->add_control( |
| 2102 |
'better_payment_campaign_form_sub_title_background_color', |
| 2103 |
[ |
| 2104 |
'label' => __( 'Background', 'better-payment' ), |
| 2105 |
'type' => Controls_Manager::COLOR, |
| 2106 |
'selectors' => [ |
| 2107 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'background-color: {{VALUE}}', |
| 2108 |
], |
| 2109 |
'condition' => [ |
| 2110 |
'better_payment_campaign_layout' => [ 'layout-2', ], |
| 2111 |
], |
| 2112 |
] |
| 2113 |
); |
| 2114 |
|
| 2115 |
$this->add_control( |
| 2116 |
'better_payment_campaign_form_sub_title_padding', |
| 2117 |
[ |
| 2118 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 2119 |
'type' => Controls_Manager::DIMENSIONS, |
| 2120 |
'size_units' => [ 'px' ], |
| 2121 |
'selectors' => [ |
| 2122 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2123 |
], |
| 2124 |
'condition' => [ |
| 2125 |
'better_payment_campaign_layout' => [ 'layout-2', ], |
| 2126 |
], |
| 2127 |
] |
| 2128 |
); |
| 2129 |
|
| 2130 |
$this->add_group_control( |
| 2131 |
Group_Control_Border::get_type(), |
| 2132 |
[ |
| 2133 |
'name' => 'better_payment_campaign_form_sub_title_border', |
| 2134 |
'label' => __( 'Border', 'better-payment' ), |
| 2135 |
'placeholder' => '1px', |
| 2136 |
'default' => '1px', |
| 2137 |
'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag', |
| 2138 |
'condition' => [ |
| 2139 |
'better_payment_campaign_layout' => [ 'layout-2', ], |
| 2140 |
], |
| 2141 |
] |
| 2142 |
); |
| 2143 |
|
| 2144 |
$this->add_control( |
| 2145 |
'better_payment_campaign_form_sub_title_border_radius', |
| 2146 |
[ |
| 2147 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 2148 |
'type' => Controls_Manager::DIMENSIONS, |
| 2149 |
'size_units' => [ 'px' ], |
| 2150 |
'selectors' => [ |
| 2151 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2152 |
], |
| 2153 |
'condition' => [ |
| 2154 |
'better_payment_campaign_layout' => [ 'layout-2', ], |
| 2155 |
], |
| 2156 |
] |
| 2157 |
); |
| 2158 |
|
| 2159 |
$this->end_controls_tab(); |
| 2160 |
$this->end_controls_tabs(); |
| 2161 |
|
| 2162 |
$this->add_control( |
| 2163 |
'better_payment_campaign_form_progress_bar_heading', |
| 2164 |
[ |
| 2165 |
'label' => esc_html__( 'Progress Bar', 'better-payment' ), |
| 2166 |
'type' => Controls_Manager::HEADING, |
| 2167 |
'separator' => 'before', |
| 2168 |
'condition' => [ |
| 2169 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2170 |
], |
| 2171 |
] |
| 2172 |
); |
| 2173 |
|
| 2174 |
$this->start_controls_tabs( |
| 2175 |
'better_payment_campaign_form_progress_bar_tabs', |
| 2176 |
[ |
| 2177 |
'condition' => [ |
| 2178 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2179 |
], |
| 2180 |
] |
| 2181 |
); |
| 2182 |
|
| 2183 |
$this->start_controls_tab( |
| 2184 |
'better_payment_campaign_form_progress_bar_amount_tab', |
| 2185 |
[ |
| 2186 |
'label' => __( 'Amount', 'better-payment' ), |
| 2187 |
'condition' => [ |
| 2188 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2189 |
], |
| 2190 |
] |
| 2191 |
); |
| 2192 |
|
| 2193 |
$this->add_control( |
| 2194 |
'better_payment_campaign_form_progress_bar_amount_color', |
| 2195 |
[ |
| 2196 |
'label' => __( 'Color', 'better-payment' ), |
| 2197 |
'type' => Controls_Manager::COLOR, |
| 2198 |
'selectors' => [ |
| 2199 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-aamount' => 'color: {{VALUE}}' |
| 2200 |
], |
| 2201 |
'condition' => [ |
| 2202 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2203 |
], |
| 2204 |
] |
| 2205 |
); |
| 2206 |
|
| 2207 |
$this->add_group_control( |
| 2208 |
Group_Control_Typography::get_type(), |
| 2209 |
[ |
| 2210 |
'name' => 'better_payment_campaign_form_progress_bar_amount_typography', |
| 2211 |
'selector' => ' |
| 2212 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-aamount |
| 2213 |
', |
| 2214 |
'condition' => [ |
| 2215 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2216 |
], |
| 2217 |
] |
| 2218 |
); |
| 2219 |
|
| 2220 |
$this->end_controls_tab(); |
| 2221 |
|
| 2222 |
$this->start_controls_tab( |
| 2223 |
'better_payment_campaign_form_progress_bar_percentage_tab', |
| 2224 |
[ |
| 2225 |
'label' => __( 'Percentage', 'better-payment' ), |
| 2226 |
'condition' => [ |
| 2227 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2228 |
], |
| 2229 |
] |
| 2230 |
); |
| 2231 |
|
| 2232 |
$this->add_control( |
| 2233 |
'better_payment_campaign_form_progress_bar_percentage_color', |
| 2234 |
[ |
| 2235 |
'label' => __( 'Color', 'better-payment' ), |
| 2236 |
'type' => Controls_Manager::COLOR, |
| 2237 |
'selectors' => [ |
| 2238 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-progress_output' => 'color: {{VALUE}}', |
| 2239 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top span.bp-amount-label' => 'color: {{VALUE}}', |
| 2240 |
], |
| 2241 |
'condition' => [ |
| 2242 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2243 |
], |
| 2244 |
] |
| 2245 |
); |
| 2246 |
|
| 2247 |
$this->add_group_control( |
| 2248 |
Group_Control_Typography::get_type(), |
| 2249 |
[ |
| 2250 |
'name' => 'better_payment_campaign_form_progress_bar_percentage_typography', |
| 2251 |
'selector' => ' |
| 2252 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-progress_output, |
| 2253 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top span.bp-amount-label |
| 2254 |
', |
| 2255 |
'condition' => [ |
| 2256 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2257 |
], |
| 2258 |
] |
| 2259 |
); |
| 2260 |
|
| 2261 |
$this->end_controls_tab(); |
| 2262 |
|
| 2263 |
$this->start_controls_tab( |
| 2264 |
'better_payment_campaign_form_progress_bar_bar_tab', |
| 2265 |
[ |
| 2266 |
'label' => __( 'Bar', 'better-payment' ), |
| 2267 |
'condition' => [ |
| 2268 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2269 |
], |
| 2270 |
] |
| 2271 |
); |
| 2272 |
|
| 2273 |
$this->add_control( |
| 2274 |
'better_payment_campaign_form_progress_bar_bar_color', |
| 2275 |
[ |
| 2276 |
'label' => __( 'Color', 'better-payment' ), |
| 2277 |
'type' => Controls_Manager::COLOR, |
| 2278 |
'selectors' => [ |
| 2279 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar::-webkit-progress-value' => 'background-color: {{VALUE}}', |
| 2280 |
], |
| 2281 |
'condition' => [ |
| 2282 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2283 |
], |
| 2284 |
] |
| 2285 |
); |
| 2286 |
|
| 2287 |
$this->add_control( |
| 2288 |
'better_payment_campaign_form_progress_bar_bar_bg_color', |
| 2289 |
[ |
| 2290 |
'label' => __( 'Background', 'better-payment' ), |
| 2291 |
'type' => Controls_Manager::COLOR, |
| 2292 |
'selectors' => [ |
| 2293 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar::-webkit-progress-bar' => 'background-color: {{VALUE}}', |
| 2294 |
], |
| 2295 |
'condition' => [ |
| 2296 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2297 |
], |
| 2298 |
] |
| 2299 |
); |
| 2300 |
|
| 2301 |
$this->add_control( |
| 2302 |
'better_payment_campaign_form_progress_bar_bar_height', |
| 2303 |
[ |
| 2304 |
'label' => esc_html__( 'Height', 'better-payment' ), |
| 2305 |
'type' => Controls_Manager::SLIDER, |
| 2306 |
'size_units' => [ 'px' ], |
| 2307 |
'range' => [ |
| 2308 |
'px' => [ |
| 2309 |
'min' => 1, |
| 2310 |
'max' => 100, |
| 2311 |
'step' => 1, |
| 2312 |
], |
| 2313 |
], |
| 2314 |
'selectors' => [ |
| 2315 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar' => 'height: {{SIZE}}{{UNIT}};', |
| 2316 |
], |
| 2317 |
'condition' => [ |
| 2318 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2319 |
], |
| 2320 |
] |
| 2321 |
); |
| 2322 |
|
| 2323 |
$this->add_control( |
| 2324 |
'better_payment_campaign_form_progress_bar_bar_border_radius', |
| 2325 |
[ |
| 2326 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 2327 |
'type' => Controls_Manager::DIMENSIONS, |
| 2328 |
'size_units' => [ 'px' ], |
| 2329 |
'selectors' => [ |
| 2330 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2331 |
], |
| 2332 |
'condition' => [ |
| 2333 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2334 |
], |
| 2335 |
] |
| 2336 |
); |
| 2337 |
|
| 2338 |
$this->end_controls_tab(); |
| 2339 |
|
| 2340 |
$this->end_controls_tabs(); |
| 2341 |
|
| 2342 |
$this->add_control( |
| 2343 |
'better_payment_campaign_form_progress_bar_heading_l2', |
| 2344 |
[ |
| 2345 |
'label' => esc_html__( 'Progress Bar', 'better-payment' ), |
| 2346 |
'type' => Controls_Manager::HEADING, |
| 2347 |
'separator' => 'before', |
| 2348 |
'condition' => [ |
| 2349 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2350 |
], |
| 2351 |
] |
| 2352 |
); |
| 2353 |
|
| 2354 |
$this->start_controls_tabs( |
| 2355 |
'better_payment_campaign_form_progress_bar_tabs_l2', |
| 2356 |
[ |
| 2357 |
'condition' => [ |
| 2358 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2359 |
], |
| 2360 |
] |
| 2361 |
); |
| 2362 |
|
| 2363 |
$this->start_controls_tab( |
| 2364 |
'better_payment_campaign_form_progress_bar_bar_tab_l2', |
| 2365 |
[ |
| 2366 |
'label' => __( 'Bar', 'better-payment' ), |
| 2367 |
'condition' => [ |
| 2368 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2369 |
], |
| 2370 |
] |
| 2371 |
); |
| 2372 |
|
| 2373 |
$this->add_control( |
| 2374 |
'better_payment_campaign_form_progress_bar_bar_color_l2', |
| 2375 |
[ |
| 2376 |
'label' => __( 'Color', 'better-payment' ), |
| 2377 |
'type' => Controls_Manager::COLOR, |
| 2378 |
'selectors' => [ |
| 2379 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar::-webkit-progress-value' => 'background-color: {{VALUE}}', |
| 2380 |
], |
| 2381 |
'condition' => [ |
| 2382 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2383 |
], |
| 2384 |
] |
| 2385 |
); |
| 2386 |
|
| 2387 |
$this->add_control( |
| 2388 |
'better_payment_campaign_form_progress_bar_bar_bg_color_l2', |
| 2389 |
[ |
| 2390 |
'label' => __( 'Background', 'better-payment' ), |
| 2391 |
'type' => Controls_Manager::COLOR, |
| 2392 |
'selectors' => [ |
| 2393 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar::-webkit-progress-bar' => 'background-color: {{VALUE}}', |
| 2394 |
], |
| 2395 |
'condition' => [ |
| 2396 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2397 |
], |
| 2398 |
] |
| 2399 |
); |
| 2400 |
|
| 2401 |
$this->add_control( |
| 2402 |
'better_payment_campaign_form_progress_bar_bar_height_l2', |
| 2403 |
[ |
| 2404 |
'label' => esc_html__( 'Height', 'better-payment' ), |
| 2405 |
'type' => Controls_Manager::SLIDER, |
| 2406 |
'size_units' => [ 'px' ], |
| 2407 |
'range' => [ |
| 2408 |
'px' => [ |
| 2409 |
'min' => 1, |
| 2410 |
'max' => 100, |
| 2411 |
'step' => 1, |
| 2412 |
], |
| 2413 |
], |
| 2414 |
'selectors' => [ |
| 2415 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar' => 'height: {{SIZE}}{{UNIT}};', |
| 2416 |
], |
| 2417 |
'condition' => [ |
| 2418 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2419 |
], |
| 2420 |
] |
| 2421 |
); |
| 2422 |
|
| 2423 |
$this->add_control( |
| 2424 |
'better_payment_campaign_form_progress_bar_bar_border_radius_l2', |
| 2425 |
[ |
| 2426 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 2427 |
'type' => Controls_Manager::DIMENSIONS, |
| 2428 |
'size_units' => [ 'px' ], |
| 2429 |
'selectors' => [ |
| 2430 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2431 |
], |
| 2432 |
'condition' => [ |
| 2433 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2434 |
], |
| 2435 |
] |
| 2436 |
); |
| 2437 |
|
| 2438 |
$this->end_controls_tab(); |
| 2439 |
|
| 2440 |
$this->start_controls_tab( |
| 2441 |
'better_payment_campaign_form_progress_bar_amount_tab_l2', |
| 2442 |
[ |
| 2443 |
'label' => __( 'Donations', 'better-payment' ), |
| 2444 |
'condition' => [ |
| 2445 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2446 |
], |
| 2447 |
] |
| 2448 |
); |
| 2449 |
|
| 2450 |
$this->add_control( |
| 2451 |
'better_payment_campaign_form_progress_bar_amount_color_l2', |
| 2452 |
[ |
| 2453 |
'label' => __( 'Color', 'better-payment' ), |
| 2454 |
'type' => Controls_Manager::COLOR, |
| 2455 |
'selectors' => [ |
| 2456 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form label.bp-donations' => 'color: {{VALUE}}', |
| 2457 |
], |
| 2458 |
'condition' => [ |
| 2459 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2460 |
], |
| 2461 |
] |
| 2462 |
); |
| 2463 |
|
| 2464 |
$this->add_group_control( |
| 2465 |
Group_Control_Typography::get_type(), |
| 2466 |
[ |
| 2467 |
'name' => 'better_payment_campaign_form_progress_bar_amount_typography_l2', |
| 2468 |
'selector' => ' |
| 2469 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form label.bp-donations |
| 2470 |
', |
| 2471 |
'condition' => [ |
| 2472 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2473 |
], |
| 2474 |
] |
| 2475 |
); |
| 2476 |
|
| 2477 |
$this->end_controls_tab(); |
| 2478 |
|
| 2479 |
$this->start_controls_tab( |
| 2480 |
'better_payment_campaign_form_progress_bar_percentage_tab_l2', |
| 2481 |
[ |
| 2482 |
'label' => __( 'Raised', 'better-payment' ), |
| 2483 |
'condition' => [ |
| 2484 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2485 |
], |
| 2486 |
] |
| 2487 |
); |
| 2488 |
|
| 2489 |
$this->add_control( |
| 2490 |
'better_payment_campaign_form_progress_bar_percentage_color_l2', |
| 2491 |
[ |
| 2492 |
'label' => __( 'Color', 'better-payment' ), |
| 2493 |
'type' => Controls_Manager::COLOR, |
| 2494 |
'selectors' => [ |
| 2495 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 form .bp-text_m' => 'color: {{VALUE}}', |
| 2496 |
], |
| 2497 |
'condition' => [ |
| 2498 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2499 |
], |
| 2500 |
] |
| 2501 |
); |
| 2502 |
|
| 2503 |
$this->add_group_control( |
| 2504 |
Group_Control_Typography::get_type(), |
| 2505 |
[ |
| 2506 |
'name' => 'better_payment_campaign_form_progress_bar_percentage_typography_l2', |
| 2507 |
'selector' => ' |
| 2508 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 form .bp-text_m |
| 2509 |
', |
| 2510 |
'condition' => [ |
| 2511 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 2512 |
], |
| 2513 |
] |
| 2514 |
); |
| 2515 |
|
| 2516 |
$this->end_controls_tab(); |
| 2517 |
|
| 2518 |
$this->end_controls_tabs(); |
| 2519 |
|
| 2520 |
$this->add_control( |
| 2521 |
'better_payment_campaign_form_amount_list_heading', |
| 2522 |
[ |
| 2523 |
'label' => esc_html__( 'Amount List', 'better-payment' ), |
| 2524 |
'type' => Controls_Manager::HEADING, |
| 2525 |
'separator' => 'before', |
| 2526 |
'condition' => [ |
| 2527 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2528 |
], |
| 2529 |
] |
| 2530 |
); |
| 2531 |
|
| 2532 |
$this->start_controls_tabs( |
| 2533 |
'better_payment_campaign_form_amount_list_tabs', |
| 2534 |
[ |
| 2535 |
'condition' => [ |
| 2536 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2537 |
], |
| 2538 |
] |
| 2539 |
); |
| 2540 |
|
| 2541 |
$this->start_controls_tab( |
| 2542 |
'better_payment_campaign_form_amount_list_normal_tab', |
| 2543 |
[ |
| 2544 |
'label' => __( 'Normal', 'better-payment' ), |
| 2545 |
'condition' => [ |
| 2546 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2547 |
], |
| 2548 |
] |
| 2549 |
); |
| 2550 |
|
| 2551 |
$this->add_control( |
| 2552 |
'better_payment_campaign_form_amount_list_normal_color', |
| 2553 |
[ |
| 2554 |
'label' => __( 'Color', 'better-payment' ), |
| 2555 |
'type' => Controls_Manager::COLOR, |
| 2556 |
'selectors' => [ |
| 2557 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'color: {{VALUE}}', |
| 2558 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'color: {{VALUE}}', |
| 2559 |
], |
| 2560 |
'condition' => [ |
| 2561 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2562 |
], |
| 2563 |
] |
| 2564 |
); |
| 2565 |
|
| 2566 |
$this->add_group_control( |
| 2567 |
Group_Control_Typography::get_type(), |
| 2568 |
[ |
| 2569 |
'name' => 'better_payment_campaign_form_amount_list_typography', |
| 2570 |
'selector' => ' |
| 2571 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label, |
| 2572 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg |
| 2573 |
', |
| 2574 |
'condition' => [ |
| 2575 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2576 |
], |
| 2577 |
] |
| 2578 |
); |
| 2579 |
|
| 2580 |
$this->add_control( |
| 2581 |
'better_payment_campaign_form_amount_list_normal_background_color', |
| 2582 |
[ |
| 2583 |
'label' => __( 'Background', 'better-payment' ), |
| 2584 |
'type' => Controls_Manager::COLOR, |
| 2585 |
'selectors' => [ |
| 2586 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'background-color: {{VALUE}}', |
| 2587 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'background-color: {{VALUE}}', |
| 2588 |
], |
| 2589 |
'condition' => [ |
| 2590 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2591 |
], |
| 2592 |
] |
| 2593 |
); |
| 2594 |
|
| 2595 |
$this->add_responsive_control( |
| 2596 |
'better_payment_campaign_form_amount_list_normal_padding', |
| 2597 |
[ |
| 2598 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 2599 |
'type' => Controls_Manager::DIMENSIONS, |
| 2600 |
'size_units' => [ 'px', 'em', '%' ], |
| 2601 |
'selectors' => [ |
| 2602 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2603 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2604 |
], |
| 2605 |
'condition' => [ |
| 2606 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 2607 |
], |
| 2608 |
] |
| 2609 |
); |
| 2610 |
|
| 2611 |
$this->add_group_control( |
| 2612 |
Group_Control_Border::get_type(), |
| 2613 |
[ |
| 2614 |
'name' => 'better_payment_campaign_form_amount_list_normal_border', |
| 2615 |
'label' => __( 'Border', 'better-payment' ), |
| 2616 |
'placeholder' => '1px', |
| 2617 |
'default' => '1px', |
| 2618 |
'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label, {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg', |
| 2619 |
'condition' => [ |
| 2620 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2621 |
], |
| 2622 |
] |
| 2623 |
); |
| 2624 |
|
| 2625 |
$this->add_control( |
| 2626 |
'better_payment_campaign_form_amount_list_normal_border_radius', |
| 2627 |
[ |
| 2628 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 2629 |
'type' => Controls_Manager::DIMENSIONS, |
| 2630 |
'size_units' => [ 'px' ], |
| 2631 |
'selectors' => [ |
| 2632 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2633 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2634 |
], |
| 2635 |
'condition' => [ |
| 2636 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2637 |
], |
| 2638 |
] |
| 2639 |
); |
| 2640 |
|
| 2641 |
$this->end_controls_tab(); |
| 2642 |
|
| 2643 |
$this->start_controls_tab( |
| 2644 |
'better_payment_campaign_form_amount_list_active_tab', |
| 2645 |
[ |
| 2646 |
'label' => __( 'Active', 'better-payment' ), |
| 2647 |
'condition' => [ |
| 2648 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2649 |
], |
| 2650 |
] |
| 2651 |
); |
| 2652 |
|
| 2653 |
$this->add_control( |
| 2654 |
'better_payment_campaign_form_amount_list_active_color', |
| 2655 |
[ |
| 2656 |
'label' => __( 'Color', 'better-payment' ), |
| 2657 |
'type' => Controls_Manager::COLOR, |
| 2658 |
'selectors' => [ |
| 2659 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_active' => 'color: {{VALUE}}', |
| 2660 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg.active_border' => 'color: {{VALUE}}', |
| 2661 |
], |
| 2662 |
'condition' => [ |
| 2663 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2664 |
], |
| 2665 |
] |
| 2666 |
); |
| 2667 |
|
| 2668 |
$this->add_control( |
| 2669 |
'better_payment_campaign_form_amount_list_active_background_color', |
| 2670 |
[ |
| 2671 |
'label' => __( 'Background Color', 'better-payment' ), |
| 2672 |
'type' => Controls_Manager::COLOR, |
| 2673 |
'selectors' => [ |
| 2674 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_active' => 'background-color: {{VALUE}}', |
| 2675 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg.active_border' => 'background-color: {{VALUE}}', |
| 2676 |
], |
| 2677 |
'condition' => [ |
| 2678 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2679 |
], |
| 2680 |
] |
| 2681 |
); |
| 2682 |
|
| 2683 |
$this->add_group_control( |
| 2684 |
Group_Control_Border::get_type(), |
| 2685 |
[ |
| 2686 |
'name' => 'better_payment_campaign_form_amount_list_active_border', |
| 2687 |
'label' => __( 'Border', 'better-payment' ), |
| 2688 |
'placeholder' => '1px', |
| 2689 |
'default' => '1px', |
| 2690 |
'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_active, {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg.active_border', |
| 2691 |
'condition' => [ |
| 2692 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2693 |
], |
| 2694 |
] |
| 2695 |
); |
| 2696 |
|
| 2697 |
$this->end_controls_tab(); |
| 2698 |
$this->end_controls_tabs(); |
| 2699 |
|
| 2700 |
$this->add_control( |
| 2701 |
'better_payment_campaign_form_amount_field_heading', |
| 2702 |
[ |
| 2703 |
'label' => __( 'Amount Field', 'better-payment' ), |
| 2704 |
'type' => Controls_Manager::HEADING, |
| 2705 |
'separator' => 'before', |
| 2706 |
'condition' => [ |
| 2707 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2708 |
], |
| 2709 |
] |
| 2710 |
); |
| 2711 |
|
| 2712 |
$this->add_control( |
| 2713 |
'better_payment_campaign_form_amount_field_color', |
| 2714 |
[ |
| 2715 |
'label' => __( 'Color', 'better-payment' ), |
| 2716 |
'type' => Controls_Manager::COLOR, |
| 2717 |
'selectors' => [ |
| 2718 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'color: {{VALUE}}', |
| 2719 |
'.better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount::placeholder' => 'color: {{VALUE}}', |
| 2720 |
'.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input' => 'color: {{VALUE}}', |
| 2721 |
'.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input::placeholder' => 'color: {{VALUE}}', |
| 2722 |
], |
| 2723 |
'condition' => [ |
| 2724 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2725 |
], |
| 2726 |
] |
| 2727 |
); |
| 2728 |
|
| 2729 |
$this->add_group_control( |
| 2730 |
Group_Control_Typography::get_type(), |
| 2731 |
[ |
| 2732 |
'name' => 'better_payment_campaign_form_amount_field_typography', |
| 2733 |
'selector' => ' |
| 2734 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount, |
| 2735 |
.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input |
| 2736 |
', |
| 2737 |
'condition' => [ |
| 2738 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2739 |
], |
| 2740 |
] |
| 2741 |
); |
| 2742 |
|
| 2743 |
$this->add_control( |
| 2744 |
'better_payment_campaign_form_amount_field_background_color', |
| 2745 |
[ |
| 2746 |
'label' => __( 'Background', 'better-payment' ), |
| 2747 |
'type' => Controls_Manager::COLOR, |
| 2748 |
'selectors' => [ |
| 2749 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'background-color: {{VALUE}}', |
| 2750 |
'.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input' => 'background-color: {{VALUE}}', |
| 2751 |
], |
| 2752 |
'condition' => [ |
| 2753 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2754 |
], |
| 2755 |
] |
| 2756 |
); |
| 2757 |
|
| 2758 |
$this->add_responsive_control( |
| 2759 |
'better_payment_campaign_form_amount_field_padding', |
| 2760 |
[ |
| 2761 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 2762 |
'type' => Controls_Manager::DIMENSIONS, |
| 2763 |
'size_units' => [ 'px', 'em', '%' ], |
| 2764 |
'selectors' => [ |
| 2765 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2766 |
'.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2767 |
], |
| 2768 |
'condition' => [ |
| 2769 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ], |
| 2770 |
], |
| 2771 |
] |
| 2772 |
); |
| 2773 |
|
| 2774 |
$this->add_control( |
| 2775 |
'better_payment_campaign_form_amount_field_border_bottom_width', |
| 2776 |
[ |
| 2777 |
'label' => esc_html__('Border Bottom Width', 'better-payment'), |
| 2778 |
'type' => \Elementor\Controls_Manager::SLIDER, |
| 2779 |
'size_units' => ['px'], |
| 2780 |
'range' => [ |
| 2781 |
'px' => [ |
| 2782 |
'min' => 0, |
| 2783 |
'max' => 20, |
| 2784 |
], |
| 2785 |
], |
| 2786 |
'selectors' => [ |
| 2787 |
'{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild' => 'border-bottom-width: {{SIZE}}{{UNIT}};', |
| 2788 |
], |
| 2789 |
'condition' => [ |
| 2790 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 2791 |
], |
| 2792 |
] |
| 2793 |
); |
| 2794 |
|
| 2795 |
$this->add_control( |
| 2796 |
'better_payment_campaign_form_amount_field_border_bottom_style', |
| 2797 |
[ |
| 2798 |
'label' => esc_html__('Border Style', 'better-payment'), |
| 2799 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 2800 |
'default' => 'solid', |
| 2801 |
'options' => [ |
| 2802 |
'' => 'Default', |
| 2803 |
'none' => 'None', |
| 2804 |
'solid' => 'Solid', |
| 2805 |
'dashed' => 'Dashed', |
| 2806 |
'double' => 'Double', |
| 2807 |
'dotted' => 'Dotted', |
| 2808 |
'groove' => 'Groove', |
| 2809 |
], |
| 2810 |
'selectors' => [ |
| 2811 |
'{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild' => 'border-bottom-style: {{VALUE}};', |
| 2812 |
], |
| 2813 |
'condition' => [ |
| 2814 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 2815 |
], |
| 2816 |
] |
| 2817 |
); |
| 2818 |
|
| 2819 |
$this->add_control( |
| 2820 |
'better_payment_campaign_form_amount_field_border_bottom_color', |
| 2821 |
[ |
| 2822 |
'label' => esc_html__('Border Color', 'better-payment'), |
| 2823 |
'type' => \Elementor\Controls_Manager::COLOR, |
| 2824 |
'selectors' => [ |
| 2825 |
'{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild' => 'border-bottom-color: {{VALUE}};', |
| 2826 |
], |
| 2827 |
'condition' => [ |
| 2828 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 2829 |
], |
| 2830 |
] |
| 2831 |
); |
| 2832 |
|
| 2833 |
$this->add_control( |
| 2834 |
'better_payment_campaign_form_currency_color_l3', |
| 2835 |
[ |
| 2836 |
'label' => __( 'Currency Color', 'better-payment' ), |
| 2837 |
'type' => Controls_Manager::COLOR, |
| 2838 |
'selectors' => [ |
| 2839 |
'{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .layout-3-currency' => 'color: {{VALUE}};', |
| 2840 |
], |
| 2841 |
'condition' => [ |
| 2842 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 2843 |
], |
| 2844 |
] |
| 2845 |
); |
| 2846 |
|
| 2847 |
$this->add_group_control( |
| 2848 |
Group_Control_Typography::get_type(), |
| 2849 |
[ |
| 2850 |
'name' => 'better_payment_campaign_form_currency_typography_l3', |
| 2851 |
'selector' => ' |
| 2852 |
{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .layout-3-currency |
| 2853 |
', |
| 2854 |
'condition' => [ |
| 2855 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 2856 |
], |
| 2857 |
] |
| 2858 |
); |
| 2859 |
|
| 2860 |
$this->add_group_control( |
| 2861 |
Group_Control_Border::get_type(), |
| 2862 |
[ |
| 2863 |
'name' => 'better_payment_campaign_form_amount_field_border', |
| 2864 |
'label' => __( 'Border', 'better-payment' ), |
| 2865 |
'placeholder' => '1px', |
| 2866 |
'default' => '1px', |
| 2867 |
'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount', |
| 2868 |
'condition' => [ |
| 2869 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2870 |
], |
| 2871 |
] |
| 2872 |
); |
| 2873 |
|
| 2874 |
$this->add_control( |
| 2875 |
'better_payment_campaign_form_amount_field_border_radius', |
| 2876 |
[ |
| 2877 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 2878 |
'type' => Controls_Manager::DIMENSIONS, |
| 2879 |
'size_units' => [ 'px' ], |
| 2880 |
'selectors' => [ |
| 2881 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2882 |
], |
| 2883 |
'condition' => [ |
| 2884 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 2885 |
], |
| 2886 |
] |
| 2887 |
); |
| 2888 |
|
| 2889 |
$this->add_control( |
| 2890 |
'better_payment_campaign_form_button_heading', |
| 2891 |
[ |
| 2892 |
'label' => __( 'Button', 'better-payment' ), |
| 2893 |
'type' => Controls_Manager::HEADING, |
| 2894 |
'separator' => 'before', |
| 2895 |
] |
| 2896 |
); |
| 2897 |
|
| 2898 |
$this->start_controls_tabs( |
| 2899 |
'better_payment_campaign_form_button_tabs' |
| 2900 |
); |
| 2901 |
|
| 2902 |
$this->start_controls_tab( |
| 2903 |
'better_payment_campaign_form_button_normal_tab', |
| 2904 |
[ |
| 2905 |
'label' => __( 'Normal', 'better-payment' ), |
| 2906 |
] |
| 2907 |
); |
| 2908 |
|
| 2909 |
$this->add_control( |
| 2910 |
'better_payment_campaign_form_button_normal_color', |
| 2911 |
[ |
| 2912 |
'label' => __( 'Color', 'better-payment' ), |
| 2913 |
'type' => Controls_Manager::COLOR, |
| 2914 |
'selectors' => [ |
| 2915 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'color: {{VALUE}}', |
| 2916 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'color: {{VALUE}}', |
| 2917 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'color: {{VALUE}}', |
| 2918 |
], |
| 2919 |
] |
| 2920 |
); |
| 2921 |
|
| 2922 |
$this->add_group_control( |
| 2923 |
Group_Control_Typography::get_type(), |
| 2924 |
[ |
| 2925 |
'name' => 'better_payment_campaign_form_button_typography', |
| 2926 |
'selector' => ' |
| 2927 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn, |
| 2928 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn, |
| 2929 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn |
| 2930 |
', |
| 2931 |
] |
| 2932 |
); |
| 2933 |
|
| 2934 |
$this->add_control( |
| 2935 |
'better_payment_campaign_form_button_icon_color', |
| 2936 |
[ |
| 2937 |
'label' => __( 'Icon Color', 'better-payment' ), |
| 2938 |
'type' => Controls_Manager::COLOR, |
| 2939 |
'selectors' => [ |
| 2940 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn svg path' => 'stroke: {{VALUE}}', |
| 2941 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn svg path' => 'stroke: {{VALUE}}', |
| 2942 |
], |
| 2943 |
'condition' => [ |
| 2944 |
'better_payment_campaign_layout' => [ 'layout-2', 'layout-3', ], |
| 2945 |
], |
| 2946 |
] |
| 2947 |
); |
| 2948 |
|
| 2949 |
$this->add_control( |
| 2950 |
'better_payment_campaign_form_button_normal_background_color', |
| 2951 |
[ |
| 2952 |
'label' => __( 'Background', 'better-payment' ), |
| 2953 |
'type' => Controls_Manager::COLOR, |
| 2954 |
'selectors' => [ |
| 2955 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'background-color: {{VALUE}}', |
| 2956 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'background-color: {{VALUE}}', |
| 2957 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'background-color: {{VALUE}}', |
| 2958 |
], |
| 2959 |
] |
| 2960 |
); |
| 2961 |
|
| 2962 |
$this->add_responsive_control( |
| 2963 |
'better_payment_campaign_form_button_normal_padding', |
| 2964 |
[ |
| 2965 |
'label' => esc_html__( 'Padding', 'better-payment' ), |
| 2966 |
'type' => Controls_Manager::DIMENSIONS, |
| 2967 |
'size_units' => [ 'px', 'em', '%' ], |
| 2968 |
'selectors' => [ |
| 2969 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2970 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2971 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2972 |
], |
| 2973 |
] |
| 2974 |
); |
| 2975 |
|
| 2976 |
$this->add_group_control( |
| 2977 |
Group_Control_Border::get_type(), |
| 2978 |
[ |
| 2979 |
'name' => 'better_payment_campaign_form_button_normal_border', |
| 2980 |
'label' => __( 'Border', 'better-payment' ), |
| 2981 |
'placeholder' => '1px', |
| 2982 |
'default' => '1px', |
| 2983 |
'selector' => ' |
| 2984 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn, |
| 2985 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn, |
| 2986 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn |
| 2987 |
', |
| 2988 |
] |
| 2989 |
); |
| 2990 |
|
| 2991 |
$this->add_control( |
| 2992 |
'better_payment_campaign_form_button_normal_border_radius', |
| 2993 |
[ |
| 2994 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 2995 |
'type' => Controls_Manager::DIMENSIONS, |
| 2996 |
'size_units' => [ 'px' ], |
| 2997 |
'selectors' => [ |
| 2998 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 2999 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3000 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3001 |
], |
| 3002 |
] |
| 3003 |
); |
| 3004 |
|
| 3005 |
$this->end_controls_tab(); |
| 3006 |
|
| 3007 |
$this->start_controls_tab( |
| 3008 |
'better_payment_campaign_form_button_hover_tab', |
| 3009 |
[ |
| 3010 |
'label' => __( 'Hover', 'better-payment' ), |
| 3011 |
] |
| 3012 |
); |
| 3013 |
|
| 3014 |
$this->add_control( |
| 3015 |
'better_payment_campaign_form_button_hover_color', |
| 3016 |
[ |
| 3017 |
'label' => __( 'Color', 'better-payment' ), |
| 3018 |
'type' => Controls_Manager::COLOR, |
| 3019 |
'selectors' => [ |
| 3020 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn:hover' => 'color: {{VALUE}}', |
| 3021 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover' => 'color: {{VALUE}}', |
| 3022 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover' => 'color: {{VALUE}}', |
| 3023 |
], |
| 3024 |
] |
| 3025 |
); |
| 3026 |
|
| 3027 |
$this->add_control( |
| 3028 |
'better_payment_campaign_form_button_hover_icon_color', |
| 3029 |
[ |
| 3030 |
'label' => __( 'Icon Color', 'better-payment' ), |
| 3031 |
'type' => Controls_Manager::COLOR, |
| 3032 |
'selectors' => [ |
| 3033 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover svg path' => 'stroke: {{VALUE}}', |
| 3034 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover svg path' => 'stroke: {{VALUE}}', |
| 3035 |
], |
| 3036 |
'condition' => [ |
| 3037 |
'better_payment_campaign_layout' => [ 'layout-2', 'layout-3', ], |
| 3038 |
], |
| 3039 |
] |
| 3040 |
); |
| 3041 |
|
| 3042 |
$this->add_control( |
| 3043 |
'better_payment_campaign_form_button_hover_background_color', |
| 3044 |
[ |
| 3045 |
'label' => __( 'Background', 'better-payment' ), |
| 3046 |
'type' => Controls_Manager::COLOR, |
| 3047 |
'selectors' => [ |
| 3048 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn:hover' => 'background-color: {{VALUE}}', |
| 3049 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover' => 'background-color: {{VALUE}}', |
| 3050 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover' => 'background-color: {{VALUE}}', |
| 3051 |
], |
| 3052 |
] |
| 3053 |
); |
| 3054 |
|
| 3055 |
$this->add_control( |
| 3056 |
'better_payment_campaign_form_button_hover_border_color', |
| 3057 |
[ |
| 3058 |
'label' => __( 'Border Color', 'better-payment' ), |
| 3059 |
'type' => Controls_Manager::COLOR, |
| 3060 |
'selectors' => [ |
| 3061 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn:hover' => 'border-color: {{VALUE}}', |
| 3062 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover' => 'border-color: {{VALUE}}', |
| 3063 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover' => 'border-color: {{VALUE}}', |
| 3064 |
], |
| 3065 |
] |
| 3066 |
); |
| 3067 |
|
| 3068 |
$this->end_controls_tab(); |
| 3069 |
|
| 3070 |
$this->end_controls_tabs(); |
| 3071 |
|
| 3072 |
$this->end_controls_section(); |
| 3073 |
} |
| 3074 |
|
| 3075 |
public function campaign_overview_style() { |
| 3076 |
$this->start_controls_section( |
| 3077 |
'better_payment_campaign_overview_style', |
| 3078 |
[ |
| 3079 |
'label' => esc_html__( 'Overview', 'better-payment' ), |
| 3080 |
'tab' => Controls_Manager::TAB_STYLE, |
| 3081 |
] |
| 3082 |
); |
| 3083 |
|
| 3084 |
$this->add_control( |
| 3085 |
'better_payment_campaign_overview_title_heading_l_3', |
| 3086 |
[ |
| 3087 |
'label' => esc_html__( 'Title', 'better-payment' ), |
| 3088 |
'type' => Controls_Manager::HEADING, |
| 3089 |
'condition' => [ |
| 3090 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 3091 |
] |
| 3092 |
] |
| 3093 |
); |
| 3094 |
|
| 3095 |
$this->add_control( |
| 3096 |
'better_payment_campaign_overview_title_color_l3', |
| 3097 |
[ |
| 3098 |
'label' => __( 'Color', 'better-payment' ), |
| 3099 |
'type' => Controls_Manager::COLOR, |
| 3100 |
'selectors' => [ |
| 3101 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_xxl' => 'color: {{VALUE}}', |
| 3102 |
], |
| 3103 |
'condition' => [ |
| 3104 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 3105 |
] |
| 3106 |
] |
| 3107 |
); |
| 3108 |
|
| 3109 |
$this->add_group_control( |
| 3110 |
Group_Control_Typography::get_type(), |
| 3111 |
[ |
| 3112 |
'name' => 'better_payment_campaign_overview_title_typography_l3', |
| 3113 |
'selector' => ' |
| 3114 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_xxl |
| 3115 |
', |
| 3116 |
'condition' => [ |
| 3117 |
'better_payment_campaign_layout' => [ 'layout-3', ], |
| 3118 |
] |
| 3119 |
] |
| 3120 |
); |
| 3121 |
|
| 3122 |
$this->add_control( |
| 3123 |
'better_payment_campaign_overview_short_desc_heading', |
| 3124 |
[ |
| 3125 |
'label' => esc_html__( 'Short Description', 'better-payment' ), |
| 3126 |
'type' => Controls_Manager::HEADING, |
| 3127 |
] |
| 3128 |
); |
| 3129 |
|
| 3130 |
$this->add_control( |
| 3131 |
'better_payment_campaign_overview_short_desc_color', |
| 3132 |
[ |
| 3133 |
'label' => __( 'Color', 'better-payment' ), |
| 3134 |
'type' => Controls_Manager::COLOR, |
| 3135 |
'selectors' => [ |
| 3136 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-body .bp-text_secondary' => 'color: {{VALUE}}', |
| 3137 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-tab_content .bp-overviow_text-wrapper .bp-overview_text' => 'color: {{VALUE}}', |
| 3138 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_secondary' => 'color: {{VALUE}}', |
| 3139 |
], |
| 3140 |
] |
| 3141 |
); |
| 3142 |
|
| 3143 |
$this->add_group_control( |
| 3144 |
Group_Control_Typography::get_type(), |
| 3145 |
[ |
| 3146 |
'name' => 'better_payment_campaign_overview_short_desc_typography', |
| 3147 |
'selector' => ' |
| 3148 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-body .bp-text_secondary, |
| 3149 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-tab_content .bp-overviow_text-wrapper .bp-overview_text, |
| 3150 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_secondary |
| 3151 |
', |
| 3152 |
] |
| 3153 |
); |
| 3154 |
|
| 3155 |
$this->add_control( |
| 3156 |
'better_payment_campaign_overview_our_mission_heading', |
| 3157 |
[ |
| 3158 |
'label' => esc_html__( 'Our Mission', 'better-payment' ), |
| 3159 |
'type' => Controls_Manager::HEADING, |
| 3160 |
'separator' => 'before', |
| 3161 |
'condition' => [ |
| 3162 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 3163 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3164 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 3165 |
] |
| 3166 |
] |
| 3167 |
); |
| 3168 |
|
| 3169 |
$this->start_controls_tabs( |
| 3170 |
'better_payment_campaign_overview_our_mission_tabs', |
| 3171 |
[ |
| 3172 |
'condition' => [ |
| 3173 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 3174 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3175 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 3176 |
] |
| 3177 |
] |
| 3178 |
); |
| 3179 |
|
| 3180 |
$this->start_controls_tab( |
| 3181 |
'better_payment_campaign_overview_our_mission_tab', |
| 3182 |
[ |
| 3183 |
'label' => __( 'Title', 'better-payment' ), |
| 3184 |
] |
| 3185 |
); |
| 3186 |
|
| 3187 |
$this->add_control( |
| 3188 |
'better_payment_campaign_overview_our_mission_title_color', |
| 3189 |
[ |
| 3190 |
'label' => __( 'Color', 'better-payment' ), |
| 3191 |
'type' => Controls_Manager::COLOR, |
| 3192 |
'selectors' => [ |
| 3193 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-text_l' => 'color: {{VALUE}}', |
| 3194 |
], |
| 3195 |
'condition' => [ |
| 3196 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 3197 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3198 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 3199 |
] |
| 3200 |
] |
| 3201 |
); |
| 3202 |
|
| 3203 |
$this->add_group_control( |
| 3204 |
Group_Control_Typography::get_type(), |
| 3205 |
[ |
| 3206 |
'name' => 'better_payment_campaign_overview_our_mission_title_typography', |
| 3207 |
'selector' => ' |
| 3208 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-text_l |
| 3209 |
', |
| 3210 |
'condition' => [ |
| 3211 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 3212 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3213 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 3214 |
] |
| 3215 |
] |
| 3216 |
); |
| 3217 |
|
| 3218 |
$this->end_controls_tab(); |
| 3219 |
|
| 3220 |
$this->start_controls_tab( |
| 3221 |
'better_payment_campaign_overview_our_mission_items_tab', |
| 3222 |
[ |
| 3223 |
'label' => __( 'List', 'better-payment' ), |
| 3224 |
] |
| 3225 |
); |
| 3226 |
|
| 3227 |
$this->add_control( |
| 3228 |
'better_payment_campaign_overview_our_mission_items_color', |
| 3229 |
[ |
| 3230 |
'label' => __( 'Color', 'better-payment' ), |
| 3231 |
'type' => Controls_Manager::COLOR, |
| 3232 |
'selectors' => [ |
| 3233 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_text-wrapper .bp-overview_list .bp-overview_list-item p' => 'color: {{VALUE}}', |
| 3234 |
], |
| 3235 |
'condition' => [ |
| 3236 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 3237 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3238 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 3239 |
] |
| 3240 |
] |
| 3241 |
); |
| 3242 |
|
| 3243 |
$this->add_group_control( |
| 3244 |
Group_Control_Typography::get_type(), |
| 3245 |
[ |
| 3246 |
'name' => 'better_payment_campaign_overview_our_mission_items_typography', |
| 3247 |
'selector' => ' |
| 3248 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_text-wrapper .bp-overview_list .bp-overview_list-item p |
| 3249 |
', |
| 3250 |
'condition' => [ |
| 3251 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 3252 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3253 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 3254 |
] |
| 3255 |
] |
| 3256 |
); |
| 3257 |
|
| 3258 |
$this->add_control( |
| 3259 |
'better_payment_campaign_overview_our_mission_items_bullet_color', |
| 3260 |
[ |
| 3261 |
'label' => __( 'Bullet Color', 'better-payment' ), |
| 3262 |
'type' => Controls_Manager::COLOR, |
| 3263 |
'selectors' => [ |
| 3264 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_text-wrapper .bp-overview_list .bp-overview_list-item span svg path' => 'fill: {{VALUE}}', |
| 3265 |
], |
| 3266 |
'condition' => [ |
| 3267 |
'better_payment_campaign_general_overview_mossion_enable' => 'yes', |
| 3268 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3269 |
'better_payment_campaign_general_overview_enable' => 'yes', |
| 3270 |
] |
| 3271 |
] |
| 3272 |
); |
| 3273 |
|
| 3274 |
$this->end_controls_tab(); |
| 3275 |
$this->end_controls_tabs(); |
| 3276 |
|
| 3277 |
$this->end_controls_section(); |
| 3278 |
} |
| 3279 |
|
| 3280 |
public function campaign_tab_navigation_style() { |
| 3281 |
$this->start_controls_section( |
| 3282 |
'better_payment_campaign_tab_navigation_style', |
| 3283 |
[ |
| 3284 |
'label' => esc_html__( 'Tabs', 'better-payment' ), |
| 3285 |
'tab' => Controls_Manager::TAB_STYLE, |
| 3286 |
'condition' => [ |
| 3287 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 3288 |
], |
| 3289 |
] |
| 3290 |
); |
| 3291 |
|
| 3292 |
$this->add_control( |
| 3293 |
'better_payment_campaign_overview_title_color', |
| 3294 |
[ |
| 3295 |
'label' => __( 'Color', 'better-payment' ), |
| 3296 |
'type' => Controls_Manager::COLOR, |
| 3297 |
'selectors' => [ |
| 3298 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button' => 'color: {{VALUE}}', |
| 3299 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button' => 'color: {{VALUE}}', |
| 3300 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-text_xxl' => 'color: {{VALUE}}', |
| 3301 |
], |
| 3302 |
] |
| 3303 |
); |
| 3304 |
|
| 3305 |
$this->add_group_control( |
| 3306 |
Group_Control_Typography::get_type(), |
| 3307 |
[ |
| 3308 |
'name' => 'better_payment_campaign_overview_title_typography', |
| 3309 |
'selector' => ' |
| 3310 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button, |
| 3311 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button, |
| 3312 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-text_xxl |
| 3313 |
', |
| 3314 |
] |
| 3315 |
); |
| 3316 |
|
| 3317 |
$this->add_control( |
| 3318 |
'better_payment_campaign_overview_active_tab_background_color', |
| 3319 |
[ |
| 3320 |
'label' => __( 'Active Tab Color', 'better-payment' ), |
| 3321 |
'type' => Controls_Manager::COLOR, |
| 3322 |
'selectors' => [ |
| 3323 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button::after' => 'background-color: {{VALUE}}', |
| 3324 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button::after' => 'background-color: {{VALUE}}', |
| 3325 |
], |
| 3326 |
'condition' => [ |
| 3327 |
'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ], |
| 3328 |
], |
| 3329 |
] |
| 3330 |
); |
| 3331 |
|
| 3332 |
$this->end_controls_section(); |
| 3333 |
} |
| 3334 |
|
| 3335 |
public function campaign_team_style() { |
| 3336 |
|
| 3337 |
$this->start_controls_section( |
| 3338 |
'better_payment_campaign_team_style', |
| 3339 |
[ |
| 3340 |
'label' => __( '⮑ Our Team', 'better-payment' ), |
| 3341 |
'tab' => Controls_Manager::TAB_STYLE, |
| 3342 |
'condition' => [ |
| 3343 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3344 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3345 |
], |
| 3346 |
] |
| 3347 |
); |
| 3348 |
|
| 3349 |
$this->add_control( |
| 3350 |
'better_payment_campaign_team_title_heading', |
| 3351 |
[ |
| 3352 |
'label' => esc_html__( 'Title', 'better-payment' ), |
| 3353 |
'type' => Controls_Manager::HEADING, |
| 3354 |
'condition' => [ |
| 3355 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3356 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3357 |
] |
| 3358 |
] |
| 3359 |
); |
| 3360 |
|
| 3361 |
$this->add_control( |
| 3362 |
'better_payment_campaign_team_title_color', |
| 3363 |
[ |
| 3364 |
'label' => __( 'Color', 'better-payment' ), |
| 3365 |
'type' => Controls_Manager::COLOR, |
| 3366 |
'selectors' => [ |
| 3367 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-footer.bp-overview_team-wrapper .bp-text_xxl' => 'color: {{VALUE}}', |
| 3368 |
], |
| 3369 |
'condition' => [ |
| 3370 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3371 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3372 |
] |
| 3373 |
] |
| 3374 |
); |
| 3375 |
|
| 3376 |
$this->add_group_control( |
| 3377 |
Group_Control_Typography::get_type(), |
| 3378 |
[ |
| 3379 |
'name' => 'better_payment_campaign_team_title_typography', |
| 3380 |
'selector' => ' |
| 3381 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-footer.bp-overview_team-wrapper .bp-text_xxl |
| 3382 |
', |
| 3383 |
'condition' => [ |
| 3384 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3385 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3386 |
] |
| 3387 |
] |
| 3388 |
); |
| 3389 |
|
| 3390 |
$this->add_control( |
| 3391 |
'better_payment_campaign_team_name_heading', |
| 3392 |
[ |
| 3393 |
'label' => esc_html__( 'Name', 'better-payment' ), |
| 3394 |
'type' => Controls_Manager::HEADING, |
| 3395 |
'condition' => [ |
| 3396 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3397 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3398 |
], |
| 3399 |
'separator' => 'before', |
| 3400 |
] |
| 3401 |
); |
| 3402 |
|
| 3403 |
$this->add_control( |
| 3404 |
'better_payment_campaign_team_member_name_color', |
| 3405 |
[ |
| 3406 |
'label' => __( 'Color', 'better-payment' ), |
| 3407 |
'type' => Controls_Manager::COLOR, |
| 3408 |
'selectors' => [ |
| 3409 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-name' => 'color: {{VALUE}}', |
| 3410 |
], |
| 3411 |
'condition' => [ |
| 3412 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3413 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3414 |
] |
| 3415 |
] |
| 3416 |
); |
| 3417 |
|
| 3418 |
$this->add_group_control( |
| 3419 |
Group_Control_Typography::get_type(), |
| 3420 |
[ |
| 3421 |
'name' => 'better_payment_campaign_team_member_name_typography', |
| 3422 |
'selector' => ' |
| 3423 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-name |
| 3424 |
', |
| 3425 |
'condition' => [ |
| 3426 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3427 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3428 |
] |
| 3429 |
] |
| 3430 |
); |
| 3431 |
|
| 3432 |
$this->add_control( |
| 3433 |
'better_payment_campaign_team_designation_heading', |
| 3434 |
[ |
| 3435 |
'label' => esc_html__( 'Designation', 'better-payment' ), |
| 3436 |
'type' => Controls_Manager::HEADING, |
| 3437 |
'condition' => [ |
| 3438 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3439 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3440 |
], |
| 3441 |
'separator' => 'before', |
| 3442 |
] |
| 3443 |
); |
| 3444 |
|
| 3445 |
$this->add_control( |
| 3446 |
'better_payment_campaign_team_member_designation_color', |
| 3447 |
[ |
| 3448 |
'label' => __( 'Color', 'better-payment' ), |
| 3449 |
'type' => Controls_Manager::COLOR, |
| 3450 |
'selectors' => [ |
| 3451 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-designation' => 'color: {{VALUE}}', |
| 3452 |
], |
| 3453 |
'condition' => [ |
| 3454 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3455 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3456 |
] |
| 3457 |
] |
| 3458 |
); |
| 3459 |
|
| 3460 |
$this->add_group_control( |
| 3461 |
Group_Control_Typography::get_type(), |
| 3462 |
[ |
| 3463 |
'name' => 'better_payment_campaign_team_member_designation_typography', |
| 3464 |
'selector' => ' |
| 3465 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-designation |
| 3466 |
', |
| 3467 |
'condition' => [ |
| 3468 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3469 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3470 |
] |
| 3471 |
] |
| 3472 |
); |
| 3473 |
|
| 3474 |
$this->add_control( |
| 3475 |
'better_payment_campaign_team_social_links_heading', |
| 3476 |
[ |
| 3477 |
'label' => esc_html__( 'Social Links', 'better-payment' ), |
| 3478 |
'type' => Controls_Manager::HEADING, |
| 3479 |
'condition' => [ |
| 3480 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3481 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3482 |
], |
| 3483 |
'separator' => 'before', |
| 3484 |
] |
| 3485 |
); |
| 3486 |
|
| 3487 |
$this->start_controls_tabs( |
| 3488 |
'better_payment_campaign_team_social_links_tabs', |
| 3489 |
[ |
| 3490 |
'condition' => [ |
| 3491 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3492 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3493 |
] |
| 3494 |
] |
| 3495 |
); |
| 3496 |
|
| 3497 |
$this->start_controls_tab( |
| 3498 |
'better_payment_campaign_team_social_links_normal_tab', |
| 3499 |
[ |
| 3500 |
'label' => esc_html__( 'Normal', 'better-payment' ), |
| 3501 |
] |
| 3502 |
); |
| 3503 |
|
| 3504 |
$this->add_control( |
| 3505 |
'better_payment_campaign_team_social_links_color', |
| 3506 |
[ |
| 3507 |
'label' => __( 'Color', 'better-payment' ), |
| 3508 |
'type' => Controls_Manager::COLOR, |
| 3509 |
'selectors' => [ |
| 3510 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane .bp-team-social_links-wrapper a svg' => 'fill: {{VALUE}}', |
| 3511 |
], |
| 3512 |
'condition' => [ |
| 3513 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3514 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3515 |
] |
| 3516 |
] |
| 3517 |
); |
| 3518 |
|
| 3519 |
// size |
| 3520 |
$this->add_responsive_control( |
| 3521 |
'better_payment_campaign_team_social_links_size', |
| 3522 |
[ |
| 3523 |
'label' => esc_html__( 'Size', 'better-payment' ), |
| 3524 |
'type' => Controls_Manager::SLIDER, |
| 3525 |
'range' => [ |
| 3526 |
'px' => [ |
| 3527 |
'min' => 0, |
| 3528 |
'max' => 100, |
| 3529 |
'step' => 1, |
| 3530 |
], |
| 3531 |
], |
| 3532 |
'size_units' => [ 'px', 'em', '%' ], |
| 3533 |
'selectors' => [ |
| 3534 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane .bp-team-social_links-wrapper a svg' => 'height: {{SIZE}}{{UNIT}};', |
| 3535 |
], |
| 3536 |
'condition' => [ |
| 3537 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3538 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3539 |
] |
| 3540 |
] |
| 3541 |
); |
| 3542 |
|
| 3543 |
$this->end_controls_tab(); |
| 3544 |
|
| 3545 |
$this->start_controls_tab( |
| 3546 |
'better_payment_campaign_team_social_links_hover_tab', |
| 3547 |
[ |
| 3548 |
'label' => esc_html__( 'Hover', 'better-payment' ), |
| 3549 |
] |
| 3550 |
); |
| 3551 |
|
| 3552 |
$this->add_control( |
| 3553 |
'better_payment_campaign_team_social_links_hover_color', |
| 3554 |
[ |
| 3555 |
'label' => __( 'Color', 'better-payment' ), |
| 3556 |
'type' => Controls_Manager::COLOR, |
| 3557 |
'selectors' => [ |
| 3558 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane .bp-team-social_links-wrapper a svg:hover' => 'fill: {{VALUE}}', |
| 3559 |
], |
| 3560 |
'condition' => [ |
| 3561 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3562 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3563 |
] |
| 3564 |
] |
| 3565 |
); |
| 3566 |
|
| 3567 |
$this->end_controls_tab(); |
| 3568 |
|
| 3569 |
$this->end_controls_tabs(); |
| 3570 |
|
| 3571 |
$this->add_control( |
| 3572 |
'better_payment_campaign_team_image_heading', |
| 3573 |
[ |
| 3574 |
'label' => esc_html__( 'Image', 'better-payment' ), |
| 3575 |
'type' => Controls_Manager::HEADING, |
| 3576 |
'condition' => [ |
| 3577 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3578 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3579 |
], |
| 3580 |
'separator' => 'before', |
| 3581 |
] |
| 3582 |
); |
| 3583 |
|
| 3584 |
$this->add_responsive_control( |
| 3585 |
'better_payment_campaign_team_member_image_size', |
| 3586 |
[ |
| 3587 |
'label' => esc_html__( 'Size', 'better-payment' ), |
| 3588 |
'type' => Controls_Manager::SLIDER, |
| 3589 |
'range' => [ |
| 3590 |
'px' => [ |
| 3591 |
'min' => 0, |
| 3592 |
'max' => 1200, |
| 3593 |
'step' => 1, |
| 3594 |
], |
| 3595 |
], |
| 3596 |
'size_units' => [ 'px', 'em', '%' ], |
| 3597 |
'selectors' => [ |
| 3598 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .img-box img' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', |
| 3599 |
], |
| 3600 |
'condition' => [ |
| 3601 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3602 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3603 |
] |
| 3604 |
] |
| 3605 |
); |
| 3606 |
|
| 3607 |
$this->add_group_control( |
| 3608 |
Group_Control_Border::get_type(), |
| 3609 |
[ |
| 3610 |
'name' => 'better_payment_campaign_team_member_image_border', |
| 3611 |
'selector' => ' |
| 3612 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .img-box img |
| 3613 |
', |
| 3614 |
'condition' => [ |
| 3615 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3616 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3617 |
] |
| 3618 |
] |
| 3619 |
); |
| 3620 |
|
| 3621 |
$this->add_control( |
| 3622 |
'better_payment_campaign_team_member_image_border_radius', |
| 3623 |
[ |
| 3624 |
'label' => esc_html__( 'Border Radius', 'better-payment' ), |
| 3625 |
'type' => Controls_Manager::DIMENSIONS, |
| 3626 |
'size_units' => [ 'px' ], |
| 3627 |
'selectors' => [ |
| 3628 |
'{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .img-box img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 3629 |
], |
| 3630 |
'condition' => [ |
| 3631 |
'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes', |
| 3632 |
'better_payment_campaign_layout' => [ 'layout-1' ], |
| 3633 |
] |
| 3634 |
] |
| 3635 |
); |
| 3636 |
|
| 3637 |
$this->end_controls_section(); |
| 3638 |
} |
| 3639 |
|
| 3640 |
public function related_campaign_style() { |
| 3641 |
$this->start_controls_section( |
| 3642 |
'better_payment_related_campaign_style', |
| 3643 |
[ |
| 3644 |
'label' => __( 'Related Campaigns', 'better-payment' ), |
| 3645 |
'tab' => Controls_Manager::TAB_STYLE, |
| 3646 |
'condition' => [ |
| 3647 |
'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes', |
| 3648 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 3649 |
], |
| 3650 |
] |
| 3651 |
); |
| 3652 |
|
| 3653 |
$this->add_group_control( |
| 3654 |
Group_Control_Background::get_type(), |
| 3655 |
[ |
| 3656 |
'name' => 'better_payment_related_campaign_background_color', |
| 3657 |
'types' => [ 'classic', 'gradient' ], |
| 3658 |
'selector' => ' |
| 3659 |
{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donate_section .bp-donate_section-wrapper |
| 3660 |
', |
| 3661 |
'condition' => [ |
| 3662 |
'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes', |
| 3663 |
'better_payment_campaign_layout' => [ 'layout-2' ], |
| 3664 |
], |
| 3665 |
] |
| 3666 |
); |
| 3667 |
|
| 3668 |
$this->end_controls_section(); |
| 3669 |
} |
| 3670 |
|
| 3671 |
/** |
| 3672 |
* Render the widget output on the frontend. |
| 3673 |
* |
| 3674 |
* @since 1.0.0 |
| 3675 |
*/ |
| 3676 |
protected function render() { |
| 3677 |
$is_edit_mode = Plugin::instance()->editor->is_edit_mode(); |
| 3678 |
|
| 3679 |
if ( $is_edit_mode && ( ! current_user_can('manage_options') ) ) { |
| 3680 |
return; |
| 3681 |
} |
| 3682 |
|
| 3683 |
$settings = $this->get_settings_for_display(); |
| 3684 |
|
| 3685 |
$payment_field = "number"; |
| 3686 |
$bp_widget_page_id = get_the_ID(); |
| 3687 |
$bp_widget_id = $this->get_id(); |
| 3688 |
$campaign_id_prefix = sanitize_text_field( 'bp_campaign_' . $bp_widget_page_id . '_' ); |
| 3689 |
$campaign_id_postfix = sanitize_text_field( $settings[ 'better_payment_campaign_id' ] ); |
| 3690 |
$better_payment_campaign_id = $campaign_id_prefix . $campaign_id_postfix; |
| 3691 |
$bp_goal_amount = sanitize_text_field($settings[ 'better_payment_campaign_form_goal_amount' ]); |
| 3692 |
$bp_currency = sanitize_text_field($settings[ 'better_payment_campaign_currency' ]); |
| 3693 |
|
| 3694 |
global $wpdb; |
| 3695 |
$table = "{$wpdb->prefix}better_payment"; |
| 3696 |
$bpc_raised_amount_data = $wpdb->get_results( |
| 3697 |
$wpdb->prepare( "SELECT * FROM $table WHERE campaign_id=%s", sanitize_text_field( $better_payment_campaign_id ) ) |
| 3698 |
); |
| 3699 |
|
| 3700 |
$bpc_total_amount_raised = 0; |
| 3701 |
$bpc_total_payment_count = 0; |
| 3702 |
|
| 3703 |
if ( ! empty( $bpc_raised_amount_data ) ) { |
| 3704 |
foreach ( $bpc_raised_amount_data as $payment_record ) { |
| 3705 |
if ( ! empty( $payment_record->status ) && 'paid' === $payment_record->status ) { |
| 3706 |
$bpc_total_amount_raised += floatval( $payment_record->amount ); |
| 3707 |
$bpc_total_payment_count++; |
| 3708 |
} |
| 3709 |
} |
| 3710 |
} |
| 3711 |
|
| 3712 |
$bpc_goal_percentage = 0; |
| 3713 |
if ( ! empty( $bp_goal_amount ) && $bp_goal_amount > 0 && $bpc_total_amount_raised > 0 ) { |
| 3714 |
$bpc_goal_percentage = floor( ( $bpc_total_amount_raised / floatval( $bp_goal_amount ) ) * 100 ); |
| 3715 |
} |
| 3716 |
|
| 3717 |
wp_enqueue_script( 'fundraising-campaign-script' ); |
| 3718 |
|
| 3719 |
$action = esc_url( admin_url( 'admin-post.php' ) ); |
| 3720 |
|
| 3721 |
$setting_meta = wp_json_encode( [ |
| 3722 |
'page_id' => $bp_widget_page_id, |
| 3723 |
'widget_id' => esc_attr( $bp_widget_id ), |
| 3724 |
'campaign_id' => esc_attr( $better_payment_campaign_id ), |
| 3725 |
'goal_amount' => esc_attr( $bp_goal_amount ), |
| 3726 |
'currency' => esc_attr( $bp_currency ), |
| 3727 |
'campaign_id_prefix' => esc_attr( $campaign_id_prefix ), |
| 3728 |
'campaign_id_postfix' => esc_attr( $campaign_id_postfix ), |
| 3729 |
'raised_amount' => esc_attr( $bpc_total_amount_raised ), |
| 3730 |
] ); |
| 3731 |
|
| 3732 |
$better_payment_campaigns = get_option( 'better_payment_campaigns', [] ); |
| 3733 |
$better_payment_campaigns[ esc_attr( $bp_widget_id ) ] = $setting_meta; |
| 3734 |
update_option( 'better_payment_campaigns', $better_payment_campaigns ); |
| 3735 |
|
| 3736 |
|
| 3737 |
$better_payment_placeholder_class = ''; |
| 3738 |
if ( !empty($settings[ 'better_payment_placeholder_switch' ]) && $settings[ 'better_payment_placeholder_switch' ] != 'yes' ) { |
| 3739 |
$better_payment_placeholder_class = 'better-payment-hide-placeholder'; |
| 3740 |
} |
| 3741 |
|
| 3742 |
$data = [ |
| 3743 |
'payment_field' => $payment_field, |
| 3744 |
'action' => $action, |
| 3745 |
'setting_meta' => $setting_meta, |
| 3746 |
'better_payment_placeholder_class' => $better_payment_placeholder_class, |
| 3747 |
'better_payment_campaign_id' => $better_payment_campaign_id, |
| 3748 |
'campaign_id_prefix' => $campaign_id_prefix, |
| 3749 |
'bpc_total_amount_raised' => $bpc_total_amount_raised, |
| 3750 |
'bpc_total_payment_count' => $bpc_total_payment_count, |
| 3751 |
'bpc_goal_percentage' => $bpc_goal_percentage, |
| 3752 |
]; |
| 3753 |
|
| 3754 |
$widgetObj = $this; |
| 3755 |
|
| 3756 |
$better_payment_campaign_layout = sanitize_text_field($settings[ 'better_payment_campaign_layout' ]); |
| 3757 |
$better_payment_campaign_layout = in_array($better_payment_campaign_layout, array_keys( $this->better_payment_campaign_layouts() ) ) ? $better_payment_campaign_layout : 'layout-1'; |
| 3758 |
|
| 3759 |
$template_file = BETTER_PAYMENT_ADMIN_VIEWS_PATH . '/elementor/fundraising-campaign/' . $better_payment_campaign_layout . '.php'; |
| 3760 |
|
| 3761 |
$better_payment_campaign_content = ''; |
| 3762 |
|
| 3763 |
if ( file_exists($template_file) ) { |
| 3764 |
ob_start(); |
| 3765 |
include $template_file; |
| 3766 |
$better_payment_campaign_content = ob_get_contents(); |
| 3767 |
ob_end_clean(); |
| 3768 |
} |
| 3769 |
|
| 3770 |
$better_payment_campaign_content = apply_filters( 'better_payment/elementor/editor/get_layout_content', $better_payment_campaign_content, $settings, $this, $data ); |
| 3771 |
|
| 3772 |
echo $better_payment_campaign_content; |
| 3773 |
} |
| 3774 |
|
| 3775 |
public function render_campaign_hidden_fields( $settings ) { |
| 3776 |
$better_payment_campaign_id = 'bp_campaign_' . get_the_ID() . '_' . sanitize_text_field($settings[ 'better_payment_campaign_id' ]); |
| 3777 |
$better_payment_campaign_currency = sanitize_text_field($settings[ 'better_payment_campaign_currency' ]); |
| 3778 |
|
| 3779 |
$hidden_fields = '<input type="hidden" class="better_payment_campaign_id" name="better_payment_campaign_id" value="' . esc_attr( $better_payment_campaign_id ) . '"> |
| 3780 |
<input type="hidden" class="better_payment_campaign_currency" name="better_payment_campaign_currency" value="' . esc_attr( $better_payment_campaign_currency ) . '">'; |
| 3781 |
|
| 3782 |
return $hidden_fields; |
| 3783 |
} |
| 3784 |
|
| 3785 |
public function better_payment_campaign_layouts() { |
| 3786 |
$layouts = apply_filters('better_payment/elementor/widget/campaign_layouts', [ |
| 3787 |
'layout-1' => 'Layout 1', |
| 3788 |
'layout-2' => 'Layout 2', |
| 3789 |
'layout-3' => 'Layout 3' |
| 3790 |
]); |
| 3791 |
|
| 3792 |
return $layouts; |
| 3793 |
} |
| 3794 |
} |
| 3795 |
|