PluginProbe
WP Coder – Insert & Manage Code Snippets / 3.5
WP Coder – Insert & Manage Code Snippets v3.5
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
← All changes | classes/Dashboard/SupportForm.php +7 -7 3.0.53.5 View file →
@@ -3,16 +3,16 @@
3 3 namespace WPCoder\Dashboard;
4 4
5 5 defined( 'ABSPATH' ) || exit;
6 6
7 -use WPCoder\WOW_Plugin;
7 +use WPCoder\WPCoder;
8 8
9 9 class SupportForm {
10 10
11 11 public static function init(): void {
12 12
13 - $plugin = WOW_Plugin::NAME . ' v.' . WOW_Plugin::VERSION;
14 - $license = get_option( 'wow_license_key_' . WOW_Plugin::PREFIX, 'no' );
13 + $plugin = WPCoder::info('name') . ' v.' . WPCoder::info('version');
14 + $license = get_option( 'wow_license_key_' . WPCoder::PREFIX, 'no' );
15 15
16 16 self::send();
17 17
18 18 ?>
@@ -75,9 +75,9 @@
75 75 <div class="wowp-field">
76 76 <?php submit_button( __( 'Send to Support', 'wpcoder' ), 'primary', 'submit', false ); ?>
77 77 </div>
78 78
79 - <?php wp_nonce_field( WOW_Plugin::PREFIX . '_nonce_action', WOW_Plugin::PREFIX . '_nonce_name' ); ?>
79 + <?php wp_nonce_field( WPCoder::PREFIX . '_nonce_action', WPCoder::PREFIX . '_nonce_name' ); ?>
80 80 </fieldset>
81 81 </form>
82 82
83 83 <?php
@@ -125,9 +125,9 @@
125 125 ' . nl2br( wp_kses_post( $support['message'] ) ) . '
126 126 </body>
127 127 </html>';
128 128 $type = sanitize_text_field( $support['type'] );
129 - $to_mail = WOW_Plugin::EMAIl;
129 + $to_mail = WPCoder::info('email');
130 130 $send = wp_mail( $to_mail, 'Support Ticket: ' . $type, $message_mail, $headers );
131 131
132 132 if ( $send ) {
133 133 $text = __( 'Your message has been sent to the support team.', 'wpcoder' );
@@ -156,10 +156,10 @@
156 156 }
157 157
158 158 private static function verify(): bool {
159 159 $support = $_POST['support'] ?? [];
160 - $nonce_name = WOW_Plugin::PREFIX . '_nonce_name';
161 - $nonce_action = WOW_Plugin::PREFIX . '_nonce_action';
160 + $nonce_name = WPCoder::PREFIX . '_nonce_name';
161 + $nonce_action = WPCoder::PREFIX . '_nonce_action';
162 162
163 163 return ! empty( $support ) && wp_verify_nonce( $_POST[ $nonce_name ], $nonce_action );
164 164 }
165 165 }