Plugin Directory

Changeset 2818433


Ignore:
Timestamp:
11/15/2022 04:07:27 PM (3 years ago)
Author:
EmailOctopus
Message:

Adding version 3.1.0.

Location:
emailoctopus
Files:
34 added
3 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • emailoctopus/trunk/emailoctopus.php

    r2780110 r2818433  
    44 * Plugin URI:        https://emailoctopus.com
    55 * Description:       Email marketing widget; easily add subscribers to an EmailOctopus list. Fully customisable.
    6  * Version:           3.0.1
     6 * Version:           3.1.0
    77 * Author:            EmailOctopus
    88 * Author URI:        https://emailoctopus.com
     
    2121
    2222if ( version_compare( PHP_VERSION, '7.4', '<' ) ) {
    23     require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    24     deactivate_plugins( plugin_basename( __FILE__ ) );
    25     wp_die( esc_html__( 'EmailOctopus requires PHP version 7.4 or higher.', 'emailoctopus' ) );
     23    require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     24    deactivate_plugins( plugin_basename( __FILE__ ) );
     25    wp_die( esc_html__( 'EmailOctopus requires PHP version 7.4 or higher.', 'emailoctopus' ) );
    2626}
    2727
    28 define( 'EMAILOCTOPUS_VERSION', '3.0.1' );
     28define( 'EMAILOCTOPUS_VERSION', '3.1.0' );
    2929define( 'EMAILOCTOPUS_FILE', __FILE__ );
    3030define( 'EMAILOCTOPUS_DIR', plugin_dir_path( EMAILOCTOPUS_FILE ) );
  • emailoctopus/trunk/languages/emailoctopus.pot

    r2780110 r2818433  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: EmailOctopus 3.0.1\n"
     5"Project-Id-Version: EmailOctopus 3.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/emailoctopus-wordpress-plugin\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2022-09-05T11:59:38+00:00\n"
     12"POT-Creation-Date: 2022-11-15T16:05:14+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.6.0\n"
     14"X-Generator: WP-CLI 2.7.1\n"
    1515"X-Domain: emailoctopus\n"
    1616
     
    1919#: src/Admin.php:170
    2020#: src/Admin.php:171
     21#: src/Gutenberg.php:50
    2122msgid "EmailOctopus"
    2223msgstr ""
     
    5657
    5758#: public/views/component-welcome.php:18
     59#: src/Gutenberg.php:70
    5860msgid "Create an account for free"
    5961msgstr ""
    6062
    6163#: public/views/component-welcome.php:21
     64#: src/Gutenberg.php:74
    6265msgid "Connect an existing account"
    6366msgstr ""
     
    102105#: public/views/page-forms.php:85
    103106#: public/views/page-forms.php:117
     107#: src/Gutenberg.php:90
    104108msgid "Form"
    105109msgstr ""
     
    107111#: public/views/page-form.php:91
    108112#: public/views/page-form.php:125
     113#: src/Gutenberg.php:88
     114#: src/Gutenberg.php:157
    109115msgid "Untitled"
    110116msgstr ""
    111117
    112118#: public/views/page-form.php:95
     119#: src/Gutenberg.php:160
    113120msgid "hello bar"
    114121msgstr ""
    115122
    116123#: public/views/page-form.php:98
     124#: src/Gutenberg.php:163
    117125msgid "inline"
    118126msgstr ""
    119127
    120128#: public/views/page-form.php:101
     129#: src/Gutenberg.php:166
    121130msgid "pop-up"
    122131msgstr ""
    123132
    124133#: public/views/page-form.php:104
     134#: src/Gutenberg.php:169
    125135msgid "slide-in"
    126136msgstr ""
     
    184194#: public/views/page-forms.php:119
    185195#: src/Admin.php:117
     196#: src/Gutenberg.php:99
    186197msgid "Display settings"
    187198msgstr ""
     
    231242
    232243#: src/Admin.php:116
     244#: src/Gutenberg.php:100
    233245msgid "View on EmailOctopus"
    234246msgstr ""
     
    296308msgstr ""
    297309
    298 #: src/Deprecated.php:95
     310#: src/Deprecated.php:92
    299311msgid "Loading…"
    300312msgstr ""
    301313
    302314#. translators: %s: EmailOctopus home page URL.
    303 #: src/Deprecated.php:278
     315#: src/Deprecated.php:275
    304316msgid "Powered by <a href=\"%s\" target=\"_blank\" rel=\"noopener\">EmailOctopus</a>"
    305317msgstr ""
    306318
    307 #: src/Form.php:43
    308 msgid "Invalid form ID"
    309 msgstr ""
    310 
    311 #: src/Form.php:232
    312 msgid "Error: Could not render the form."
     319#: src/Form.php:239
     320msgid "This EmailOctopus form cannot be rendered."
     321msgstr ""
     322
     323#: src/Form.php:241
     324msgid "Errors:"
    313325msgstr ""
    314326
     
    317329msgstr ""
    318330
    319 #: src/Plugin.php:119
    320 #: src/Plugin.php:120
     331#: src/Gutenberg.php:67
     332msgid "To use this block, create an EmailOctopus account or connect an existing one."
     333msgstr ""
     334
     335#. translators: %s - create form link
     336#: src/Gutenberg.php:80
     337msgid "No forms yet. %s."
     338msgstr ""
     339
     340#: src/Gutenberg.php:81
     341msgid "Create one"
     342msgstr ""
     343
     344#: src/Gutenberg.php:89
     345msgid "General"
     346msgstr ""
     347
     348#: src/Gutenberg.php:92
     349msgid "Select a form using the sidebar."
     350msgstr ""
     351
     352#. translators: %1$s - form name, %2$s - form type
     353#: src/Gutenberg.php:94
     354msgid "%1$s (%2$s)"
     355msgstr ""
     356
     357#: src/Gutenberg.php:95
     358msgid "Click preview or publish to view."
     359msgstr ""
     360
     361#. translators: %s - form_id
     362#: src/Gutenberg.php:97
     363msgid "Error: could not load form %s from the API."
     364msgstr ""
     365
     366#: src/Gutenberg.php:151
     367msgid "None"
     368msgstr ""
     369
     370#: src/Plugin.php:121
     371#: src/Plugin.php:122
    321372#: src/Widget.php:37
    322373msgid "EmailOctopus Form"
    323374msgstr ""
    324375
    325 #: src/Plugin.php:122
    326 msgid "Private post type for relating EmailOctopus.com form data with the WordPress site."
     376#: src/Plugin.php:124
     377msgid "Private post type for mapping emailoctopus.com form data with that in WordPress."
    327378msgstr ""
    328379
     
    335386msgstr ""
    336387
    337 #: public/js/block.json
     388#: public/build/block.js:1
     389#: src/js/block-preview.js:50
     390msgid "A server error occurred."
     391msgstr ""
     392
     393#: public/build/block.js:1
     394#: src/js/block-preview.js:93
     395msgid "EmailOctopus Form Preview"
     396msgstr ""
     397
     398#: public/build/json/block.json
     399#: src/json/block.json
    338400msgctxt "block title"
    339401msgid "EmailOctopus Form"
    340402msgstr ""
     403
     404#: public/build/json/block.json
     405#: src/json/block.json
     406msgctxt "block description"
     407msgid "Add an EmailOctopus Form."
     408msgstr ""
     409
     410#: public/build/json/block.json
     411#: src/json/block.json
     412msgctxt "block keyword"
     413msgid "emailoctopus"
     414msgstr ""
     415
     416#: public/build/json/block.json
     417#: src/json/block.json
     418msgctxt "block keyword"
     419msgid "email octopus"
     420msgstr ""
     421
     422#: public/build/json/block.json
     423#: src/json/block.json
     424msgctxt "block keyword"
     425msgid "form"
     426msgstr ""
  • emailoctopus/trunk/public/css/admin.css

    r2774938 r2818433  
    194194 */
    195195.emailoctopus-form-shortcode {
    196     white-space: nowrap;
    197196    margin-top: 10px;
     197    user-select: all;
    198198}
    199199
  • emailoctopus/trunk/public/images/icon.svg

    r2774938 r2818433  
    22<svg width="100%" height="100%" viewBox="0 0 89 117" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    33    <title>Just Otto</title>
    4     <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
    5         <g id="purple" fill="#6E54D7" fill-rule="nonzero">
     4    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
     5        <g fill="#6e54d7" fill-rule="nonzero">
    66            <path d="M86.723,74.5785 C83.734,73.0276 80.445,74.8294 79.134,76.1522 C78.352,76.9504 77.3863,77.5662 76.3284,77.9539 C75.2705,78.342 74.1437,78.501 73.0168,78.41 C71.8899,78.319 70.8091,77.9768 69.8202,77.4294 C68.8313,76.882 68.0034,76.1066 67.3364,75.1943 C67.1755,74.9662 67.0375,74.7382 66.8995,74.4873 C77.0184,66.9154 83.527,54.8732 83.504,41.3259 C83.481,18.4276 64.5767,-0.1601 41.4873,-0.00242987056 C18.5359,0.1592 0,18.6557 0,41.4399 C0,56.2645 7.8651,69.2873 19.6628,76.6083 C19.6168,76.9732 19.5478,77.3382 19.4558,77.7031 C19.1798,78.798 18.6509,79.801 17.938,80.668 C17.2251,81.535 16.3282,82.219 15.2933,82.698 C15.0403,82.812 14.7873,82.926 14.5114,83.017 C14.4884,83.017 14.4884,83.017 14.4654,83.04 C14.3734,83.063 14.3044,83.086 14.2124,83.108 C13.1545,83.405 12.0276,83.496 10.9238,83.336 C9.084,83.063 4.0935,82.88 2.7597,86.256 C1.5408,89.357 4.0935,91.729 6.7382,92.55 C7.2212,92.71 7.7041,92.824 8.2101,92.938 C8.578,93.052 8.946,93.143 9.314,93.189 C10.2109,93.326 11.1308,93.394 12.0506,93.394 C13.7525,93.394 15.4313,93.143 17.0411,92.664 C17.0641,92.664 17.0641,92.664 17.0871,92.642 C17.1101,92.642 17.1101,92.642 17.1331,92.619 C17.3631,92.55 17.616,92.482 17.846,92.391 C20.0537,91.638 22.0775,90.452 23.8253,88.924 C24.2163,88.582 24.5612,88.217 24.9062,87.807 C25.1592,87.533 25.3891,87.282 25.6421,86.986 C25.7571,86.849 25.8491,86.712 25.9641,86.575 C25.9871,86.552 25.9871,86.529 26.0101,86.507 C26.539,85.822 27.022,85.115 27.4359,84.363 C27.4359,84.363 27.4359,84.34 27.4589,84.34 C27.6199,84.043 28.0798,84.226 27.9649,84.545 C27.9419,84.591 27.9419,84.614 27.9189,84.659 C26.861,87.898 25.3202,90.954 23.3194,93.736 C21.6866,95.994 19.8008,98.047 17.685,99.849 C15.4083,101.764 14.5574,105.003 16.0982,107.535 C17.639,110.066 20.9736,110.887 23.3194,109.063 C26.677,106.463 29.6207,103.384 32.1044,99.917 C34.9101,95.994 37.0488,91.638 38.4287,87.054 C38.5437,86.643 38.7047,86.073 38.8426,85.48 C38.9346,85.07 39.5556,85.138 39.5556,85.549 C39.5786,86.073 39.5786,86.598 39.5786,87.1 C39.5096,91.661 38.4977,96.154 36.6119,100.328 C35.462,102.859 33.9902,105.231 32.2654,107.398 C30.4026,109.701 30.2186,113.054 32.2194,115.243 C34.2202,117.433 37.6468,117.615 39.6016,115.38 C42.3842,112.187 44.684,108.607 46.4548,104.729 C48.9615,99.233 50.2954,93.303 50.3643,87.259 C50.3643,86.803 50.3643,86.347 50.3643,85.891 C50.3643,85.571 50.8243,85.503 50.9163,85.8 C51.0543,86.301 51.1923,86.78 51.2842,87.122 C52.0662,90.498 52.3191,93.964 52.0202,97.431 C51.7902,100.191 51.1923,102.928 50.2724,105.528 C49.2835,108.31 50.2264,111.549 52.8481,112.94 C55.4698,114.331 58.7584,113.373 59.8393,110.636 C61.4031,106.714 62.369,102.563 62.737,98.343 C63.0589,94.717 62.8979,91.091 62.323,87.533 C62.162,86.484 61.932,85.457 61.7021,84.431 C61.6331,84.18 61.955,83.975 62.162,84.157 C62.9899,84.864 63.8868,85.48 64.8297,86.028 C67.0835,87.305 69.5902,88.08 72.1889,88.286 C74.7876,88.491 77.3863,88.126 79.824,87.236 C82.262,86.324 84.47,84.91 86.286,83.063 C86.93,82.401 87.528,81.717 88.057,80.964 C89.69,78.798 89.184,75.8557 86.723,74.5785 Z M26.999,47.7803 C24.1473,48.168 21.5026,46.2066 21.1116,43.3557 C20.7207,40.5048 22.6985,37.9048 25.5731,37.5171 C28.4248,37.1294 31.0695,39.0908 31.4605,41.9417 C31.8514,44.7697 29.8736,47.3925 26.999,47.7803 Z M64.1858,42.6487 C61.3341,43.0364 58.6894,41.075 58.2985,38.2241 C57.9075,35.3961 59.8853,32.7732 62.76,32.3855 C65.6116,31.9978 68.2563,33.9592 68.6473,36.8101 C69.0382,39.661 67.0375,42.261 64.1858,42.6487 Z" id="Shape"></path>
    77        </g>
  • emailoctopus/trunk/public/images/logo.svg

    r2774938 r2818433  
    1 <svg width="489" height="153" viewBox="0 0 489 153" fill="none" xmlns="http://www.w3.org/2000/svg">
     1<svg width="100%" height="100%" viewBox="0 0 489 153" fill="none" xmlns="http://www.w3.org/2000/svg">
    22<path d="M149.441 91.0953H134.286V83.2378H146.006C146.976 83.2378 147.539 82.7938 147.849 82.427C148.237 81.9637 148.431 81.3845 148.431 80.7667V78.2183C148.431 77.5812 148.237 77.0021 147.849 76.5387C147.539 76.1719 146.976 75.7279 146.006 75.7279H134.286V67.716H149.324C150.294 67.716 150.857 67.272 151.168 66.9052C151.556 66.4418 151.75 65.8626 151.75 65.2449V62.6965C151.75 62.0594 151.556 61.4802 151.168 61.0169C150.857 60.6501 150.294 60.2061 149.324 60.2061H128.503C127.805 60.2061 127.164 60.4956 126.679 61.0555C126.233 61.5575 126 62.1945 126 62.8703V95.9796C126 96.6554 126.233 97.2731 126.66 97.7944C127.145 98.3543 127.766 98.6632 128.484 98.6632H149.441C150.411 98.6632 150.973 98.2191 151.284 97.8523C151.672 97.389 151.866 96.8098 151.866 96.192V93.605C151.866 92.968 151.672 92.3888 151.284 91.9254C150.973 91.5393 150.411 91.0953 149.441 91.0953Z" fill="#6E54D7"/>
    33<path d="M196.709 73.2762C195.991 72.0214 194.904 70.9981 193.449 70.2452C192.033 69.4923 190.538 69.1255 189.005 69.1255C187.57 69.1255 186.328 69.2606 185.338 69.5502C183.107 70.2066 181.205 71.4615 179.672 73.2569C178.158 70.5541 175.5 69.1448 171.833 69.1448C170.746 69.1448 169.698 69.2992 168.689 69.5888C166.652 70.2066 164.944 71.307 163.586 72.8515C163.411 72.2723 163.217 71.7897 163.023 71.3843C162.518 70.3224 161.509 69.7433 160.171 69.7433H158.87C157.143 69.7433 156.076 70.8437 156.076 72.6005C156.076 72.8322 156.115 73.3148 156.406 75.0331C156.6 76.2107 156.697 78.373 156.697 81.4619V95.9412C156.697 96.6748 156.949 97.3312 157.434 97.8525C157.784 98.2193 158.444 98.6633 159.53 98.6633H161.975C163.081 98.6633 163.741 98.2193 164.071 97.8332C164.536 97.3312 164.769 96.6748 164.769 95.9605V83.3731C164.769 81.3267 165.351 79.6471 166.555 78.2957C167.641 77.0409 168.844 76.4424 170.222 76.4424C171.716 76.4424 172.298 77.0022 172.589 77.4463C173.152 78.2378 173.424 79.5313 173.424 81.3074V95.9798C173.424 96.7134 173.676 97.3698 174.161 97.8911C174.666 98.4317 175.403 98.7019 176.334 98.7019H178.663C179.769 98.7019 180.409 98.2579 180.759 97.8911C181.244 97.3698 181.496 96.7134 181.496 95.9798V83.3925C181.496 81.346 182.078 79.6857 183.301 78.2957C184.368 77.0409 185.571 76.4424 186.949 76.4424C188.443 76.4424 189.025 77.0022 189.316 77.4463C189.879 78.2378 190.15 79.5313 190.15 81.3074V95.9798C190.15 96.7134 190.403 97.3698 190.888 97.8911C191.392 98.4317 192.13 98.7019 193.061 98.7019H195.39C196.496 98.7019 197.136 98.2579 197.485 97.8911C197.97 97.3698 198.223 96.7134 198.223 95.9798V81.5005C198.223 79.9946 198.145 78.566 197.97 77.2532C197.815 75.786 197.388 74.4539 196.709 73.2762Z" fill="#6E54D7"/>
  • emailoctopus/trunk/public/views/page-form.php

    r2774938 r2818433  
    146146                                </p>
    147147                                <div class="emailoctopus-form-shortcode code">
    148                                     <?php printf( '[emailoctopus form_id="%s"]', $form_id ); ?>
     148                                    <?php echo sprintf('[emailoctopus form_id="%s"]', esc_html($form_id) ); ?>
    149149                                </div>
    150150                            </td>
  • emailoctopus/trunk/readme.txt

    r2780110 r2818433  
    44Tags: email marketing, collect emails, emailoctopus, emailoctopus form, emailoctopus plugin, email, email octopus, email form, marketing, newsletter, signup form, subscribers, subscription, widget, email plugin, list builder, amazon ses
    55Requires at least: 5.0
    6 Tested up to: 6.0
    7 Stable tag: 3.0
     6Tested up to: 6.1
     7Stable tag: 3.1
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    4343
    44441. View all of your forms in the WordPress admin panel.
    45 1. Configure the display settings for an individual form.
     452. Configure the display settings for an individual form.
     463. Add forms using a Gutenberg block.
    4647
    4748== Changelog ==
     49
     50= 3.1.0 =
     51* Re-adds support for Gutenberg block.
     52* Makes shortcodes easier to copy.
     53* Bug fixes and improvements.
    4854
    4955= 3.0.1 =
     
    146152== Upgrade Notice ==
    147153
     154= 3.1.0 =
     155Re-adds support for Gutenberg block.
     156Makes shortcodes easier to copy.
     157Bug fixes and improvements.
     158
    148159= 3.0.1 =
    149160Bug fixes and improvements.
  • emailoctopus/trunk/src/Admin.php

    r2774938 r2818433  
    143143        ];
    144144
    145         wp_register_script('emailoctopus_page_api_key', Utils::get_plugin_url('public/js/page-settings.js'), [
     145        wp_register_script('emailoctopus_page_api_key', Utils::get_plugin_url('public/build/page-settings.js'), [
    146146            'jquery',
    147147            'wp-ajax-response',
    148148        ], EMAILOCTOPUS_VERSION, true);
    149149
    150         wp_register_script('emailoctopus_page_form', Utils::get_plugin_url('public/js/page-form.js'), ['jquery'], EMAILOCTOPUS_VERSION, true);
    151         wp_register_script('emailoctopus_page_forms', Utils::get_plugin_url('public/js/page-forms.js'), ['jquery'], EMAILOCTOPUS_VERSION, true);
     150        wp_register_script('emailoctopus_page_form', Utils::get_plugin_url('public/build/page-form.js'), ['jquery'], EMAILOCTOPUS_VERSION, true);
     151        wp_register_script('emailoctopus_page_forms', Utils::get_plugin_url('public/build/page-forms.js'), ['jquery'], EMAILOCTOPUS_VERSION, true);
    152152
    153153        // Make l10n data available to each page's script.
  • emailoctopus/trunk/src/Deprecated.php

    r2774938 r2818433  
    2828     * Ensures that legacy block still output form content on front-end.
    2929     *
    30      * @param $pre_render
    31      * @param $parsed_block
    32      *
    3330     * @return string
    3431     */
     
    5350        if (function_exists('register_block_type')) {
    5451            register_block_type(
    55                 EMAILOCTOPUS_DIR . '/public/js/',
     52                EMAILOCTOPUS_DIR . 'src/json/legacy-block.json',
    5653                [
    5754                    'render_callback' => function ($attributes) {
     
    7269        wp_enqueue_script(
    7370            'emailoctopus_block',
    74             Utils::get_plugin_url('public/js/block.js'),
     71            Utils::get_plugin_url('public/build/legacy-block.js'),
    7572            [
    7673                'wp-blocks',
     
    9188            [
    9289                'rest_url' => esc_url(rest_url('emailoctopus/v1')),
    93                 'svg' => Utils::get_icon_url(),
     90                'svg' => Utils::get_icon_monochrome_url(),
    9491                'nonce' => wp_create_nonce('wp_rest'),
    9592                'loading' => __('Loading…', 'emailoctopus'),
     
    167164                    self::get_form_meta($form_id, 'text_color')
    168165                );
    169             break;
     166                break;
    170167
    171168            case 'light':
    172169                $settings['main_class_names'][] = 'emailoctopus-theme-light';
    173             break;
     170                break;
    174171
    175172            case 'dark':
    176173                $settings['main_class_names'][] = 'emailoctopus-theme-dark';
    177             break;
     174                break;
    178175        }
    179176
     
    193190        } ?>
    194191
    195         <div
    196             class="<?php echo esc_attr(implode(' ', $main_class_names)); ?>" <?php echo $settings['appearance'] === 'custom' ? sprintf('style="%s"', implode(' ', $settings['main_class_styles'])) : ''; ?>>
    197 
    198             <form method="post" action="https://emailoctopus.com/lists/<?php echo esc_attr($settings['list_id']); ?>/members/external-add"
    199                   class="emailoctopus-form">
    200 
    201                 <div class="emailoctopus-form-textarea-hidden" aria-hidden="true">
    202                     <textarea class="emailoctopus-form-textarea-hidden" name="message_consent_required"
    203                               aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_consent_required'])); ?></textarea>
    204                     <textarea class="emailoctopus-form-textarea-hidden" name="message_missing_email"
    205                               aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_missing_email'])); ?></textarea>
    206                     <textarea class="emailoctopus-form-textarea-hidden" name="message_invalid_email"
    207                               aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_invalid_email'])); ?></textarea>
    208                     <textarea class="emailoctopus-form-textarea-hidden" name="message_bot"
    209                               aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_bot'])); ?></textarea>
    210                     <textarea class="emailoctopus-form-textarea-hidden" name="message_success"
    211                               aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_success'])); ?></textarea>
    212                 </div>
    213 
    214                 <?php
     192        <div
     193            class="<?php echo esc_attr(implode(' ', $main_class_names)); ?>" <?php echo $settings['appearance'] === 'custom' ? sprintf('style="%s"', implode(' ', $settings['main_class_styles'])) : ''; ?>>
     194
     195            <form method="post" action="https://emailoctopus.com/lists/<?php echo esc_attr($settings['list_id']); ?>/members/external-add"
     196                  class="emailoctopus-form">
     197
     198                <div class="emailoctopus-form-textarea-hidden" aria-hidden="true">
     199                    <textarea class="emailoctopus-form-textarea-hidden" name="message_consent_required"
     200                              aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_consent_required'])); ?></textarea>
     201                    <textarea class="emailoctopus-form-textarea-hidden" name="message_missing_email"
     202                              aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_missing_email'])); ?></textarea>
     203                    <textarea class="emailoctopus-form-textarea-hidden" name="message_invalid_email"
     204                              aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_invalid_email'])); ?></textarea>
     205                    <textarea class="emailoctopus-form-textarea-hidden" name="message_bot"
     206                              aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_bot'])); ?></textarea>
     207                    <textarea class="emailoctopus-form-textarea-hidden" name="message_success"
     208                              aria-hidden="true"><?php echo esc_textarea(wp_kses_post($settings['message_success'])); ?></textarea>
     209                </div>
     210
     211                <?php
    215212                $show_title = isset($settings['show_title']) ? $settings['show_title'] : true;
    216213        $show_description = isset($settings['show_description']) ? $settings['show_description'] : true;
     
    224221        } ?>
    225222
    226                 <p class="emailoctopus__success-message"></p>
    227                 <p class="emailoctopus__error-message"></p>
    228 
    229                 <div class="emailoctopus-form-copy-wrapper">
    230                     <input type="hidden" name="emailoctopus_form_id" value="<?php echo absint($form_id); ?>"/>
    231                     <input type="hidden" name="emailoctopus_list_id" value="<?php echo esc_attr($settings['list_id']); ?>"/>
    232 
    233                     <?php foreach ($settings['custom_fields'] as $custom_field) : ?>
    234 
    235                         <div class="emailoctopus-form-row">
    236 
    237                             <?php
     223                <p class="emailoctopus__success-message"></p>
     224                <p class="emailoctopus__error-message"></p>
     225
     226                <div class="emailoctopus-form-copy-wrapper">
     227                    <input type="hidden" name="emailoctopus_form_id" value="<?php echo absint($form_id); ?>"/>
     228                    <input type="hidden" name="emailoctopus_list_id" value="<?php echo esc_attr($settings['list_id']); ?>"/>
     229
     230                    <?php foreach ($settings['custom_fields'] as $custom_field) : ?>
     231
     232                        <div class="emailoctopus-form-row">
     233
     234                            <?php
    238235                            printf(
    239                                 '<label><span class="emailoctopus-label">%s %s</span><br><input type="%s" name="%s" class="emailoctopus-custom-fields" tabindex="%d" /></label>',
    240                                 esc_html($custom_field['label']),
    241                                 $custom_field['tag'] === 'EmailAddress' ? '<span class="required">*</span>' : '',
    242                                 esc_attr(strtolower($custom_field['type'])),
    243                                 esc_attr($custom_field['tag']),
    244                                 absint($tabindex)
    245                             ); ?>
    246 
    247                         </div>
    248 
    249                         <?php ++$tabindex; ?>
    250                     <?php endforeach; ?>
    251 
    252                     <?php if (isset($settings['show_consent']) && $settings['show_consent']) : ?>
    253                         <div class="emailoctopus-form-row">
    254                             <label>
    255                                 <input type="checkbox" name="consent" class="emailoctopus-consent"
    256                                        tabindex="<?php echo absint($tabindex); ?>"/>&nbsp;<?php echo wp_kses_post($settings['consent_content']); ?>
    257                             </label>
    258                         </div>
    259                         <?php ++$tabindex; ?>
    260                     <?php endif; ?>
    261 
    262                     <div class="emailoctopus-form-row-hp" aria-hidden="true">
    263                         <!-- Do not remove this field, otherwise you risk bot signups -->
    264                         <input type="text" name="hp<?php echo esc_attr($settings['list_id']); ?>" tabindex="-1" autocomplete="nope">
    265                     </div>
    266 
    267                     <div class="emailoctopus-form-row-subscribe">
    268                         <?php if ($settings['redirect']) : ?>
    269                             <?php printf('<input type="hidden" name="successRedirectUrl" class="emailoctopus-success-redirect-url" value="%s" />', esc_attr($settings['redirect_url'])); ?>
    270                         <?php endif; ?>
    271                         <button type="submit" tabindex="<?php echo absint($tabindex); ?>"
    272                                 style="<?php echo $settings['appearance'] === 'custom' ? sprintf('background: %s; color: %s;', esc_attr($settings['button_color']), esc_attr($settings['button_text_color'])) : ''; ?>"><?php echo esc_html($settings['message_submit']); ?></button>
    273                     </div>
    274 
    275                     <?php if (isset($settings['show_branding']) && $settings['show_branding']) : ?>
    276                         <div class="emailoctopus-referral">
    277                             <?php // translators: %s: EmailOctopus home page URL.?>
    278                             <?php echo sprintf(__('Powered by <a href="%s" target="_blank" rel="noopener">EmailOctopus</a>', 'emailoctopus'), 'https://emailoctopus.com?utm_source=form&utm_medium=wordpress_plugin'); ?>
    279                         </div>
    280                     <?php endif; ?>
    281 
    282                 </div>
    283             </form>
    284         </div>
    285 
    286         <?php
     236            '<label><span class="emailoctopus-label">%s %s</span><br><input type="%s" name="%s" class="emailoctopus-custom-fields" tabindex="%d" /></label>',
     237            esc_html($custom_field['label']),
     238            $custom_field['tag'] === 'EmailAddress' ? '<span class="required">*</span>' : '',
     239            esc_attr(strtolower($custom_field['type'])),
     240            esc_attr($custom_field['tag']),
     241            absint($tabindex)
     242        ); ?>
     243
     244                        </div>
     245
     246                        <?php ++$tabindex; ?>
     247                    <?php endforeach; ?>
     248
     249                    <?php if (isset($settings['show_consent']) && $settings['show_consent']) : ?>
     250                        <div class="emailoctopus-form-row">
     251                            <label>
     252                                <input type="checkbox" name="consent" class="emailoctopus-consent"
     253                                       tabindex="<?php echo absint($tabindex); ?>"/>&nbsp;<?php echo wp_kses_post($settings['consent_content']); ?>
     254                            </label>
     255                        </div>
     256                        <?php ++$tabindex; ?>
     257                    <?php endif; ?>
     258
     259                    <div class="emailoctopus-form-row-hp" aria-hidden="true">
     260                        <!-- Do not remove this field, otherwise you risk bot signups -->
     261                        <input type="text" name="hp<?php echo esc_attr($settings['list_id']); ?>" tabindex="-1" autocomplete="nope">
     262                    </div>
     263
     264                    <div class="emailoctopus-form-row-subscribe">
     265                        <?php if ($settings['redirect']) : ?>
     266                            <?php printf('<input type="hidden" name="successRedirectUrl" class="emailoctopus-success-redirect-url" value="%s" />', esc_attr($settings['redirect_url'])); ?>
     267                        <?php endif; ?>
     268                        <button type="submit" tabindex="<?php echo absint($tabindex); ?>"
     269                                style="<?php echo $settings['appearance'] === 'custom' ? sprintf('background: %s; color: %s;', esc_attr($settings['button_color']), esc_attr($settings['button_text_color'])) : ''; ?>"><?php echo esc_html($settings['message_submit']); ?></button>
     270                    </div>
     271
     272                    <?php if (isset($settings['show_branding']) && $settings['show_branding']) : ?>
     273                        <div class="emailoctopus-referral">
     274                            <?php // translators: %s: EmailOctopus home page URL.?>
     275                            <?php echo sprintf(__('Powered by <a href="%s" target="_blank" rel="noopener">EmailOctopus</a>', 'emailoctopus'), 'https://emailoctopus.com?utm_source=form&utm_medium=wordpress_plugin'); ?>
     276                        </div>
     277                    <?php endif; ?>
     278
     279                </div>
     280            </form>
     281        </div>
     282
     283        <?php
    287284    }
    288285
  • emailoctopus/trunk/src/Form.php

    r2774938 r2818433  
    4141    {
    4242        if (empty($form_id)) {
    43             $this->errors[] = esc_html__('Invalid form ID', 'emailoctopus');
     43            // Nothing to render: form not selected yet.
     44            return;
    4445        }
    4546
     
    6263                return;
    6364            }
     65        }
     66
     67        if ($this->has_errors()) {
     68            return;
    6469        }
    6570
     
    229234        if ($this->has_errors()) {
    230235            ?>
    231             <div class="emailoctopus-form-error" role="alert">
    232                 <p><?php esc_html_e('Error: Could not render the form.', 'emailoctopus'); ?></p>
    233                 <ul>
    234                     <?php foreach ($this->errors as $error) : ?>
    235                         <li><?php echo $error; ?></li>
    236                     <?php endforeach; ?>
    237                 </ul>
    238             </div>
    239             <?php
     236            <div class="emailoctopus-form-error" role="alert">
     237                <p>
     238                    <?php
     239                    esc_html_e('This EmailOctopus form cannot be rendered.', 'emailoctopus');
     240            if (is_user_logged_in()) {
     241                echo ' ' . esc_html__('Errors:', 'emailoctopus');
     242            } ?>
     243                </p>
     244                <?php
     245                if (is_user_logged_in()) {
     246                    echo '<ul>';
     247                    foreach ($this->errors as $error) {
     248                        echo sprintf(
     249                            '<li>%s: %s</li>',
     250                            isset($error->code) ? esc_html($error->code) : '',
     251                            isset($error->message) ? esc_html($error->message) : ''
     252                        );
     253                    }
     254                    echo '</ul>';
     255                } ?>
     256            </div>
     257            <?php
    240258
    241259            return;
     
    250268    public function is_deprecated_form(): bool
    251269    {
    252         return $this->is_deprecated_form ?? false;
     270        return $this->is_deprecated_form;
    253271    }
    254272}
  • emailoctopus/trunk/src/Frontend.php

    r2774938 r2818433  
    3131        add_shortcode('emailoctopus', [$this, 'render_shortcode']);
    3232
    33         add_action('the_content', [$this, 'maybe_add_inline_forms_at_content_top']);
    34         add_action('the_content', [$this, 'maybe_add_inline_forms_at_content_bottom']);
     33        add_filter('the_content', [$this, 'maybe_add_inline_forms_at_content_top']);
     34        add_filter('the_content', [$this, 'maybe_add_inline_forms_at_content_bottom']);
    3535
    3636        add_action('wp_footer', [$this, 'maybe_add_non_inline_forms'], 999);
     
    4040     * Registers custom styles and scripts for use on frontend; enqueued only when needed from within the shortcode.
    4141     */
    42     public function register_scripts_and_styles()
     42    public function register_scripts_and_styles(): void
    4343    {
    4444        wp_register_script(
    4545            'emailoctopus_frontend',
    46             Utils::get_plugin_url('public/js/legacy-frontend.js'),
     46            Utils::get_plugin_url('public/build/legacy-frontend.js'),
    4747            ['jquery'],
    4848            EMAILOCTOPUS_VERSION,
  • emailoctopus/trunk/src/Plugin.php

    r2774938 r2818433  
    5959            ( new Admin() )->run();
    6060        }
     61
     62        new Gutenberg();
    6163    }
    6264
     
    8486    public function activation_redirect($plugin)
    8587    {
    86         if ($plugin == plugin_basename(EMAILOCTOPUS_FILE)) {
     88        if ($plugin === plugin_basename(EMAILOCTOPUS_FILE)) {
    8789            wp_safe_redirect(admin_url('admin.php?page=emailoctopus-forms'));
    8890            exit;
     
    107109
    108110    /**
    109      * The private emailoctopus_form post type allows relating emailoctopus.com form IDs to WP taxonomies, etc.
     111     * The private emailoctopus_form post type allows the mapping of emailoctopus.com form IDs to WP taxonomies, etc.
    110112     *
    111113     * @return void
     
    120122                    'singular_name' => esc_html__('EmailOctopus Form', 'emailoctopus'),
    121123                ],
    122                 'description' => esc_html__('Private post type for relating EmailOctopus.com form data with the WordPress site.', 'emailoctopus'),
     124                'description' => esc_html__('Private post type for mapping emailoctopus.com form data with that in WordPress.', 'emailoctopus'),
    123125                'public' => false,
    124126                'show_in_rest' => false,
  • emailoctopus/trunk/src/Utils.php

    r2780110 r2818433  
    109109
    110110    /**
     111     * Returns a URL for the monochrome plugin icon.
     112     *
     113     * @return string URL
     114     */
     115    public static function get_icon_monochrome_url(): string
     116    {
     117        return self::get_plugin_url('public/images/icon-monochrome.svg');
     118    }
     119
     120    /**
    111121     * Returns the SVG code for the plugin icon.
    112122     *
     
    136146
    137147        foreach ($wpdb->get_col('SHOW TABLES', 0) as $table_name) {
    138             if (false !== strpos($table_name, 'emailoctopus')) {
     148            if (strpos($table_name, 'emailoctopus') !== false) {
    139149                return true;
    140150            }
  • emailoctopus/trunk/src/Widget.php

    r2774938 r2818433  
    111111                    $settings['main_class_names'][] = 'emailoctopus-custom-colors';
    112112
    113                 break;
     113                    break;
    114114                case 'light':
    115115                    $settings['main_class_names'][] = 'emailoctopus-theme-light';
    116                 break;
     116                    break;
    117117                case 'dark':
    118118                    $settings['main_class_names'][] = 'emailoctopus-theme-dark';
    119                 break;
     119                    break;
    120120            }
    121121            if (!empty($settings['classname'])) {
  • emailoctopus/trunk/vendor/autoload.php

    r2780110 r2818433  
    1010require_once __DIR__ . '/composer/autoload_real.php';
    1111
    12 return ComposerAutoloaderInit448857686628a2233bb26e385680b6cf::getLoader();
     12return ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19::getLoader();
  • emailoctopus/trunk/vendor/composer/autoload_classmap.php

    r2774938 r2818433  
    1616    'EmailOctopus\\Form' => $baseDir . '/src/Form.php',
    1717    'EmailOctopus\\Frontend' => $baseDir . '/src/Frontend.php',
     18    'EmailOctopus\\Gutenberg' => $baseDir . '/src/Gutenberg.php',
    1819    'EmailOctopus\\Plugin' => $baseDir . '/src/Plugin.php',
    1920    'EmailOctopus\\Utils' => $baseDir . '/src/Utils.php',
  • emailoctopus/trunk/vendor/composer/autoload_real.php

    r2780110 r2818433  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit448857686628a2233bb26e385680b6cf
     5class ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit448857686628a2233bb26e385680b6cf', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit448857686628a2233bb26e385680b6cf', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInit448857686628a2233bb26e385680b6cf::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::getInitializer($loader));
    3131
    3232        $loader->setClassMapAuthoritative(true);
  • emailoctopus/trunk/vendor/composer/autoload_static.php

    r2780110 r2818433  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit448857686628a2233bb26e385680b6cf
     7class ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3131        'EmailOctopus\\Form' => __DIR__ . '/../..' . '/src/Form.php',
    3232        'EmailOctopus\\Frontend' => __DIR__ . '/../..' . '/src/Frontend.php',
     33        'EmailOctopus\\Gutenberg' => __DIR__ . '/../..' . '/src/Gutenberg.php',
    3334        'EmailOctopus\\Plugin' => __DIR__ . '/../..' . '/src/Plugin.php',
    3435        'EmailOctopus\\Utils' => __DIR__ . '/../..' . '/src/Utils.php',
     
    3940    {
    4041        return \Closure::bind(function () use ($loader) {
    41             $loader->prefixLengthsPsr4 = ComposerStaticInit448857686628a2233bb26e385680b6cf::$prefixLengthsPsr4;
    42             $loader->prefixDirsPsr4 = ComposerStaticInit448857686628a2233bb26e385680b6cf::$prefixDirsPsr4;
    43             $loader->classMap = ComposerStaticInit448857686628a2233bb26e385680b6cf::$classMap;
     42            $loader->prefixLengthsPsr4 = ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::$prefixLengthsPsr4;
     43            $loader->prefixDirsPsr4 = ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::$prefixDirsPsr4;
     44            $loader->classMap = ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::$classMap;
    4445
    4546        }, null, ClassLoader::class);
  • emailoctopus/trunk/vendor/composer/installed.php

    r2780110 r2818433  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'cf62990660ec0f4feb16b8428c27d245a54671c4',
     6        'reference' => 'ff50101de1212fc6e65e1268eb776a084501621b',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'cf62990660ec0f4feb16b8428c27d245a54671c4',
     16            'reference' => 'ff50101de1212fc6e65e1268eb776a084501621b',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.