Changeset 2818433
- Timestamp:
- 11/15/2022 04:07:27 PM (3 years ago)
- Location:
- emailoctopus
- Files:
-
- 34 added
- 3 deleted
- 19 edited
-
assets/screenshot-3.png (added)
-
trunk/composer.json (deleted)
-
trunk/composer.lock (deleted)
-
trunk/emailoctopus.php (modified) (2 diffs)
-
trunk/languages/emailoctopus.pot (modified) (11 diffs)
-
trunk/public/build (added)
-
trunk/public/build/block-preview.asset.php (added)
-
trunk/public/build/block-preview.js (added)
-
trunk/public/build/block.asset.php (added)
-
trunk/public/build/block.css (added)
-
trunk/public/build/block.js (added)
-
trunk/public/build/json (added)
-
trunk/public/build/json/block.json (added)
-
trunk/public/build/legacy-block.asset.php (added)
-
trunk/public/build/legacy-block.js (added)
-
trunk/public/build/legacy-frontend.asset.php (added)
-
trunk/public/build/legacy-frontend.js (added)
-
trunk/public/build/page-form.asset.php (added)
-
trunk/public/build/page-form.js (added)
-
trunk/public/build/page-forms.asset.php (added)
-
trunk/public/build/page-forms.js (added)
-
trunk/public/build/page-settings.asset.php (added)
-
trunk/public/build/page-settings.js (added)
-
trunk/public/css/admin.css (modified) (1 diff)
-
trunk/public/images/icon-monochrome.svg (added)
-
trunk/public/images/icon.svg (modified) (1 diff)
-
trunk/public/images/logo.svg (modified) (1 diff)
-
trunk/public/js (deleted)
-
trunk/public/views/page-form.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/Admin.php (modified) (1 diff)
-
trunk/src/Deprecated.php (modified) (7 diffs)
-
trunk/src/Form.php (modified) (4 diffs)
-
trunk/src/Frontend.php (modified) (2 diffs)
-
trunk/src/Gutenberg.php (added)
-
trunk/src/Plugin.php (modified) (4 diffs)
-
trunk/src/Utils.php (modified) (2 diffs)
-
trunk/src/Widget.php (modified) (1 diff)
-
trunk/src/js (added)
-
trunk/src/js/block-preview.js (added)
-
trunk/src/js/block.js (added)
-
trunk/src/js/legacy-block.js (added)
-
trunk/src/js/legacy-frontend.js (added)
-
trunk/src/js/page-form.js (added)
-
trunk/src/js/page-forms.js (added)
-
trunk/src/js/page-settings.js (added)
-
trunk/src/json (added)
-
trunk/src/json/block.json (added)
-
trunk/src/json/legacy-block.json (added)
-
trunk/src/scss (added)
-
trunk/src/scss/block.scss (added)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
emailoctopus/trunk/emailoctopus.php
r2780110 r2818433 4 4 * Plugin URI: https://emailoctopus.com 5 5 * Description: Email marketing widget; easily add subscribers to an EmailOctopus list. Fully customisable. 6 * Version: 3. 0.16 * Version: 3.1.0 7 7 * Author: EmailOctopus 8 8 * Author URI: https://emailoctopus.com … … 21 21 22 22 if ( 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' ) ); 26 26 } 27 27 28 define( 'EMAILOCTOPUS_VERSION', '3. 0.1' );28 define( 'EMAILOCTOPUS_VERSION', '3.1.0' ); 29 29 define( 'EMAILOCTOPUS_FILE', __FILE__ ); 30 30 define( 'EMAILOCTOPUS_DIR', plugin_dir_path( EMAILOCTOPUS_FILE ) ); -
emailoctopus/trunk/languages/emailoctopus.pot
r2780110 r2818433 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: EmailOctopus 3. 0.1\n"5 "Project-Id-Version: EmailOctopus 3.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/emailoctopus-wordpress-plugin\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "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" 15 15 "X-Domain: emailoctopus\n" 16 16 … … 19 19 #: src/Admin.php:170 20 20 #: src/Admin.php:171 21 #: src/Gutenberg.php:50 21 22 msgid "EmailOctopus" 22 23 msgstr "" … … 56 57 57 58 #: public/views/component-welcome.php:18 59 #: src/Gutenberg.php:70 58 60 msgid "Create an account for free" 59 61 msgstr "" 60 62 61 63 #: public/views/component-welcome.php:21 64 #: src/Gutenberg.php:74 62 65 msgid "Connect an existing account" 63 66 msgstr "" … … 102 105 #: public/views/page-forms.php:85 103 106 #: public/views/page-forms.php:117 107 #: src/Gutenberg.php:90 104 108 msgid "Form" 105 109 msgstr "" … … 107 111 #: public/views/page-form.php:91 108 112 #: public/views/page-form.php:125 113 #: src/Gutenberg.php:88 114 #: src/Gutenberg.php:157 109 115 msgid "Untitled" 110 116 msgstr "" 111 117 112 118 #: public/views/page-form.php:95 119 #: src/Gutenberg.php:160 113 120 msgid "hello bar" 114 121 msgstr "" 115 122 116 123 #: public/views/page-form.php:98 124 #: src/Gutenberg.php:163 117 125 msgid "inline" 118 126 msgstr "" 119 127 120 128 #: public/views/page-form.php:101 129 #: src/Gutenberg.php:166 121 130 msgid "pop-up" 122 131 msgstr "" 123 132 124 133 #: public/views/page-form.php:104 134 #: src/Gutenberg.php:169 125 135 msgid "slide-in" 126 136 msgstr "" … … 184 194 #: public/views/page-forms.php:119 185 195 #: src/Admin.php:117 196 #: src/Gutenberg.php:99 186 197 msgid "Display settings" 187 198 msgstr "" … … 231 242 232 243 #: src/Admin.php:116 244 #: src/Gutenberg.php:100 233 245 msgid "View on EmailOctopus" 234 246 msgstr "" … … 296 308 msgstr "" 297 309 298 #: src/Deprecated.php:9 5310 #: src/Deprecated.php:92 299 311 msgid "Loading…" 300 312 msgstr "" 301 313 302 314 #. translators: %s: EmailOctopus home page URL. 303 #: src/Deprecated.php:27 8315 #: src/Deprecated.php:275 304 316 msgid "Powered by <a href=\"%s\" target=\"_blank\" rel=\"noopener\">EmailOctopus</a>" 305 317 msgstr "" 306 318 307 #: src/Form.php: 43308 msgid " Invalid form ID"309 msgstr "" 310 311 #: src/Form.php:2 32312 msgid "Error : Could not render the form."319 #: src/Form.php:239 320 msgid "This EmailOctopus form cannot be rendered." 321 msgstr "" 322 323 #: src/Form.php:241 324 msgid "Errors:" 313 325 msgstr "" 314 326 … … 317 329 msgstr "" 318 330 319 #: src/Plugin.php:119 320 #: src/Plugin.php:120 331 #: src/Gutenberg.php:67 332 msgid "To use this block, create an EmailOctopus account or connect an existing one." 333 msgstr "" 334 335 #. translators: %s - create form link 336 #: src/Gutenberg.php:80 337 msgid "No forms yet. %s." 338 msgstr "" 339 340 #: src/Gutenberg.php:81 341 msgid "Create one" 342 msgstr "" 343 344 #: src/Gutenberg.php:89 345 msgid "General" 346 msgstr "" 347 348 #: src/Gutenberg.php:92 349 msgid "Select a form using the sidebar." 350 msgstr "" 351 352 #. translators: %1$s - form name, %2$s - form type 353 #: src/Gutenberg.php:94 354 msgid "%1$s (%2$s)" 355 msgstr "" 356 357 #: src/Gutenberg.php:95 358 msgid "Click preview or publish to view." 359 msgstr "" 360 361 #. translators: %s - form_id 362 #: src/Gutenberg.php:97 363 msgid "Error: could not load form %s from the API." 364 msgstr "" 365 366 #: src/Gutenberg.php:151 367 msgid "None" 368 msgstr "" 369 370 #: src/Plugin.php:121 371 #: src/Plugin.php:122 321 372 #: src/Widget.php:37 322 373 msgid "EmailOctopus Form" 323 374 msgstr "" 324 375 325 #: src/Plugin.php:12 2326 msgid "Private post type for relating EmailOctopus.com form data with the WordPress site."376 #: src/Plugin.php:124 377 msgid "Private post type for mapping emailoctopus.com form data with that in WordPress." 327 378 msgstr "" 328 379 … … 335 386 msgstr "" 336 387 337 #: public/js/block.json 388 #: public/build/block.js:1 389 #: src/js/block-preview.js:50 390 msgid "A server error occurred." 391 msgstr "" 392 393 #: public/build/block.js:1 394 #: src/js/block-preview.js:93 395 msgid "EmailOctopus Form Preview" 396 msgstr "" 397 398 #: public/build/json/block.json 399 #: src/json/block.json 338 400 msgctxt "block title" 339 401 msgid "EmailOctopus Form" 340 402 msgstr "" 403 404 #: public/build/json/block.json 405 #: src/json/block.json 406 msgctxt "block description" 407 msgid "Add an EmailOctopus Form." 408 msgstr "" 409 410 #: public/build/json/block.json 411 #: src/json/block.json 412 msgctxt "block keyword" 413 msgid "emailoctopus" 414 msgstr "" 415 416 #: public/build/json/block.json 417 #: src/json/block.json 418 msgctxt "block keyword" 419 msgid "email octopus" 420 msgstr "" 421 422 #: public/build/json/block.json 423 #: src/json/block.json 424 msgctxt "block keyword" 425 msgid "form" 426 msgstr "" -
emailoctopus/trunk/public/css/admin.css
r2774938 r2818433 194 194 */ 195 195 .emailoctopus-form-shortcode { 196 white-space: nowrap;197 196 margin-top: 10px; 197 user-select: all; 198 198 } 199 199 -
emailoctopus/trunk/public/images/icon.svg
r2774938 r2818433 2 2 <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"> 3 3 <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"> 6 6 <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> 7 7 </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"> 2 2 <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"/> 3 3 <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 146 146 </p> 147 147 <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) ); ?> 149 149 </div> 150 150 </td> -
emailoctopus/trunk/readme.txt
r2780110 r2818433 4 4 Tags: 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 5 5 Requires at least: 5.0 6 Tested up to: 6. 07 Stable tag: 3. 06 Tested up to: 6.1 7 Stable tag: 3.1 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 43 43 44 44 1. View all of your forms in the WordPress admin panel. 45 1. Configure the display settings for an individual form. 45 2. Configure the display settings for an individual form. 46 3. Add forms using a Gutenberg block. 46 47 47 48 == Changelog == 49 50 = 3.1.0 = 51 * Re-adds support for Gutenberg block. 52 * Makes shortcodes easier to copy. 53 * Bug fixes and improvements. 48 54 49 55 = 3.0.1 = … … 146 152 == Upgrade Notice == 147 153 154 = 3.1.0 = 155 Re-adds support for Gutenberg block. 156 Makes shortcodes easier to copy. 157 Bug fixes and improvements. 158 148 159 = 3.0.1 = 149 160 Bug fixes and improvements. -
emailoctopus/trunk/src/Admin.php
r2774938 r2818433 143 143 ]; 144 144 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'), [ 146 146 'jquery', 147 147 'wp-ajax-response', 148 148 ], EMAILOCTOPUS_VERSION, true); 149 149 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); 152 152 153 153 // Make l10n data available to each page's script. -
emailoctopus/trunk/src/Deprecated.php
r2774938 r2818433 28 28 * Ensures that legacy block still output form content on front-end. 29 29 * 30 * @param $pre_render31 * @param $parsed_block32 *33 30 * @return string 34 31 */ … … 53 50 if (function_exists('register_block_type')) { 54 51 register_block_type( 55 EMAILOCTOPUS_DIR . ' /public/js/',52 EMAILOCTOPUS_DIR . 'src/json/legacy-block.json', 56 53 [ 57 54 'render_callback' => function ($attributes) { … … 72 69 wp_enqueue_script( 73 70 'emailoctopus_block', 74 Utils::get_plugin_url('public/ js/block.js'),71 Utils::get_plugin_url('public/build/legacy-block.js'), 75 72 [ 76 73 'wp-blocks', … … 91 88 [ 92 89 'rest_url' => esc_url(rest_url('emailoctopus/v1')), 93 'svg' => Utils::get_icon_ url(),90 'svg' => Utils::get_icon_monochrome_url(), 94 91 'nonce' => wp_create_nonce('wp_rest'), 95 92 'loading' => __('Loading…', 'emailoctopus'), … … 167 164 self::get_form_meta($form_id, 'text_color') 168 165 ); 169 break;166 break; 170 167 171 168 case 'light': 172 169 $settings['main_class_names'][] = 'emailoctopus-theme-light'; 173 break;170 break; 174 171 175 172 case 'dark': 176 173 $settings['main_class_names'][] = 'emailoctopus-theme-dark'; 177 break;174 break; 178 175 } 179 176 … … 193 190 } ?> 194 191 195 <div196 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 <?php192 <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 215 212 $show_title = isset($settings['show_title']) ? $settings['show_title'] : true; 216 213 $show_description = isset($settings['show_description']) ? $settings['show_description'] : true; … … 224 221 } ?> 225 222 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 <?php223 <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 238 235 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); ?>"/> <?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 <?php236 '<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); ?>"/> <?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 287 284 } 288 285 -
emailoctopus/trunk/src/Form.php
r2774938 r2818433 41 41 { 42 42 if (empty($form_id)) { 43 $this->errors[] = esc_html__('Invalid form ID', 'emailoctopus'); 43 // Nothing to render: form not selected yet. 44 return; 44 45 } 45 46 … … 62 63 return; 63 64 } 65 } 66 67 if ($this->has_errors()) { 68 return; 64 69 } 65 70 … … 229 234 if ($this->has_errors()) { 230 235 ?> 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 240 258 241 259 return; … … 250 268 public function is_deprecated_form(): bool 251 269 { 252 return $this->is_deprecated_form ?? false;270 return $this->is_deprecated_form; 253 271 } 254 272 } -
emailoctopus/trunk/src/Frontend.php
r2774938 r2818433 31 31 add_shortcode('emailoctopus', [$this, 'render_shortcode']); 32 32 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']); 35 35 36 36 add_action('wp_footer', [$this, 'maybe_add_non_inline_forms'], 999); … … 40 40 * Registers custom styles and scripts for use on frontend; enqueued only when needed from within the shortcode. 41 41 */ 42 public function register_scripts_and_styles() 42 public function register_scripts_and_styles(): void 43 43 { 44 44 wp_register_script( 45 45 'emailoctopus_frontend', 46 Utils::get_plugin_url('public/ js/legacy-frontend.js'),46 Utils::get_plugin_url('public/build/legacy-frontend.js'), 47 47 ['jquery'], 48 48 EMAILOCTOPUS_VERSION, -
emailoctopus/trunk/src/Plugin.php
r2774938 r2818433 59 59 ( new Admin() )->run(); 60 60 } 61 62 new Gutenberg(); 61 63 } 62 64 … … 84 86 public function activation_redirect($plugin) 85 87 { 86 if ($plugin == plugin_basename(EMAILOCTOPUS_FILE)) {88 if ($plugin === plugin_basename(EMAILOCTOPUS_FILE)) { 87 89 wp_safe_redirect(admin_url('admin.php?page=emailoctopus-forms')); 88 90 exit; … … 107 109 108 110 /** 109 * The private emailoctopus_form post type allows relatingemailoctopus.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. 110 112 * 111 113 * @return void … … 120 122 'singular_name' => esc_html__('EmailOctopus Form', 'emailoctopus'), 121 123 ], 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'), 123 125 'public' => false, 124 126 'show_in_rest' => false, -
emailoctopus/trunk/src/Utils.php
r2780110 r2818433 109 109 110 110 /** 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 /** 111 121 * Returns the SVG code for the plugin icon. 112 122 * … … 136 146 137 147 foreach ($wpdb->get_col('SHOW TABLES', 0) as $table_name) { 138 if ( false !== strpos($table_name, 'emailoctopus')) {148 if (strpos($table_name, 'emailoctopus') !== false) { 139 149 return true; 140 150 } -
emailoctopus/trunk/src/Widget.php
r2774938 r2818433 111 111 $settings['main_class_names'][] = 'emailoctopus-custom-colors'; 112 112 113 break;113 break; 114 114 case 'light': 115 115 $settings['main_class_names'][] = 'emailoctopus-theme-light'; 116 break;116 break; 117 117 case 'dark': 118 118 $settings['main_class_names'][] = 'emailoctopus-theme-dark'; 119 break;119 break; 120 120 } 121 121 if (!empty($settings['classname'])) { -
emailoctopus/trunk/vendor/autoload.php
r2780110 r2818433 10 10 require_once __DIR__ . '/composer/autoload_real.php'; 11 11 12 return ComposerAutoloaderInit 448857686628a2233bb26e385680b6cf::getLoader();12 return ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19::getLoader(); -
emailoctopus/trunk/vendor/composer/autoload_classmap.php
r2774938 r2818433 16 16 'EmailOctopus\\Form' => $baseDir . '/src/Form.php', 17 17 'EmailOctopus\\Frontend' => $baseDir . '/src/Frontend.php', 18 'EmailOctopus\\Gutenberg' => $baseDir . '/src/Gutenberg.php', 18 19 'EmailOctopus\\Plugin' => $baseDir . '/src/Plugin.php', 19 20 'EmailOctopus\\Utils' => $baseDir . '/src/Utils.php', -
emailoctopus/trunk/vendor/composer/autoload_real.php
r2780110 r2818433 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 448857686628a2233bb26e385680b6cf5 class ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 448857686628a2233bb26e385680b6cf', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 448857686628a2233bb26e385680b6cf', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderIniteb7156abdf9ecc04b92ad73799c5db19', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 448857686628a2233bb26e385680b6cf::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); -
emailoctopus/trunk/vendor/composer/autoload_static.php
r2780110 r2818433 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 448857686628a2233bb26e385680b6cf7 class ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 31 31 'EmailOctopus\\Form' => __DIR__ . '/../..' . '/src/Form.php', 32 32 'EmailOctopus\\Frontend' => __DIR__ . '/../..' . '/src/Frontend.php', 33 'EmailOctopus\\Gutenberg' => __DIR__ . '/../..' . '/src/Gutenberg.php', 33 34 'EmailOctopus\\Plugin' => __DIR__ . '/../..' . '/src/Plugin.php', 34 35 'EmailOctopus\\Utils' => __DIR__ . '/../..' . '/src/Utils.php', … … 39 40 { 40 41 return \Closure::bind(function () use ($loader) { 41 $loader->prefixLengthsPsr4 = ComposerStaticInit 448857686628a2233bb26e385680b6cf::$prefixLengthsPsr4;42 $loader->prefixDirsPsr4 = ComposerStaticInit 448857686628a2233bb26e385680b6cf::$prefixDirsPsr4;43 $loader->classMap = ComposerStaticInit 448857686628a2233bb26e385680b6cf::$classMap;42 $loader->prefixLengthsPsr4 = ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::$prefixLengthsPsr4; 43 $loader->prefixDirsPsr4 = ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::$prefixDirsPsr4; 44 $loader->classMap = ComposerStaticIniteb7156abdf9ecc04b92ad73799c5db19::$classMap; 44 45 45 46 }, null, ClassLoader::class); -
emailoctopus/trunk/vendor/composer/installed.php
r2780110 r2818433 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' cf62990660ec0f4feb16b8428c27d245a54671c4',6 'reference' => 'ff50101de1212fc6e65e1268eb776a084501621b', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' cf62990660ec0f4feb16b8428c27d245a54671c4',16 'reference' => 'ff50101de1212fc6e65e1268eb776a084501621b', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.