| @@ -459,43 +459,5 @@ | ||
| 459 | 459 | $b = min( 255, $b + ( ( 255 - $b ) * $percent / 100 ) ); |
| 460 | 460 | |
| 461 | 461 | return sprintf( '#%02x%02x%02x', $r, $g, $b ); |
| 462 | 462 | } |
| 463 | - | |
| 464 | - /** | |
| 465 | - * Get the checked/unchecked SVG icon for a radio or checkbox option. | |
| 466 | - * | |
| 467 | - * Shared by every field that renders the option-pill markup (the donation | |
| 468 | - * amount choices and the payment-type chooser), so the two cannot drift apart. | |
| 469 | - * | |
| 470 | - * @param string $type Icon type (circle-checked, circle-unchecked, square-checked, square-unchecked). | |
| 471 | - * @param string $classes CSS class. | |
| 472 | - * @return string SVG markup. | |
| 473 | - * @since 1.5.1 | |
| 474 | - */ | |
| 475 | - protected function get_svg_icon( $type, $classes = '' ) { | |
| 476 | - $class_attr = $classes ? ' class="' . esc_attr( $classes ) . '"' : ''; | |
| 477 | - | |
| 478 | - switch ( $type ) { | |
| 479 | - case 'circle-checked': | |
| 480 | - return '<svg' . $class_attr . ' width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> | |
| 481 | - <path d="M15.1663 7.38674V8.00007C15.1655 9.43769 14.7 10.8365 13.8392 11.988C12.9785 13.1394 11.7685 13.9817 10.3899 14.3893C9.0113 14.797 7.53785 14.748 6.18932 14.2498C4.8408 13.7516 3.68944 12.8308 2.90698 11.6248C2.12452 10.4188 1.75287 8.99211 1.84746 7.55761C1.94205 6.12312 2.49781 4.75762 3.43186 3.66479C4.36591 2.57195 5.6282 1.81033 7.03047 1.4935C8.43274 1.17668 9.89985 1.32163 11.213 1.90674" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/> | |
| 482 | - <path d="M15.1667 2.6665L8.5 9.33984L6.5 7.33984" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/> | |
| 483 | - </svg>'; | |
| 484 | - case 'circle-unchecked': | |
| 485 | - return '<svg' . $class_attr . ' width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> | |
| 486 | - <path d="M7.99967 14.6668C11.6816 14.6668 14.6663 11.6821 14.6663 8.00016C14.6663 4.31826 11.6816 1.3335 7.99967 1.3335C4.31778 1.3335 1.33301 4.31826 1.33301 8.00016C1.33301 11.6821 4.31778 14.6668 7.99967 14.6668Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/> | |
| 487 | - </svg>'; | |
| 488 | - case 'square-checked': | |
| 489 | - return '<svg' . $class_attr . ' width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> | |
| 490 | - <path d="M6.5 7.33366L8.5 9.33366L15.1667 2.66699" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/> | |
| 491 | - <path d="M14.5 8V12.6667C14.5 13.0203 14.3595 13.3594 14.1095 13.6095C13.8594 13.8595 13.5203 14 13.1667 14H3.83333C3.47971 14 3.14057 13.8595 2.89052 13.6095C2.64048 13.3594 2.5 13.0203 2.5 12.6667V3.33333C2.5 2.97971 2.64048 2.64057 2.89052 2.39052C3.14057 2.14048 3.47971 2 3.83333 2H11.1667" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/> | |
| 492 | - </svg>'; | |
| 493 | - case 'square-unchecked': | |
| 494 | - return '<svg' . $class_attr . ' width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> | |
| 495 | - <path d="M12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/> | |
| 496 | - </svg>'; | |
| 497 | - default: | |
| 498 | - return ''; | |
| 499 | - } | |
| 500 | - } | |
| 501 | 463 | } |