Plugin Directory

Changeset 2098190


Ignore:
Timestamp:
05/30/2019 10:22:56 PM (7 years ago)
Author:
travisnorthcutt
Message:

Version 1.8.0

Location:
convertkit
Files:
79 added
13 edited

Legend:

Unmodified
Added
Removed
  • convertkit/trunk/admin/class-convertkit-settings.php

    r2078109 r2098190  
    119119                    endif;
    120120                endforeach;
    121 
    122                 /**
    123                  * Check for utf8mb4 support.
    124                  * Lack of support will cause problems if any content pulled in from ConvertKit contains emoji characters
    125                  */
    126                 global $wpdb;
    127                 if ( $wpdb->get_col_charset( 'wp_options', 'option_value' ) !== 'utf8mb4' ) {
    128                     ?>
    129                     <div class="inline notice notice-warning">
    130                         <p>
    131                             <strong>
    132                                 <?php
    133                                 echo sprintf( __( 'Notice: Your database does not appear to support the %s. <em>If you experience difficulties</em> connecting to ConvertKit, this may be why. Please contact your webhost to have your database upgraded. If you do not notice any issues, you may safely ignore this message.',
    134                                                   'convertkit' ),
    135                                               '<a href="https://make.wordpress.org/core/2015/04/02/the-utf8mb4-upgrade/">utf8mb4 character set</a>' );
    136                                 ?>
    137                             </strong>
    138                         </p>
    139                     </div>
    140                     <?php
    141                 }
    142121
    143122                // Check for Multibyte string PHP extension.
     
    228207        check_ajax_referer( 'convertkit-tinymce', 'security' );
    229208
    230         $tags = get_option( 'convertkit_tags' );
     209        $tags   = get_option( 'convertkit_tags' );
    231210        $values = array();
    232         foreach ( $tags as $tag ) {
    233             $values[] = array(
    234                 'value' => $tag['id'],
    235                 'text' => $tag['name'],
    236             );
     211        if ( is_array( $tags ) ) {
     212            foreach ( $tags as $tag ) {
     213                $values[] = array(
     214                    'value' => $tag['id'],
     215                    'text'  => $tag['name'],
     216                );
     217            }
    237218        }
    238219        wp_send_json( $values );
  • convertkit/trunk/admin/section/class-convertkit-settings-general.php

    r2057877 r2098190  
    4646
    4747        $forms = get_option( 'convertkit_forms', array() );
     48        /**
     49         * Alphabetize
     50         */
     51        usort( $forms, function( $a, $b ) {
     52            return strcmp( $a['name'], $b['name'] );
     53        });
     54
    4855        if ( $update_resources && isset( $forms[0] ) && isset( $forms[0]['id'] ) && '-2' === $forms[0]['id'] ) {
    4956            wp_send_json_error( __( 'Error connecting to API. Please verify your site can connect to https://api.convertkit.com','convertkit' ) );
     
    187194        if ( isset( $forms[0]['id'] ) && '-2' === $forms[0]['id'] ) {
    188195            $html .= '<p id="default_form_error" class="error">' . __( 'Error connecting to API. Please verify your site can connect to <code>https://api.convertkit.com</code>','convertkit' ) . '</p>';
     196            $html .= sprintf( '<input hidden id="default_form" name="%s[default_form]" value="">', $this->settings_key );
    189197        } else {
    190198            $html .= sprintf( '<select id="default_form" name="%s[default_form]">', $this->settings_key );
  • convertkit/trunk/includes/class-ck-widget-form.php

    r1901832 r2098190  
    128128        }
    129129
    130         $api = WP_ConvertKit::get_api();
     130        $api     = WP_ConvertKit::get_api();
    131131        $form_id = $instance['form'];
    132         $forms = get_option( 'convertkit_forms' );
     132        $forms   = get_option( 'convertkit_forms' );
    133133
    134134        if ( isset( $forms[ $form_id ]['uid'] ) ) {
    135135            // new form
     136            $this->widget_start( $args, $instance );
    136137            $tag = '<script async data-uid="' . $forms[ $form_id ]['uid'] . '" src="' . $forms[ $form_id ]['embed_js'] . '"></script>';
    137138            echo $tag;
     139            $this->widget_end( $args );
    138140        } else {
    139141            // old form
     
    145147            );
    146148
    147             $form_markup = $api->get_resource( $url );
    148 
    149             if ( $api && ! is_wp_error( $api ) ) {
    150                 ob_start();
    151 
    152                 $this->widget_start( $args, $instance );
    153                 echo $form_markup;
    154                 $this->widget_end( $args );
    155 
    156                 $content = ob_get_clean();
    157 
    158                 echo $content;
    159             }
     149            $form_markup = $api->get_resource( $url );
     150
     151            if ( $api && ! is_wp_error( $api ) ) {
     152                ob_start();
     153
     154                $this->widget_start( $args, $instance );
     155                echo $form_markup;
     156                $this->widget_end( $args );
     157
     158                $content = ob_get_clean();
     159
     160                echo $content;
     161            }
    160162        }
    161163    }
  • convertkit/trunk/includes/class-convertkit.php

    r2057877 r2098190  
    141141        $tags = get_option( 'convertkit_tags' );
    142142
     143        /**
     144         * Alphabetize
     145         */
     146        usort( $forms, function( $a, $b ) {
     147            return strcmp( $a['name'], $b['name'] );
     148        });
     149
     150        usort( $landing_pages, function( $a, $b ) {
     151            return strcmp( $a['name'], $b['name'] );
     152        });
     153
     154        usort( $tags, function( $a, $b ) {
     155            return strcmp( $a['name'], $b['name'] );
     156        });
     157
    143158        $meta = self::_get_meta( $post->ID );
    144159        $settings_link = self::_get_settings_page_link();
     
    210225            }
    211226
    212             if ( 0 < $form_id ) {
     227            if ( 0 < $form_id && !is_array( $form_id ) ) {
    213228
    214229                $forms = get_option( 'convertkit_forms' );
  • convertkit/trunk/readme.txt

    r2078109 r2098190  
    44Tags: email, marketing, embed form, convertkit, capture
    55Requires at least: 3.6
    6 Tested up to: 5.1.1
    7 Stable tag: 1.7.5
     6Tested up to: 5.2.1
     7Stable tag: 1.8.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4646
    4747== Changelog ==
     48### 1.8.0 2019-05-30
     49* Displays tags/LPs/forms alphabetically
     50* Several edge-case bug fixes
     51* Removes confusing utf8 warning on settings page
     52
    4853### 1.7.5 2019-04-30
    4954* Fix false positive detection of character set issues related to using emojis in forms & landing pages
  • convertkit/trunk/vendor/autoload.php

    r2078109 r2098190  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitcf87f89295679352abe450fddf326efa::getLoader();
     7return ComposerAutoloaderInit0b3cf8970c5490b8b71b885ea58f7489::getLoader();
  • convertkit/trunk/vendor/composer/autoload_real.php

    r2078109 r2098190  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitcf87f89295679352abe450fddf326efa
     5class ComposerAutoloaderInit0b3cf8970c5490b8b71b885ea58f7489
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInitcf87f89295679352abe450fddf326efa', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit0b3cf8970c5490b8b71b885ea58f7489', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInitcf87f89295679352abe450fddf326efa', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit0b3cf8970c5490b8b71b885ea58f7489', 'loadClassLoader'));
    2525
    2626        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    2828            require_once __DIR__ . '/autoload_static.php';
    2929
    30             call_user_func(\Composer\Autoload\ComposerStaticInitcf87f89295679352abe450fddf326efa::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit0b3cf8970c5490b8b71b885ea58f7489::getInitializer($loader));
    3131        } else {
    3232            $map = require __DIR__ . '/autoload_namespaces.php';
  • convertkit/trunk/vendor/composer/autoload_static.php

    r2078109 r2098190  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitcf87f89295679352abe450fddf326efa
     7class ComposerStaticInit0b3cf8970c5490b8b71b885ea58f7489
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3939    {
    4040        return \Closure::bind(function () use ($loader) {
    41             $loader->prefixLengthsPsr4 = ComposerStaticInitcf87f89295679352abe450fddf326efa::$prefixLengthsPsr4;
    42             $loader->prefixDirsPsr4 = ComposerStaticInitcf87f89295679352abe450fddf326efa::$prefixDirsPsr4;
    43             $loader->prefixesPsr0 = ComposerStaticInitcf87f89295679352abe450fddf326efa::$prefixesPsr0;
     41            $loader->prefixLengthsPsr4 = ComposerStaticInit0b3cf8970c5490b8b71b885ea58f7489::$prefixLengthsPsr4;
     42            $loader->prefixDirsPsr4 = ComposerStaticInit0b3cf8970c5490b8b71b885ea58f7489::$prefixDirsPsr4;
     43            $loader->prefixesPsr0 = ComposerStaticInit0b3cf8970c5490b8b71b885ea58f7489::$prefixesPsr0;
    4444
    4545        }, null, ClassLoader::class);
  • convertkit/trunk/vendor/composer/installed.json

    r2078109 r2098190  
    5252    {
    5353        "name": "oldmine/relative-to-absolute-url",
    54         "version": "1.0.0",
    55         "version_normalized": "1.0.0.0",
     54        "version": "1.7.1",
     55        "version_normalized": "1.7.1.0",
    5656        "source": {
    5757            "type": "git",
    5858            "url": "https://github.com/ConvertKit/relative-to-absolute-url.git",
    59             "reference": "d4ba4f6ccccb5a331d76ed2bdd797c1f631ead40"
     59            "reference": "51daebf43ee961dd0817ef3440afd540f37430e4"
    6060        },
    6161        "dist": {
    6262            "type": "zip",
    63             "url": "https://api.github.com/repos/ConvertKit/relative-to-absolute-url/zipball/d4ba4f6ccccb5a331d76ed2bdd797c1f631ead40",
    64             "reference": "d4ba4f6ccccb5a331d76ed2bdd797c1f631ead40",
     63            "url": "https://api.github.com/repos/ConvertKit/relative-to-absolute-url/zipball/51daebf43ee961dd0817ef3440afd540f37430e4",
     64            "reference": "51daebf43ee961dd0817ef3440afd540f37430e4",
    6565            "shasum": ""
    6666        },
     
    6868            "phpunit/phpunit": "^7"
    6969        },
    70         "time": "2019-03-27T15:35:29+00:00",
     70        "time": "2019-05-22T16:37:59+00:00",
    7171        "type": "library",
    7272        "installation-source": "dist",
     
    7979        "description": "Library adaptation to translate relative url to absolute. Original library: https://sourceforge.net/projects/absoluteurl/",
    8080        "support": {
    81             "source": "https://github.com/ConvertKit/relative-to-absolute-url/tree/1.0.0"
     81            "source": "https://github.com/ConvertKit/relative-to-absolute-url/tree/1.7.1"
    8282        }
    8383    }
  • convertkit/trunk/vendor/oldmine/relative-to-absolute-url/CHANGELOG.md

    r2057877 r2098190  
    11Changelog for RelativeToAbsoluteUrl
     2
     3RelativeToAbsoluteUrl v1.7.1, May 22, 2019
     4----------------------------------------------
     5- Update usage of `mb_strrpos()` https://github.com/ConvertKit/relative-to-absolute-url/commit/df0a401bdc881893179730378fe64c6e8c06b8c5
     6
     7RelativeToAbsoluteUrl v1.7, March 27, 2019
     8----------------------------------------------
     9- Remove language features only available in PHP 7.x https://github.com/ConvertKit/relative-to-absolute-url/commit/a5f063db0c7c31b2a59755b3ad83e081730f4e54
     10
     11RelativeToAbsoluteUrl v1.6, March 13, 2019
     12----------------------------------------------
     13- Update regex to work with PHP 7.3 https://github.com/ConvertKit/relative-to-absolute-url/commit/66426fa7afee86f1e6ff4f103e461aa6ec952c9b
    214
    315RelativeToAbsoluteUrl v1.5, December 23, 2018
     
    2234----------------------------------------
    2335- Initial release
     36
  • convertkit/trunk/vendor/oldmine/relative-to-absolute-url/composer.json

    r2058401 r2098190  
    33  "description": "Library adaptation to translate relative url to absolute. Original library: https://sourceforge.net/projects/absoluteurl/",
    44  "type": "library",
    5   "version": "1.0.0",
     5  "version": "1.7.1",
    66  "require-dev": {
    77    "phpunit/phpunit": "^7"
  • convertkit/trunk/vendor/oldmine/relative-to-absolute-url/src/RelativeToAbsoluteUrl.php

    r2058401 r2098190  
    335335        // compare last multi-byte character against '/'
    336336        if ($outPath != '/' &&
    337             (mb_strlen($path) - 1) == mb_strrpos($path, '/', 'UTF-8'))
     337            (mb_strlen($path) - 1) == mb_strrpos($path, '/', 0, 'UTF-8'))
    338338            $outPath .= '/';
    339339        return $outPath;
  • convertkit/trunk/wp-convertkit.php

    r2078109 r2098190  
    44 * Plugin URI: https://convertkit.com/
    55 * Description: Quickly and easily integrate ConvertKit forms into your site.
    6  * Version: 1.7.5
     6 * Version: 1.8.0
    77 * Author: ConvertKit
    88 * Author URI: https://convertkit.com/
     
    1717define( 'CONVERTKIT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    1818define( 'CONVERTKIT_PLUGIN_PATH', __DIR__ );
    19 define( 'CONVERTKIT_PLUGIN_VERSION', '1.7.5' );
     19define( 'CONVERTKIT_PLUGIN_VERSION', '1.8.0' );
    2020
    2121require_once CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php';
Note: See TracChangeset for help on using the changeset viewer.