Plugin Directory

Changeset 2777870

Timestamp:
08/30/2022 05:31:32 PM (2 years ago)
Author:
MyThemeShop
Message:

v1.0.12

Location:
launcher
Files:
102 added
4 edited

Legend:

Unmodified
Added
Removed
  • launcher/trunk/includes/campaignmonitor/class/services_json.php

    r1187692 r2777870  
    153153        }
    154154
    155         $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
     155        $bytes = (ord($utf16);
    156156
    157157        switch(true) {
     
    206206                // return a UTF-16 character from a 2-byte UTF-8 char
    207207                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
    208                 return chr(0x07 & (ord($utf8{0}) >> 2))
    209                      . chr((0xC0 & (ord($utf8{0}) << 6))
    210                          | (0x3F & ord($utf8{1})));
     208                return chr(0x07 & (ord($utf8) >> 2))
     209                     . chr((0xC0 & (ord($utf8) << 6))
     210                         | (0x3F & ord($utf8)));
    211211
    212212            case 3:
    213213                // return a UTF-16 character from a 3-byte UTF-8 char
    214214                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
    215                 return chr((0xF0 & (ord($utf8{0}) << 4))
    216                          | (0x0F & (ord($utf8{1}) >> 2)))
    217                      . chr((0xC0 & (ord($utf8{1}) << 6))
    218                          | (0x7F & ord($utf8{2})));
     215                return chr((0xF0 & (ord($utf8) << 4))
     216                         | (0x0F & (ord($utf8) >> 2)))
     217                     . chr((0xC0 & (ord($utf8) << 6))
     218                         | (0x7F & ord($utf8)));
    219219        }
    220220
     
    261261                for ($c = 0; $c < $strlen_var; ++$c) {
    262262
    263                     $ord_var_c = ord($var{$c});
     263                    $ord_var_c = ord($var);
    264264
    265265                    switch (true) {
     
    284284                        case $ord_var_c == 0x5C:
    285285                            // double quote, slash, slosh
    286                             $ascii .= '\\'.$var{$c};
     286                            $ascii .= '\\'.$var;
    287287                            break;
    288288
    289289                        case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
    290290                            // characters U-00000000 - U-0000007F (same as ASCII)
    291                             $ascii .= $var{$c};
     291                            $ascii .= $var;
    292292                            break;
    293293
     
    295295                            // characters U-00000080 - U-000007FF, mask 110XXXXX
    296296                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
    297                             $char = pack('C*', $ord_var_c, ord($var{$c + 1}));
     297                            $char = pack('C*', $ord_var_c, ord($var));
    298298                            $c += 1;
    299299                            $utf16 = $this->utf82utf16($char);
     
    305305                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
    306306                            $char = pack('C*', $ord_var_c,
    307                                          ord($var{$c + 1}),
    308                                          ord($var{$c + 2}));
     307                                         ord($var),
     308                                         ord($var));
    309309                            $c += 2;
    310310                            $utf16 = $this->utf82utf16($char);
     
    316316                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
    317317                            $char = pack('C*', $ord_var_c,
    318                                          ord($var{$c + 1}),
    319                                          ord($var{$c + 2}),
    320                                          ord($var{$c + 3}));
     318                                         ord($var),
     319                                         ord($var),
     320                                         ord($var));
    321321                            $c += 3;
    322322                            $utf16 = $this->utf82utf16($char);
     
    328328                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
    329329                            $char = pack('C*', $ord_var_c,
    330                                          ord($var{$c + 1}),
    331                                          ord($var{$c + 2}),
    332                                          ord($var{$c + 3}),
    333                                          ord($var{$c + 4}));
     330                                         ord($var),
     331                                         ord($var),
     332                                         ord($var),
     333                                         ord($var));
    334334                            $c += 4;
    335335                            $utf16 = $this->utf82utf16($char);
     
    341341                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
    342342                            $char = pack('C*', $ord_var_c,
    343                                          ord($var{$c + 1}),
    344                                          ord($var{$c + 2}),
    345                                          ord($var{$c + 3}),
    346                                          ord($var{$c + 4}),
    347                                          ord($var{$c + 5}));
     343                                         ord($var),
     344                                         ord($var),
     345                                         ord($var),
     346                                         ord($var),
     347                                         ord($var));
    348348                            $c += 5;
    349349                            $utf16 = $this->utf82utf16($char);
     
    520520
    521521                        $substr_chrs_c_2 = substr($chrs, $c, 2);
    522                         $ord_chrs_c = ord($chrs{$c});
     522                        $ord_chrs_c = ord($chrs);
    523523
    524524                        switch (true) {
     
    550550                                if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
    551551                                   ($delim == "'" && $substr_chrs_c_2 != '\\"')) {
    552                                     $utf8 .= $chrs{++$c};
     552                                    $utf8 .= $chrs;
    553553                                }
    554554                                break;
     
    563563
    564564                            case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
    565                                 $utf8 .= $chrs{$c};
     565                                $utf8 .= $chrs;
    566566                                break;
    567567
     
    610610                    // array, or object notation
    611611
    612                     if ($str{0} == '[') {
     612                    if ($str == '[') {
    613613                        $stk = array(SERVICES_JSON_IN_ARR);
    614614                        $arr = array();
     
    649649                        $substr_chrs_c_2 = substr($chrs, $c, 2);
    650650
    651                         if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
     651                        if (($c == $strlen_chrs) || (($chrs == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
    652652                            // found a comma that is not inside a string, array, etc.,
    653653                            // OR we've reached the end of the character list
     
    691691                            }
    692692
    693                         } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
     693                        } elseif ((($chrs == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
    694694                            // found a quote, and we are not inside a string
    695                             array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
     695                            array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs));
    696696                            //print("Found start of string at {$c}\n");
    697697
    698                         } elseif (($chrs{$c} == $top['delim']) &&
     698                        } elseif (($chrs == $top['delim']) &&
    699699                                 ($top['what'] == SERVICES_JSON_IN_STR) &&
    700700                                 ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
     
    705705                            //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
    706706
    707                         } elseif (($chrs{$c} == '[') &&
     707                        } elseif (($chrs == '[') &&
    708708                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
    709709                            // found a left-bracket, and we are in an array, object, or slice
     
    711711                            //print("Found start of array at {$c}\n");
    712712
    713                         } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
     713                        } elseif (($chrs == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
    714714                            // found a right-bracket, and we're in an array
    715715                            array_pop($stk);
    716716                            //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
    717717
    718                         } elseif (($chrs{$c} == '{') &&
     718                        } elseif (($chrs == '{') &&
    719719                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
    720720                            // found a left-brace, and we are in an array, object, or slice
     
    722722                            //print("Found start of object at {$c}\n");
    723723
    724                         } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
     724                        } elseif (($chrs == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
    725725                            // found a right-brace, and we're in an object
    726726                            array_pop($stk);
  • launcher/trunk/includes/getresponse/jsonRPCClient.php

    r1187692 r2777870  
    273273        $startTime = empty($startTime) ? array_sum(explode(' ', microtime())) : $startTime;
    274274        if (true === $pShow and !empty($debug))
    275         {
     275        {
    276276            // get endtime
    277277            $endTime = array_sum(explode(' ', microtime()));
  • launcher/trunk/launcher.php

    r2028849 r2777870  
    55Description: Launching a new product, service or website? Launcher is the perfect plugin for you, with a stunning, customizable design, advanced timer & powerful features for running your campaign.
    66Author: MyThemeShop
    7 Version: 1.0.11
     7Version: 1.0.1
    88Author URI: http://mythemeshop.com/
    99*/
     
    478478                            ?>
    479479                        </table>
    480                         <input type="hidden" name="wplauncher_options[countdown][date]" id="wplauncher_options-countdown-date" value="<?php echo $this->settings['countdown']['date']; ?>">
     480                        <input type="hidden" name="wplauncher_options[countdown][date]" id="wplauncher_options-countdown-date" value="<?php echo ; ?>">
    481481                    </div>
    482482
     
    507507                                    <td>
    508508                                        <a href="https://auth.aweber.com/1.0/oauth/authorize_app/a3f7ff6f" target="_blank" class="button wplauncher-aweber-connect"><?php isset($this->settings['subscribe']['aweber']['access_key']) && $this->settings['subscribe']['aweber']['access_key'] == '' ? _e( 'Get Authorization Code', 'launcher' ) : _e( 'Reconnect Account', 'launcher' ); ?></a>
    509                                         <input type="hidden" id="wplauncher_options-subscribe-aweber-consumer_key" name="wplauncher_options[subscribe][aweber][consumer_key]" value="<?php echo (isset($this->settings['subscribe']['aweber']['consumer_key']) ? $this->settings['subscribe']['aweber']['consumer_key'] :''); ?>" />
    510                                         <input type="hidden" id="wplauncher_options-subscribe-aweber-consumer_secret" name="wplauncher_options[subscribe][aweber][consumer_secret]" value="<?php echo (isset($this->settings['subscribe']['aweber']['consumer_secret']) ? $this->settings['subscribe']['aweber']['consumer_secret'] :''); ?>" />
    511                                         <input type="hidden" id="wplauncher_options-subscribe-aweber-access_key" name="wplauncher_options[subscribe][aweber][access_key]" value="<?php echo (isset($this->settings['subscribe']['aweber']['access_key']) ? $this->settings['subscribe']['aweber']['access_key'] :''); ?>" />
    512                                         <input type="hidden" id="wplauncher_options-subscribe-aweber-access_secret" name="wplauncher_options[subscribe][aweber][access_secret]" value="<?php echo (isset($this->settings['subscribe']['aweber']['access_secret']) ? $this->settings['subscribe']['aweber']['access_secret'] :''); ?>" />
     509                                        <input type="hidden" id="wplauncher_options-subscribe-aweber-consumer_key" name="wplauncher_options[subscribe][aweber][consumer_key]" value="<?php echo (isset($this->settings['subscribe']['aweber']['consumer_key']) ? $this->settings['subscribe']['aweber']['consumer_key'] :''); ?>" />
     510                                        <input type="hidden" id="wplauncher_options-subscribe-aweber-consumer_secret" name="wplauncher_options[subscribe][aweber][consumer_secret]" value="<?php echo (isset($this->settings['subscribe']['aweber']['consumer_secret']) ? $this->settings['subscribe']['aweber']['consumer_secret'] :''); ?>" />
     511                                        <input type="hidden" id="wplauncher_options-subscribe-aweber-access_key" name="wplauncher_options[subscribe][aweber][access_key]" value="<?php echo (isset($this->settings['subscribe']['aweber']['access_key']) ? $this->settings['subscribe']['aweber']['access_key'] :''); ?>" />
     512                                        <input type="hidden" id="wplauncher_options-subscribe-aweber-access_secret" name="wplauncher_options[subscribe][aweber][access_secret]" value="<?php echo (isset($this->settings['subscribe']['aweber']['access_secret']) ? $this->settings['subscribe']['aweber']['access_secret'] :''); ?>" />
    513513                                    </td>
    514514                                </tr>
     
    908908
    909909        // footer code
    910         if ( ! empty( $this->settings['footer_code'] ) && ! LAUNCHER_DISABLE_SCRIPT_INPUT )
    911             echo $this->settings['footer_code'];
     910        if ( ! empty( $this->settings['footer_code'] ) && ! LAUNCHER_DISABLE_SCRIPT_INPUT ) {
     911            $code = $this->settings['footer_code'];
     912            if ( ! defined( 'LAUNCHER_ALLOW_UNFILTERED_HTML' ) || ! LAUNCHER_ALLOW_UNFILTERED_HTML ) {
     913                $code = wp_kses_post( $code );
     914            }
     915            echo $code;
     916        }
     917           
    912918
    913919        if ( ! $this->is_editor() ) return; // below scripts only needed when in editor mode
     
    941947        if (apply_filters( 'wplauncher_show_admin_bar', true )) {
    942948            ?><link rel="stylesheet" id="open-sans-css"  href="//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&#038;subset=latin%2Clatin-ext&#038;ver=4.1.5" type="text/css" media="all" />
    943             <link rel="stylesheet" href="<?php echo includes_url( 'css/dashicons.min.css' ); ?>">
    944             <link rel="stylesheet" href="<?php echo includes_url( 'css/admin-bar.min.css' ); ?>">
    945             <script type="text/javascript" src="<?php echo includes_url( 'js/admin-bar.min.js' ); ?>"></script>
     949            <link rel="stylesheet" href="<?php echo ); ?>">
     950            <link rel="stylesheet" href="<?php echo ); ?>">
     951            <script type="text/javascript" src="<?php echo ); ?>"></script>
    946952            <?php wp_admin_bar_header(); _admin_bar_bump_cb(); _wp_admin_bar_init(); wp_admin_bar_render();
    947953        }
     
    975981            $output .= '<script src="'.WPLAUNCHER_URI.'js/jquery.jeditable.min.js"></script>';
    976982
    977         if ( ! empty( $this->settings['header_code'] ) && ! LAUNCHER_DISABLE_SCRIPT_INPUT )
    978             $output .= $this->settings['header_code'];
     983        if ( ! empty( $this->settings['header_code'] ) && ! LAUNCHER_DISABLE_SCRIPT_INPUT ) {
     984            $code = $this->settings['header_code'];
     985            if ( ! defined( 'LAUNCHER_ALLOW_UNFILTERED_HTML' ) || ! LAUNCHER_ALLOW_UNFILTERED_HTML ) {
     986                $code = wp_kses_post( $code );
     987            }
     988            $output .= $code;
     989        }
    979990
    980991        echo apply_filters( 'wplauncher_head', $output );
     
    11601171        ob_start();
    11611172        ?>
    1162         <div class="wplauncher-countdown<?php echo ' '.$classes; ?>" style="<?php echo $style_attr; ?>"<?php echo $color_attrs.$hideable_attrs; ?>><div id="wplauncher-countdown"></div></div>
     1173        <div class="wplauncher-countdown<?php echo ' '.$classes; ?>" style="<?php echo ; ?>"<?php echo $color_attrs.$hideable_attrs; ?>><div id="wplauncher-countdown"></div></div>
    11631174        <script type="text/javascript">
    11641175            var wplauncher_countdown_refresh_rate = <?php echo $params['refresh_rate']; ?>;
    11651176        </script>
    1166         <script src="<?php echo WPLAUNCHER_URI.'js/jquery.countdown.min.js'; ?>"></script>
     1177        <script src="<?php echo ; ?>"></script>
    11671178        <script type="text/javascript">
    11681179            jQuery(document).ready(function($) {
     
    14121423            <form id="wplauncher-subscribe" class="wplauncher-feedburner-form" method="post" action="http://feedburner.google.com/fb/a/mailverify" target="wplwindow">
    14131424                <fieldset class="wplauncher-subscribe-fieldset">
    1414                     <input name="wplauncher-subscribe-email" id="wplauncher-subscribe-email" type="text" placeholder="<?php echo $this->settings['subscribe']['email_label']; ?>"/>
     1425                    <input name="wplauncher-subscribe-email" id="wplauncher-subscribe-email" type="text" placeholder="<?php echo ; ?>"/>
    14151426                    <input value="<?php echo esc_attr($this->settings['subscribe']['submit_label']); ?>" type="submit" id="wplauncher-subscribe-submit" name="wplauncher-submit" />
    14161427                </fieldset>
     
    14461457            jQuery(document).ready(function($) {
    14471458                $('#wplauncher-subscribe').submit(function(event) {
    1448                     var type = $('#wplauncher-subscribe-service').val();
    1449                     if (/*$('#mtsnb-newsletter-type').html() == 'WordPress' ||*/
    1450                         type == 'aweber' ||
    1451                         type == 'mailchimp' ||
    1452                         type == 'getresponse' ||
    1453                         type == 'campaignmonitor' ||
    1454                         type == 'madmimi') {
    1455 
    1456                         event.preventDefault();
    1457 
    1458                         //$('<i style="margin-left: 10px;" class="mtsnb-submit-spinner fa fa-spinner fa-spin"></i>').insertAfter('.mtsnb-submit');
    1459                         $('#wplauncher-subscribe').addClass('submitting');
     1459                var type = $('#wplauncher-subscribe-service').val();
     1460                if (/*$('#mtsnb-newsletter-type').html() == 'WordPress' ||*/
     1461                    type == 'aweber' ||
     1462                    type == 'mailchimp' ||
     1463                    type == 'getresponse' ||
     1464                    type == 'campaignmonitor' ||
     1465                    type == 'madmimi') {
     1466
     1467                    event.preventDefault();
     1468
     1469                    //$('<i style="margin-left: 10px;" class="mtsnb-submit-spinner fa fa-spinner fa-spin"></i>').insertAfter('.mtsnb-submit');
     1470                    $('#wplauncher-subscribe').addClass('submitting');
    14601471
    14611472                        var data = {
     
    14701481                            response = $.parseJSON(response);
    14711482                            //$('.mtsnb-submit-spinner').remove();
    1472                             $('#wplauncher-subscribe').removeClass('submitting');
     1483                        $('#wplauncher-subscribe').removeClass('submitting');
    14731484                            //$('.wplauncher-subscribe-message').html('<i class="fa fa-' + response.status + '"></i> ' + response.message);
    14741485                            $('.wplauncher-subscribe-message').html(response.message);
     
    14791490                        });
    14801491
    1481                     }
     1492                }
    14821493                });
    14831494            });
     
    15121523        }
    15131524        ?>
    1514         <tr class="<?php echo $attrs['id'].' '.$row_class; ?>">
    1515             <th><label for="<?php echo $attrs['id']; ?>"><?php echo wp_filter_post_kses( $label ); ?></label></th>
    1516             <td>
    1517                 <input<?php echo $attributes; ?>>
    1518                 <?php if (!empty($description)) { ?>
    1519                     <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
    1520                 <?php } ?>
    1521             </td>
    1522         </tr>
     1525        <tr class="<?php echo ; ?>">
     1526; ?>"><?php echo wp_filter_post_kses( $label ); ?></label></th>
     1527<td>
     1528    <input<?php echo $attributes; ?>>
     1529    <?php if (!empty($description)) { ?>
     1530    <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
     1531<?php } ?>
     1532</td>
     1533</tr>
    15231534        <?php
    15241535    }
     
    15431554        }
    15441555        ?>
    1545         <tr class="<?php echo $attrs['id'].' '.$row_class; ?>">
    1546             <th><label for="<?php echo $attrs['id']; ?>"><?php echo wp_filter_post_kses( $label ); ?></label></th>
    1547             <td>
    1548                 <textarea<?php echo $attributes; ?>><?php echo esc_textarea($value); ?></textarea>
    1549                 <?php if (!empty($description)) { ?>
    1550                     <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
    1551                 <?php } ?>
    1552             </td>
    1553         </tr>
     1556        <tr class="<?php echo ; ?>">
     1557; ?>"><?php echo wp_filter_post_kses( $label ); ?></label></th>
     1558<td>
     1559    <textarea<?php echo $attributes; ?>><?php echo esc_textarea($value); ?></textarea>
     1560    <?php if (!empty($description)) { ?>
     1561    <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
     1562<?php } ?>
     1563</td>
     1564</tr>
    15541565        <?php
    15551566    }
     
    15721583        }
    15731584        ?>
    1574         <tr class="<?php echo $attrs['id'].' '.$row_class; ?>">
    1575             <th><label for="<?php echo $attrs['id']; ?>"><?php echo wp_filter_post_kses( $label ); ?></label></th>
    1576             <td>
    1577                 <?php if (!empty($description)) { ?>
    1578                     <p class="description"><label>
    1579                 <?php } ?>
    1580                 <input type="hidden" name="<?php echo $attrs['name']; ?>" value="0">
    1581                 <input<?php echo $attributes; ?>>
    1582                 <?php if (!empty($description)) { ?>
    1583                     <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
    1584                 <?php } ?>
    1585             </td>
    1586         </tr>
     1585        <tr class="<?php echo ; ?>">
     1586; ?>"><?php echo wp_filter_post_kses( $label ); ?></label></th>
     1587<td>
     1588    <?php if (!empty($description)) { ?>
     1589    <p class="description"><label>
     1590<?php } ?>
     1591; ?>" value="0">
     1592    <input<?php echo $attributes; ?>>
     1593    <?php if (!empty($description)) { ?>
     1594    <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
     1595<?php } ?>
     1596</td>
     1597</tr>
    15871598        <?php
    15881599    }
     
    16031614        }
    16041615        ?>
    1605         <tr class="<?php echo $attrs['id'].' '.$row_class; ?>">
    1606             <th><label for="<?php echo $attrs['id']; ?>"><?php echo $label; ?></label></th>
    1607             <td>
    1608                 <select<?php echo $attributes; ?>>
    1609                     <?php
    1610                     foreach ($options as $option_val => $option_label) {
    1611                         echo '<option value="'.esc_attr( $option_val ).'"'.selected($option_val, $selected, false).'>'.$option_label.'</option>';
    1612                     }
    1613                     ?>
    1614                 </select>
    1615                 <?php if (!empty($description)) { ?>
    1616                     <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
    1617                 <?php } ?>
    1618             </td>
    1619         </tr>
     1616        <tr class="<?php echo ; ?>">
     1617; ?></label></th>
     1618<td>
     1619    <select<?php echo $attributes; ?>>
     1620        <?php
     1621        foreach ($options as $option_val => $option_label) {
     1622            echo '<option value="'.esc_attr( $option_val ).'"'.selected($option_val, $selected, false).'>'.$option_label.'</option>';
     1623        }
     1624        ?>
     1625    </select>
     1626    <?php if (!empty($description)) { ?>
     1627    <p class="description"><?php echo wp_filter_post_kses( $description ); ?></p>
     1628<?php } ?>
     1629</td>
     1630</tr>
    16201631        <?php
    16211632    }
     
    16461657
    16471658    function var_array_lookup($arr, $string) {
    1648         preg_match_all('/\[([^\]]*)\]/', $string, $arr_matches, PREG_PATTERN_ORDER);
    1649 
    1650         $return = $arr;
    1651         foreach($arr_matches[1] as $dimension) {
    1652             if (isset($return[$dimension]))
    1653                 $return = $return[$dimension];
    1654         }
    1655 
    1656         return $return;
    1657     }
    1658 
    1659 
    1660     /**
     1659    preg_match_all('/\[([^\]]*)\]/', $string, $arr_matches, PREG_PATTERN_ORDER);
     1660
     1661    $return = $arr;
     1662    foreach($arr_matches[1] as $dimension) {
     1663    if (isset($return[$dimension]))
     1664        $return = $return[$dimension];
     1665    }
     1666
     1667    return $return;
     1668}
     1669
     1670
     1671/**
    16611672     * Ajax newsletter
    16621673     *
     
    16851696                echo json_encode(array(
    16861697                    'status'    => 'warning',
    1687                     'message'   => __('MailChimp account is not setup properly.'),
     1698                    'message'   => __('MailChimp account is not setup properly.'),
    16881699                ));
    16891700
     
    16941705                echo json_encode(array(
    16951706                    'status'    => 'warning',
    1696                     'message'   => __('MailChimp: No list specified.'),
     1707                    'message'   => __('MailChimp: No list specified.'),
    16971708                ));
    16981709
     
    17021713            $MailChimp = new WPS_MailChimp($this->settings['subscribe']['mailchimp']['api_key']);
    17031714            $result = $MailChimp->call('lists/subscribe', array(
    1704                 'id'                => $this->settings['subscribe']['mailchimp']['list'],
    1705                 'email'             => array('email'=>sanitize_email( $_POST['email']) ),
    1706                 'merge_vars'        => array( 'FNAME'=> sanitize_text_field( $_POST['first_name'] ), 'LNAME'=>sanitize_text_field( $_POST['last_name'] ) ),
    1707                 'double_optin'      => true,
    1708                 'update_existing'   => false,
    1709                 'replace_interests' => false,
    1710                 'send_welcome'      => true,
    1711             ));
    1712 
    1713             if ($result) {
    1714 
    1715                 if (isset($result['email'])) {
     1715'id'                => $this->settings['subscribe']['mailchimp']['list'],
     1716'email'             => array('email'=>sanitize_email( $_POST['email']) ),
     1717'merge_vars'        => array( 'FNAME'=> sanitize_text_field( $_POST['first_name'] ), 'LNAME'=>sanitize_text_field( $_POST['last_name'] ) ),
     1718'double_optin'      => true,
     1719'update_existing'   => false,
     1720'replace_interests' => false,
     1721'send_welcome'      => true,
     1722));
     1723
     1724if ($result) {
     1725
     1726    if (isset($result['email'])) {
    17161727
    17171728                    echo json_encode(array(
     
    17211732
    17221733                    die();
    1723                 }
    1724 
    1725                 else if (isset($result['status']) && $result['status'] == 'error') {
     1734    }
     1735
     1736    else if (isset($result['status']) && $result['status'] == 'error') {
    17261737                    echo json_encode(array(
    17271738                        'status'        => 'warning',
     
    17301741
    17311742                    die();
    1732                 }
    1733             } else {
    1734 
    1735                 echo json_encode(array(
     1743    }
     1744} else {
     1745
     1746    echo json_encode(array(
    17361747                    'status'    => 'warning',
    17371748                    'message'   => __('Unable to subscribe.'),
     
    17391750
    17401751                die();
    1741             }
     1752}
    17421753        }
    17431754
     
    17971808                $api->add_contact(
    17981809                    $this->settings['subscribe']['getresponse']['api_key'],
    1799                     array (
    1800                         'campaign'  => $this->settings['subscribe']['getresponse']['campaign'],
    1801                         'name'      => sanitize_text_field( $_POST['first_name'] ) . ' ' . sanitize_text_field( $_POST['last_name'] ),
    1802                         'email'     => sanitize_email( $_POST['email'] ),
    1803                     )
     1810                array (
     1811                'campaign'  => $this->settings['subscribe']['getresponse']['campaign'],
     1812                'name'      => sanitize_text_field( $_POST['first_name'] ) . ' ' . sanitize_text_field( $_POST['last_name'] ),
     1813                'email'     => sanitize_email( $_POST['email'] ),
     1814                )
    18041815                );
    18051816
     
    19171928                        }
    19181929                    }
    1919                 }
     1930            }
    19201931
    19211932                $result = $mailer->AddMembership($this->settings['subscribe']['madmimi']['list'], sanitize_email( $_POST['email'] ), array(
     
    22302241                    $lists  = new SimpleXMLElement($lists);
    22312242
    2232                     if ($lists->list) {
     2243                if ($lists->list) {
    22332244                        foreach ($lists->list as $l) {
    22342245                            $options .= '<option value="' . $l->attributes()->{'name'}->{0} . '">' .  $l->attributes()->{'name'}->{0} . '</option>';
    22352246                        }
    2236                     }
    2237 
    2238                     if (isset($_POST['list']) && $_POST['list'] != '') {
    2239                         $options = '';
     2247                }
     2248
     2249                if (isset($_POST['list']) && $_POST['list'] != '') {
     2250                    $options = '';
    22402251                        foreach ($lists->list as $l) {
    22412252
  • launcher/trunk/readme.txt

    r2387675 r2777870  
    44Tags: launcher, coming soon, maintenance, countdown, maintenance mode, under construction, pre-launch
    55Requires at least: 3.0.1
    6 Tested up to: 5.5.1
    7 Stable tag: 1.0.11
     6Tested up to: .1
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.ht
     
    103103== Changelog ==
    104104
     105
     106
     107
     108
    105109= 1.0.11 =
    106110* Patched another XSS vulnerability
Note: See TracChangeset for help on using the changeset viewer.