| @@ -1,20 +1,23 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Email Preview |
| 4 | 4 | * |
| 5 | - * @author Studio 164a | |
| 5 | + * @author WP Charitable LLC | |
| 6 | 6 | * @package Charitable/Templates/Emails |
| 7 | 7 | * @version 1.0.0 |
| 8 | + * @version 1.8.8.6 | |
| 8 | 9 | */ |
| 9 | 10 | |
| 10 | 11 | // Exit if accessed directly. |
| 11 | -if ( ! defined( 'ABSPATH' ) ) { exit; } | |
| 12 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 13 | + exit; | |
| 14 | +} | |
| 12 | 15 | |
| 13 | -if ( ! isset( $_GET[ 'email_id' ] ) ) { | |
| 14 | - return; | |
| 16 | +if ( ! isset( $_GET['email_id'] ) ) { // phpcs:ignore | |
| 17 | + return; | |
| 15 | 18 | } |
| 16 | 19 | |
| 17 | -$email = charitable_get_helper( 'emails' )->get_email( $_GET[ 'email_id' ] ); | |
| 18 | -$email_object = new $email; | |
| 20 | +$charitable_email = charitable_get_helper( 'emails' )->get_email( esc_html( $_GET['email_id'] ) ); // phpcs:ignore | |
| 21 | +$charitable_email_object = new $charitable_email(); | |
| 19 | 22 | |
| 20 | -echo $email_object->preview(); | |
| 23 | +echo $charitable_email_object->preview(); // phpcs:ignore | |