PluginProbe
MainWP Key Maker / 1.1
MainWP Key Maker v1.1
trunk 0.1 0.2 1.0 1.1 1.2 1.3
mainwp-key-maker / mainwp-key-maker.php

mainwp-key-maker.php in MainWP Key Maker 1.1, at mainwp-key-maker.php

656 lines 20.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: MainWP Key Maker
4 Plugin URI: https://mainwp.com/
5 Description: Easily convert a form into a "key" to use with the MainWP Bulk Settings Manager Extension
6 Author: MainWP
7 Author URI: https://mainwp.com
8 Version: 1.1
9 */
10
11 // If we made redirection in this session
12 $mainwp_key_maker_is_redirect = false;
13 // Store current user session id
14 $mainwp_key_maker_session_id = "";
15
16
17 if ( ! function_exists( "mainwp_key_maker_get_session_id" ) ) {
18 /**
19 * Get current user session id
20 */
21 function mainwp_key_maker_get_session_id() {
22 global $mainwp_key_maker_session_id;
23
24 // We use global so this happen only once
25 if (empty($mainwp_key_maker_session_id)) {
26 if ( defined( "AUTH_COOKIE" ) && isset( $_COOKIE[ AUTH_COOKIE ] )) {
27 // Different users can share one account - so use session id
28 $cookie_elements = explode( '|', $_COOKIE[ AUTH_COOKIE ] );
29 if ( isset( $cookie_elements[2] ) ) {
30 $mainwp_key_maker_session_id = substr( (string) $cookie_elements[2], 0, 30 );
31 }
32 } else if ( defined( "SECURE_AUTH_COOKIE" ) && isset( $_COOKIE[ SECURE_AUTH_COOKIE ] )) {
33 // Different users can share one account - so use session id
34 $cookie_elements = explode( '|', $_COOKIE[ SECURE_AUTH_COOKIE ] );
35 if ( isset( $cookie_elements[2] ) ) {
36 $mainwp_key_maker_session_id = substr( (string) $cookie_elements[2], 0, 30 );
37 }
38 }
39 }
40 }
41 }
42
43
44 if ( ! function_exists( "mainwp_key_maker_store_request" ) ) {
45 /**
46 * Store $_GET/$_POST inside transient for further use
47 */
48 function mainwp_key_maker_store_request($temp_saving = false) {
49 global $mainwp_key_maker_session_id, $mainwp_key_maker_is_redirect;
50
51 mainwp_key_maker_get_session_id();
52
53 // Only for logged
54 if ( ! empty( $mainwp_key_maker_session_id ) ) {
55 // Skip heartbleeed WordPress action
56 if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'heartbeat' && isset( $_REQUEST['screen_id'] ) ) {
57 return;
58 }
59
60 $saved_datas = get_transient( 'mainwp_eir_' . $mainwp_key_maker_session_id );
61
62
63 if ( $saved_datas === false ) {
64 $saved_datas = array();
65 }
66
67 $previous_datas = array();
68
69 if (!$temp_saving) {
70 foreach ( $saved_datas as $data_counter => $data ) {
71 if (isset($data['_temp_saving'])) {
72 continue; // avoid
73 }
74 $previous_datas[] = $data;
75 }
76 } else {
77 $previous_datas = $saved_datas;
78 }
79
80 $datas = array();
81
82 // Store values in transient so we have access to them in next page
83 $datas['post'] = $_POST;
84 $datas['get'] = $_GET;
85 $datas['url'] = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
86 $datas['time'] = time();
87
88 if ($temp_saving) {
89 $datas['_temp_saving'] = true;
90 }
91
92 $previous_datas[] = $datas;
93
94 set_transient( 'mainwp_eir_' . $mainwp_key_maker_session_id, $previous_datas, 90 );
95 $mainwp_key_maker_is_redirect = true;
96 }
97 }
98 }
99
100 // We add additional functionality to wp_redirect and wp_verify_nonce for administrators
101 if ( ! function_exists( 'wp_redirect' ) ) :
102
103 /**
104 * Redirects to another page.
105 * Additionally, stores $_GET, $_POST and url in transient
106 *
107 * @since 1.5.1
108 *
109 * @global bool $is_IIS
110 *
111 * @param string $location The path to redirect to.
112 * @param int $status Status code to use.
113 *
114 * @return bool False if $location is not provided, true otherwise.
115 */
116 function wp_redirect( $location, $status = 302 ) {
117 global $is_IIS;
118
119 /**
120 * Filter the redirect location.
121 *
122 * @since 2.1.0
123 *
124 * @param string $location The path to redirect to.
125 * @param int $status Status code to use.
126 */
127 $location = apply_filters( 'wp_redirect', $location, $status );
128
129 /**
130 * Filter the redirect status code.
131 *
132 * @since 2.3.0
133 *
134 * @param int $status Status code to use.
135 * @param string $location The path to redirect to.
136 */
137 $status = apply_filters( 'wp_redirect_status', $status, $location );
138
139 if ( ! $location ) {
140 return false;
141 }
142
143 $location = wp_sanitize_redirect( $location );
144
145 if ( ! $is_IIS && PHP_SAPI != 'cgi-fcgi' ) {
146 status_header( $status );
147 } // This causes problems on IIS and some FastCGI setups
148
149 mainwp_key_maker_store_request();
150
151 header( "Location: $location", true, $status );
152
153 return true;
154 }
155 endif;
156
157 if ( ! function_exists( 'wp_verify_nonce' ) ) :
158 /**
159 * Verify that correct nonce was used with time limit.
160 * Additionally stores name of nonce action in transient
161 *
162 * The user is given an amount of time to use the token, so therefore, since the
163 * UID and $action remain the same, the independent variable is the time.
164 *
165 * @since 2.0.3
166 *
167 * @param string $nonce Nonce that was used in the form to verify
168 * @param string|int $action Should give context to what is taking place and be the same when nonce was created.
169 *
170 * @return false|int False if the nonce is invalid, 1 if the nonce is valid and generated between
171 * 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
172 */
173 function wp_verify_nonce( $nonce, $action = - 1 ) {
174 global $mainwp_key_maker_session_id;
175
176 if ( ! empty( $mainwp_key_maker_session_id ) ) {
177 $key_maker = get_transient( 'mainwp_ein_' . $mainwp_key_maker_session_id );
178 if ( $key_maker === false ) {
179 $key_maker = array();
180 }
181
182 $key_maker[ trim( $nonce ) ] = $action;
183 set_transient( 'mainwp_ein_' . $mainwp_key_maker_session_id, $key_maker );
184 }
185
186 $nonce = (string) $nonce;
187 $user = wp_get_current_user();
188 $uid = (int) $user->ID;
189 if ( ! $uid ) {
190 /**
191 * Filter whether the user who generated the nonce is logged out.
192 *
193 * @since 3.5.0
194 *
195 * @param int $uid ID of the nonce-owning user.
196 * @param string $action The nonce action.
197 */
198 $uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
199 }
200
201 if ( empty( $nonce ) ) {
202 return false;
203 }
204
205 $token = wp_get_session_token();
206 $i = wp_nonce_tick();
207
208 // Nonce generated 0-12 hours ago
209 $expected = substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), - 12, 10 );
210 if ( hash_equals( $expected, $nonce ) ) {
211 return 1;
212 }
213
214 // Nonce generated 12-24 hours ago
215 $expected = substr( wp_hash( ( $i - 1 ) . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), - 12, 10 );
216 if ( hash_equals( $expected, $nonce ) ) {
217 return 2;
218 }
219
220 // Invalid nonce
221 return false;
222 }
223 endif;
224
225 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
226 // We want to support ajax calls also
227 mainwp_key_maker_store_request();
228 }
229
230 class MainWP_Key_Maker {
231
232 public function __construct() {
233 add_action( 'init', array( $this, 'init' ) );
234 }
235
236 public function init() {
237 mainwp_key_maker_get_session_id();
238
239 if ( ! current_user_can( 'manage_options' ) || ! is_admin() ) {
240 return;
241 }
242
243 global $mainwp_key_maker_is_redirect;
244
245 // Display redirect data on next page
246 if ( $mainwp_key_maker_is_redirect ) {
247 return;
248 }
249
250 // Skip Ajax
251 if ( defined( 'XMLRPC_REQUEST' ) || defined( 'DOING_AJAX' ) || defined( 'IFRAME_REQUEST' ) ) {
252 return;
253 }
254
255 // Don't process if fatal error
256 $error = error_get_last();
257 if ( ! empty( $error ) && ( $error['type'] & ( E_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR ) ) ) {
258 return;
259 }
260
261 // temporary saving to fix if none wp-redirect
262 mainwp_key_maker_store_request($temp = true);
263
264 add_action( 'wp_before_admin_bar_render', array( $this, 'bar_render' ), 999 );
265 add_action( 'admin_footer', array( $this, 'toolbar' ), 999 );
266 }
267
268 /**
269 * Render Key Maker button inside admin bar
270 * Display content using thickbox popup
271 */
272 public function bar_render() {
273 global $wp_admin_bar;
274
275 wp_register_script( 'mainwp-key-maker-colorbox', plugins_url( '/js/jquery.colorbox-min.js', __FILE__ ), array( 'jquery' ) );
276 wp_enqueue_script( 'mainwp-key-maker-colorbox' );
277
278 wp_register_script( 'mainwp-key-maker-zeroclipboard', plugins_url( '/js/ZeroClipboard.min.js', __FILE__ ), array( 'jquery' ) );
279 wp_enqueue_script( 'mainwp-key-maker-zeroclipboard' );
280
281 wp_register_style( 'mainwp-key-maker-colorbox', plugins_url( '/css/colorbox.css', __FILE__ ) );
282 wp_enqueue_style( 'mainwp-key-maker-colorbox' );
283
284 $args = array(
285 'id' => 'mainwp-key-maker-adminbar-node',
286 'title' => __( 'MainWP Key Maker', 'mainwp-key-maker' ),
287 'href' => '#mainwp-key-maker-box'
288 );
289
290 $wp_admin_bar->add_node( $args );
291 ?>
292 <style>
293 #wp-admin-bar-mainwp-key-maker {
294 cursor: pointer;
295 }
296 .mainwp-km-info {
297 margin-top: 1em;
298 padding: .6em;
299 border-left: 4px Solid #7fb100;
300 box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
301 -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
302 }
303 </style>
304 <script>
305 jQuery(function () {
306 ZeroClipboard.config( { swfPath: "<?php echo plugins_url( '/js/ZeroClipboard.swf', __FILE__ ); ?>" } );
307
308 var client = new ZeroClipboard(jQuery(".mainwp-key-maker-textarea"));
309
310 client.on('ready', function (event) {
311 client.on("copy", function (event) {
312 event.clipboardData.setData("text/plain", event.target.innerHTML);
313 });
314
315 client.on('aftercopy', function (event) {
316 jQuery("#" + event.target.id + "-button").val('<?php _e('Copied to Clipboard!', 'mainwp-key-maker'); ?>');
317 jQuery("#" + event.target.id + "-button").removeClass('button-primary');
318 setInterval(function () {
319 jQuery("#" + event.target.id + "-button").val('<?php _e('Copy to Clipboard', 'mainwp-key-maker'); ?>');
320 jQuery("#" + event.target.id + "-button").addClass('button-primary');
321 }, 3000);
322 });
323 });
324
325 var client2 = new ZeroClipboard(jQuery(".mainwp-key-maker-copy-button"));
326
327 client2.on('ready', function (event) {
328 client2.on('aftercopy', function (event) {
329 event.target.value = '<?php _e('Copied to Clipboard!', 'mainwp-key-maker'); ?>';
330 event.target.classList.remove('button-primary');
331 setInterval(function () {
332 event.target.value = '<?php _e('Copy to Clipboard', 'mainwp-key-maker'); ?>';
333 event.target.classList.add('button-primary');
334 }, 3000);
335 });
336 });
337
338 jQuery("#wp-admin-bar-mainwp-key-maker-adminbar-node a").colorbox({inline: true, width: "1230px"});
339
340 jQuery(".mainwp-key-maker-debug-a").on("click", function () {
341 jQuery("#mainwp-key-maker-debug-" + jQuery(this).attr("ids")).toggle();
342 });
343 });
344 </script>
345
346 <?php
347 }
348
349 /**
350 * Display content for admin bar button
351 */
352 public function toolbar() {
353 global $mainwp_key_maker_session_id;
354
355 // Do we have anything to display?
356 $is_any_info = false;
357 $is_there_pre_request = false;
358 ?>
359 <div style="display:none;">
360 <div id="mainwp-key-maker-box">
361 <span style="float: right;">
362 <a href="https://mainwp.com" target="_blank" title="MainWP"><img style="height: 40px; margin-right: 15px;" src="<?php echo plugins_url('images/logo.png', __FILE__); ?>" alt="MainWP" /></a>
363 </span>
364 <h1><?php _e( 'MainWP Key Maker', 'mainwp-key-maker'); ?></h1>
365 <div style="clear: both;"></div>
366 <?php
367
368 $nonce = get_transient( 'mainwp_ein_' . $mainwp_key_maker_session_id );
369
370 if ( $nonce === false ) {
371 $nonce = array();
372 }
373
374 $previous_datas = get_transient( 'mainwp_eir_' . $mainwp_key_maker_session_id );
375
376 if ( $previous_datas !== false ) {
377 delete_transient( 'mainwp_ein_' . $mainwp_key_maker_session_id );
378 delete_transient( 'mainwp_eir_' . $mainwp_key_maker_session_id );
379 foreach ( $previous_datas as $previous_counter => $previous_data ):
380 if ( ( isset( $previous_data['post'] ) && ! empty( $previous_data['post'] ) ) || ( isset( $previous_data['get'] ) && ! empty( $previous_data['get'] ) ) ):
381
382 if (isset($previous_data['_temp_saving'])) {
383 unset($previous_data['_temp_saving']);
384 }
385
386 $is_any_info = true;
387 $is_there_pre_request = true;
388 ?>
389 <div style="padding-bottom: 1em; margin-bottom: 1px Solid #000;">
390 <?php
391 if ( $is_there_pre_request ):
392 ?>
393 <div class="mainwp-km-info">
394 <em><?php _e('The "Verify Form Fields and Values" button allows you to tell if the Key will contain the information you want.', 'mainwp-key-maker'); ?></em><br/>
395 <em><?php _e('If it does not, you may need to submit the form in order for the Key Maker to be able to correctly gather the form fields and values.', 'mainwp-key-maker'); ?></em>
396 </div>
397 <?php
398 endif;
399 ?>
400 <p>
401 <h2 style="margin-bottom: .3em;"><?php _e( 'Post-submission Request', 'mainwp-key-maker' ); ?></h2>
402 <em>( <?php echo date_i18n( "d-m-Y H:i:s", $previous_data['time'] ); ?> )</em>
403 <?php echo( isset( $previous_data['url'] ) ? esc_html( $previous_data['url'] ) : __( 'Unknown url', 'mainwp-key-maker' ) ); ?>
404 <span style="float: right; margin-right: 1.5em;">
405 <a href="#"
406 class="mainwp-key-maker-debug-a button"
407 style="text-decoration: none;"
408 ids="<?php echo esc_attr( $previous_counter ); ?>"><?php _e( 'Verify Form Fields and Values', 'mainwp-key-maker' ); ?>
409 </a>
410 <input type="submit"
411 id="mainwp-key-maker-textarea-previous-<?php echo esc_attr( $previous_counter ); ?>-button"
412 data-clipboard-target="mainwp-key-maker-textarea-previous-<?php echo esc_attr( $previous_counter ); ?>"
413 class="mainwp-key-maker-copy-button button button-primary"
414 value="<?php _e( 'Copy to Clipboard', 'mainwp-key-maker' ); ?>">
415 </span>
416 </p>
417 <div id="mainwp-key-maker-debug-<?php echo esc_attr( $previous_counter ); ?>"
418 style="display:none; width: 1170px !important; margin-bottom: 1em;"
419 class="postbox">
420 <div class="inside">
421 <pre><?php echo $this->custom_print_r( $previous_data, $nonce ); ?></pre>
422 </div>
423 </div>
424
425 <textarea rows="12"
426 cols="90"
427 style="width: 1170px;"
428 class="mainwp-key-maker-textarea"
429 id="mainwp-key-maker-textarea-previous-<?php echo esc_attr( $previous_counter ); ?>"
430 readonly><?php echo esc_textarea( $this->parse_data( $previous_data, $nonce ) ); ?></textarea>
431 </div>
432 <?php
433 endif;
434 endforeach;
435
436
437 }
438
439 $current_data = array();
440 $current_data['post'] = $_POST;
441 $current_data['get'] = $_GET;
442 $current_data['url'] = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
443 $current_data['time'] = time();
444 ?>
445 <div style="padding-bottom: 1em; margin-bottom: 1px Solid #000;">
446 <?php
447 if (!empty($current_data['post']) || !empty($current_data['get'])):
448 $is_any_info = true;
449 ?>
450 <?php
451 if ( ! $is_there_pre_request ):
452 ?>
453 <div class="mainwp-km-info">
454 <em><?php _e('The "Verify Form Fields and Values" button allows you to tell if the Key will contain the information you want.', 'mainwp-key-maker'); ?></em><br/>
455 <em><?php _e('If it does not, you may need to submit the form in order for the Key Maker to be able to correctly gather the form fields and values.', 'mainwp-key-maker'); ?></em>
456 </div>
457 <?php
458 endif;
459 ?>
460 <p>
461 <h2 style="margin-bottom: .3em;"><?php _e('Pre-submission Request', 'mainwp-key-maker'); ?></h2>
462 <em>( <?php echo date_i18n("d-m-Y H:i:s", $current_data['time']); ?> )</em>
463 <?php echo esc_html($current_data['url']); ?>
464 <span style="float: right; margin-right: 1.5em;">
465 <a
466 href="#"
467 class="mainwp-key-maker-debug-a button"
468 ids="current"
469 style="text-decoration: none;"><?php _e('Verify Form Fields and Values', 'mainwp-key-maker'); ?>
470 </a>
471 <input type="submit"
472 id="mainwp-key-maker-textarea-button"
473 data-clipboard-target="mainwp-key-maker-textarea"
474 class="mainwp-key-maker-copy-button button button-primary"
475 value="<?php _e('Copy to clipboard', 'mainwp-key-maker'); ?>">
476 </span>
477 </p>
478
479 <div id="mainwp-key-maker-debug-current"
480 style="display:none; width: 1170px !important; margin-bottom: 1em;"
481 class="postbox">
482 <div class="inside">
483 <pre><?php echo $this->custom_print_r($current_data, $nonce); ?></pre>
484 </div>
485 </div>
486
487
488 <textarea rows="12"
489 cols="90"
490 style="width: 1170px;"
491 class="mainwp-key-maker-textarea"
492 id="mainwp-key-maker-textarea"
493 readonly><?php echo esc_textarea($this->parse_data($current_data, $nonce)); ?></textarea>
494 <?php
495 endif;
496
497 if ( ! $is_any_info ):
498 ?>
499 <div class="mainwp-km-info"><?php _e( 'No form detected. You may have to submit the form before Key Maker is able to find the form and make the Key.', 'mainwp-key-maker' ); ?></div>
500 <?php
501 endif;
502 ?>
503 </div>
504 </div>
505 </div>
506 <?php
507 }
508
509 /**
510 * @param $data
511 * @param $nonce
512 *
513 * Print $_GET and $_POST using print_r with XSS protection
514 *
515 * @return string
516 */
517 public function custom_print_r( $data, $nonce ) {
518 return esc_html( print_r( $this->check_nonces( $data, $nonce ), true ) );
519 }
520
521 /**
522 * @param $data
523 * @param $nonce
524 *
525 * Recursive check if in array, nonce field exist
526 *
527 * @return array
528 */
529 public function check_nonces( $data, $nonce ) {
530 $new = array();
531 foreach ( $data as $key => $val ) {
532 if ( is_array( $val ) ) {
533 $new[ $key ] = $this->check_nonces( $val, $nonce );
534 } else {
535 $val = trim( $val );
536 if ( isset( $nonce[ $val ] ) ) {
537 $new[ $key ] = __( 'NONCE FIELD', 'mainwp-key-maker' ) . ' - ' . $nonce[ $val ];
538 } else {
539 $new[ $key ] = $val;
540 }
541 }
542 }
543
544 return $new;
545 }
546
547 /**
548 * @param $data
549 * @param $nonce
550 *
551 * Parse datas in format readable for Skeleton Key
552 *
553 * @return string
554 */
555 public function parse_data( $data, $nonce ) {
556 $out = array();
557 if ( isset( $data['post'] ) ) {
558 foreach ( $this->flatten_array( $data['post'] ) as $key => $val ) {
559 $array = array();
560 $val = trim( $val );
561
562 if ( isset( $nonce[ $val ] ) ) {
563 $array['field_type'] = 'nonce_field';
564 $array['nonce_field_name'] = $nonce[ $val ];
565 $array['nonce_field_arg'] = $key;
566 } else {
567 if ( strpos( $val, "\n" ) !== false || strpos( $val, "\r" ) !== false ) {
568 $array['field_type'] = 'textarea_field';
569 $array['textarea_field_description'] = $val;
570 $array['textarea_field_name'] = $key;
571 $array['textarea_field_value'] = $val;
572 $array['textarea_field_type'] = 'post';
573 } else {
574 $array['field_type'] = 'text_field';
575 $array['text_field_description'] = $val;
576 $array['text_field_name'] = $key;
577 $array['text_field_value'] = $val;
578 $array['text_field_type'] = 'post';
579 }
580 }
581
582 $out[] = http_build_query( $array );
583 }
584 }
585
586 if ( isset( $data['get'] ) ) {
587 foreach ( $this->flatten_array( $data['get'] ) as $key => $val ) {
588 $array = array();
589 $val = trim( $val );
590
591 if ( isset( $nonce[ $val ] ) ) {
592 $array['field_type'] = 'nonce_field';
593 $array['nonce_field_name'] = $nonce[ $val ];
594 $array['nonce_field_arg'] = $key;
595 } else {
596 $array['field_type'] = 'text_field';
597 $array['text_field_description'] = $val;
598 $array['text_field_name'] = $key;
599 $array['text_field_value'] = $val;
600 $array['text_field_type'] = 'get';
601 }
602
603 $out[] = http_build_query( $array );
604 }
605 }
606
607 $url = "";
608 if ( isset( $data['url'] ) ) {
609 $url = parse_url( $data['url'] );
610 $url = ( isset( $url['path'] ) ? $url['path'] : '' ) . ( isset( $url['query'] ) ? '?' . $url['query'] : '' );
611 }
612
613 $array = array();
614 $array['field_type'] = 'settings_field';
615 $array['settings_field_name'] = __( 'Imported', 'mainwp-key-maker' ) . ' ' . current_time( "d-m-Y H:i:s" );
616 $array['settings_field_url'] = $url;
617
618 $content = http_build_query( $array ) . '&' . implode( '&', $out );
619 $hash = sha1( $content );
620
621 $return = "-----BEGIN BULK SETTINGS MANAGER KEY-----\r\n";
622 $return .= base64_encode( $hash . '|' . $content );
623 $return .= "\r\n-----END BULK SETTINGS MANAGER KEY-----\r\n";
624
625 return $return;
626 }
627
628 /**
629 * @param $array
630 * @param string $previous
631 *
632 * Convert multidimensional array into single dimensional array
633 * Something like http[like][array][structure]
634 *
635 * @return array
636 */
637 public function flatten_array( $array, $previous = "" ) {
638 $out = array();
639 foreach ( $array as $key => $val ) {
640 if ( is_array( $val ) ) {
641 $out = array_merge( $this->flatten_array( $val, ( $previous == "" ? $key : $previous . '[' . $key . ']' ) ), $out );
642 } else {
643 if ( $previous == "" ) {
644 $out[ $key ] = $val;
645 } else {
646 $out[ $previous . '[' . $key . ']' ] = $val;
647 }
648 }
649 }
650
651 return $out;
652 }
653 }
654
655 $mainWP = new MainWP_Key_Maker();
656