| @@ -246,10 +246,8 @@ | ||
| 246 | 246 | $default_config = [ |
| 247 | 247 | 'value_path' => 'rich_text', |
| 248 | 248 | 'title' => __( 'Content', 'yaymail' ), |
| 249 | 249 | 'default_value' => '', |
| 250 | - 'text_color_path' => 'text_color', | |
| 251 | - 'background_color_path' => 'background_color', | |
| 252 | 250 | ]; |
| 253 | 251 | |
| 254 | 252 | $result = self::get_component_data( $attributes, $config, $default_config ); |
| 255 | 253 | $result['component'] = 'RichTextEditor'; |
| @@ -346,12 +344,8 @@ | ||
| 346 | 344 | |
| 347 | 345 | $email = yaymail_get_email( $email_id ); |
| 348 | 346 | // Optimize this to call get_email only once |
| 349 | 347 | |
| 350 | - if ( empty( $email ) ) { | |
| 351 | - return $elements; | |
| 352 | - } | |
| 353 | - | |
| 354 | 348 | $available_elements = []; |
| 355 | 349 | |
| 356 | 350 | foreach ( $elements as $element ) { |
| 357 | 351 | $element_instance = ElementsLoader::get_instance()->get_element_instance_by_type( $element['type'] ); |
| @@ -401,40 +395,8 @@ | ||
| 401 | 395 | ]; |
| 402 | 396 | |
| 403 | 397 | $result = self::get_component_data( $attributes, $config, $default_config ); |
| 404 | 398 | $result['component'] = 'BorderRadius'; |
| 405 | - | |
| 406 | - return $result; | |
| 407 | - } | |
| 408 | - | |
| 409 | - public static function get_button_width_selector( $attributes, $config = [] ) { | |
| 410 | - $default_config = [ | |
| 411 | - 'value_path' => 'width', | |
| 412 | - 'title' => __( 'Width', 'yaymail' ), | |
| 413 | - 'default_value' => 'auto', | |
| 414 | - 'type' => 'style', | |
| 415 | - ]; | |
| 416 | - | |
| 417 | - $result = self::get_component_data( $attributes, $config, $default_config ); | |
| 418 | - $result['component'] = 'ButtonWidthSelector'; | |
| 419 | - | |
| 420 | - return $result; | |
| 421 | - } | |
| 422 | - | |
| 423 | - public static function get_text_format_toggles( $attributes, $config = [] ) { | |
| 424 | - $default_config = [ | |
| 425 | - 'value_path' => 'text_format_toggles', | |
| 426 | - 'title' => __( 'Text format toggles', 'yaymail' ), | |
| 427 | - 'default_value' => [ | |
| 428 | - 'bold' => false, | |
| 429 | - 'italic' => true, | |
| 430 | - 'underline' => false, | |
| 431 | - ], | |
| 432 | - 'type' => 'style', | |
| 433 | - ]; | |
| 434 | - | |
| 435 | - $result = self::get_component_data( $attributes, $config, $default_config ); | |
| 436 | - $result['component'] = 'TextFormatToggles'; | |
| 437 | 399 | |
| 438 | 400 | return $result; |
| 439 | 401 | } |
| 440 | 402 | } |