Changeset 2873649
- Timestamp:
- 03/02/2023 01:09:02 PM (3 years ago)
- Location:
- smaily-for-wp
- Files:
-
- 20 added
- 60 edited
- 1 copied
-
tags/3.1.0 (copied) (copied from smaily-for-wp/trunk)
-
tags/3.1.0/admin/class-smaily-for-wp-admin.php (modified) (6 diffs)
-
tags/3.1.0/admin/css/smaily-for-wp-admin.css (modified) (1 diff)
-
tags/3.1.0/admin/js/smaily-for-wp-admin.js (modified) (18 diffs)
-
tags/3.1.0/admin/partials/smaily-for-wp-admin-form.php (modified) (2 diffs)
-
tags/3.1.0/admin/partials/smaily-for-wp-admin-page.php (modified) (1 diff)
-
tags/3.1.0/blocks (added)
-
tags/3.1.0/blocks/block.json (added)
-
tags/3.1.0/blocks/index.asset.php (added)
-
tags/3.1.0/blocks/index.css (added)
-
tags/3.1.0/blocks/index.css.map (added)
-
tags/3.1.0/blocks/index.js (added)
-
tags/3.1.0/blocks/index.js.map (added)
-
tags/3.1.0/blocks/style-index.css (added)
-
tags/3.1.0/blocks/style-index.css.map (added)
-
tags/3.1.0/includes/class-smaily-for-wp-block.php (added)
-
tags/3.1.0/includes/class-smaily-for-wp-i18n.php (modified) (2 diffs)
-
tags/3.1.0/includes/class-smaily-for-wp-lifecycle.php (modified) (2 diffs)
-
tags/3.1.0/includes/class-smaily-for-wp-loader.php (modified) (3 diffs)
-
tags/3.1.0/includes/class-smaily-for-wp-options.php (modified) (3 diffs)
-
tags/3.1.0/includes/class-smaily-for-wp-request.php (modified) (5 diffs)
-
tags/3.1.0/includes/class-smaily-for-wp-template.php (modified) (4 diffs)
-
tags/3.1.0/includes/class-smaily-for-wp-widget.php (modified) (6 diffs)
-
tags/3.1.0/includes/class-smaily-for-wp.php (modified) (7 diffs)
-
tags/3.1.0/lang/smaily-for-wp-et.mo (modified) (previous)
-
tags/3.1.0/lang/smaily-for-wp-et.po (modified) (6 diffs)
-
tags/3.1.0/migrations/upgrade-3-0-0.php (modified) (2 diffs)
-
tags/3.1.0/public/class-smaily-for-wp-public.php (modified) (3 diffs)
-
tags/3.1.0/public/partials/smaily-for-wp-public-advanced.php (modified) (1 diff)
-
tags/3.1.0/public/partials/smaily-for-wp-public-basic.php (modified) (1 diff)
-
tags/3.1.0/readme.txt (modified) (2 diffs)
-
tags/3.1.0/smaily-for-wp.php (modified) (2 diffs)
-
tags/3.1.0/vendor/autoload.php (modified) (1 diff)
-
tags/3.1.0/vendor/composer/ClassLoader.php (modified) (5 diffs)
-
tags/3.1.0/vendor/composer/InstalledVersions.php (modified) (8 diffs)
-
tags/3.1.0/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/3.1.0/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
tags/3.1.0/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
tags/3.1.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/3.1.0/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/3.1.0/vendor/composer/installed.php (modified) (1 diff)
-
trunk/admin/class-smaily-for-wp-admin.php (modified) (6 diffs)
-
trunk/admin/css/smaily-for-wp-admin.css (modified) (1 diff)
-
trunk/admin/js/smaily-for-wp-admin.js (modified) (18 diffs)
-
trunk/admin/partials/smaily-for-wp-admin-form.php (modified) (2 diffs)
-
trunk/admin/partials/smaily-for-wp-admin-page.php (modified) (1 diff)
-
trunk/blocks (added)
-
trunk/blocks/block.json (added)
-
trunk/blocks/index.asset.php (added)
-
trunk/blocks/index.css (added)
-
trunk/blocks/index.css.map (added)
-
trunk/blocks/index.js (added)
-
trunk/blocks/index.js.map (added)
-
trunk/blocks/style-index.css (added)
-
trunk/blocks/style-index.css.map (added)
-
trunk/includes/class-smaily-for-wp-block.php (added)
-
trunk/includes/class-smaily-for-wp-i18n.php (modified) (2 diffs)
-
trunk/includes/class-smaily-for-wp-lifecycle.php (modified) (2 diffs)
-
trunk/includes/class-smaily-for-wp-loader.php (modified) (3 diffs)
-
trunk/includes/class-smaily-for-wp-options.php (modified) (3 diffs)
-
trunk/includes/class-smaily-for-wp-request.php (modified) (5 diffs)
-
trunk/includes/class-smaily-for-wp-template.php (modified) (4 diffs)
-
trunk/includes/class-smaily-for-wp-widget.php (modified) (6 diffs)
-
trunk/includes/class-smaily-for-wp.php (modified) (7 diffs)
-
trunk/lang/smaily-for-wp-et.mo (modified) (previous)
-
trunk/lang/smaily-for-wp-et.po (modified) (6 diffs)
-
trunk/migrations/upgrade-3-0-0.php (modified) (2 diffs)
-
trunk/public/class-smaily-for-wp-public.php (modified) (3 diffs)
-
trunk/public/partials/smaily-for-wp-public-advanced.php (modified) (1 diff)
-
trunk/public/partials/smaily-for-wp-public-basic.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/smaily-for-wp.php (modified) (2 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (5 diffs)
-
trunk/vendor/composer/InstalledVersions.php (modified) (8 diffs)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
smaily-for-wp/tags/3.1.0/admin/class-smaily-for-wp-admin.php
r2486965 r2873649 79 79 // Load configuration data. 80 80 $has_credentials = $this->options->has_credentials(); 81 $form_options = $this->options->get_form_options();81 $form_options = $this->options->get_form_options(); 82 82 83 83 // Create admin template. … … 87 87 add_menu_page( 'smaily', 'Smaily', 'manage_options', SMLY4WP_PLUGIN_PATH, '', SMLY4WP_PLUGIN_URL . '/gfx/icon.png' ); 88 88 add_submenu_page( 'smaily', 'Newsletter subscription form', 'Form', 'manage_options', SMLY4WP_PLUGIN_PATH, array( $template, 'dispatch' ) ); 89 } 90 91 /** 92 * Load newsletter subscription block. 93 * 94 * @since 3.1.0 95 */ 96 public function smaily_subscription_block_init( $screen ) { 97 if ( ! in_array( $screen, array( 'site-editor.php', 'post.php', 'page.php' ), true ) ) { 98 return; 99 } 100 101 $autoresponders = array( 102 array( 103 'label' => __( 'No autoresponder', 'smaily-for-wp' ), 104 'value' => '', 105 ), 106 ); 107 108 foreach ( $this->get_autoresponders() as $autoresponder_id => $title ) { 109 $autoresponders[] = array( 110 'label' => $title, 111 'value' => (string) $autoresponder_id, 112 ); 113 } 114 115 wp_enqueue_script( 116 $this->plugin_name, 117 SMLY4WP_PLUGIN_URL . '/blocks/index.js', 118 array(), 119 false, 120 true 121 ); 122 123 wp_localize_script( 124 $this->plugin_name, 125 'autoresponders', 126 json_encode( $autoresponders ) 127 ); 89 128 } 90 129 … … 151 190 if ( $refresh && $result['error'] === false ) { 152 191 $has_credentials = $this->options->has_credentials(); 153 $form_options = $this->options->get_form_options();192 $form_options = $this->options->get_form_options(); 154 193 $result['content'] = $this->generate_admin_template( 'form.php', $has_credentials, $form_options )->render(); 155 194 } … … 195 234 $rqst = ( new Smaily_For_WP_Request() ) 196 235 ->auth( $params['username'], $params['password'] ) 197 ->set Url( 'https://' . $params['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' )236 ->set_url( 'https://' . $params['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' ) 198 237 ->get(); 199 238 … … 288 327 // Render template. 289 328 $template = $this->generate_optin_template( 'basic.php', $subdomain ); 290 $form = $template->render();329 $form = $template->render(); 291 330 } 292 331 … … 392 431 393 432 $result = ( new Smaily_For_WP_Request() ) 394 ->set Url( 'https://' . $api_credentials['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' )433 ->set_url( 'https://' . $api_credentials['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' ) 395 434 ->auth( $api_credentials['username'], $api_credentials['password'] ) 396 435 ->get(); -
smaily-for-wp/tags/3.1.0/admin/css/smaily-for-wp-admin.css
r2485930 r2873649 2 2 * All of the CSS used for the admin view. 3 3 */ 4 .hidden {display:none} 4 .hidden { 5 display: none; 6 } 5 7 6 .wrap h2 sup {color:#090} 8 .wrap h2 sup { 9 color: #009900; 10 } 7 11 8 12 /* form container styles */ 9 #form-container img, #form-container span {vertical-align:middle} 10 #form-container .wrap {padding:5px 0; margin:0} 11 #form-container .wrap label {font-weight:bold} 12 #form-container .wrap em {display:block; font-style:normal; color:#999; padding-bottom:5px} 13 #form-container .wrap input.input-text, #form-container .wrap select, #form-container .wrap textarea {width:100%} 13 #form-container img, 14 #form-container span { 15 vertical-align: middle; 16 } 17 18 #form-container .wrap { 19 margin: 0; 20 padding: 5px 0; 21 } 22 #form-container .wrap label { 23 font-weight: bold; 24 } 25 #form-container .wrap em { 26 color: #999999; 27 display: block; 28 font-style: normal; 29 padding-bottom: 5px; 30 } 31 #form-container .wrap input.input-text, 32 #form-container .wrap select, 33 #form-container .wrap textarea { 34 width: 100%; 35 } 14 36 15 37 /* content tabs */ 16 .tab-content {padding:5px 4px 10px} 38 .tab-content { 39 padding: 5px 4px 10px; 40 } 17 41 18 .tabs {padding-top:10px} 19 .tabs li {float:left; margin-right:2px} 20 .tabs li a {background:#ccc; -moz-border-radius-topleft:5px; -moz-border-radius-topright:5px; padding:4px 6px; color:#999; text-decoration:none} 21 .tabs li a.selected {background:#21759B; color:#fff} 42 .tabs { 43 padding-top: 10px; 44 } 45 .tabs li { 46 float: left; 47 margin-right: 2px; 48 } 49 .tabs li a { 50 -moz-border-radius-topleft: 5px; 51 -moz-border-radius-topright: 5px; 52 background: #cccccc; 53 color: #999999; 54 padding: 4px 6px; 55 text-decoration: none; 56 } 57 .tabs li a.selected { 58 background: #21759B; 59 color: #fff; 60 } -
smaily-for-wp/tags/3.1.0/admin/js/smaily-for-wp-admin.js
r2485930 r2873649 1 var Default = (function (){1 var Default = (function () { 2 2 var _form = null; 3 3 … … 6 6 * @return void 7 7 */ 8 function _throwMessage(text, error) {8 function _throwMessage(text, error) { 9 9 // create message and insert to dom 10 10 var message = jQuery('<div></div>').attr({ … … 22 22 * @return void|bool 23 23 */ 24 function _handleResponse(response) {25 if (!response){ return false; }26 27 if (response.message){24 function _handleResponse(response) { 25 if (!response) { return false; } 26 27 if (response.message) { 28 28 // remove previous messages 29 29 jQuery('#message').remove(); … … 39 39 * @return String 40 40 */ 41 function _buildQuery() {41 function _buildQuery() { 42 42 var result = {}; 43 43 44 44 // get serialized data and restructure 45 45 var data = jQuery('#form-container').serializeArray(); 46 for (var i in data){46 for (var i in data) { 47 47 var item = data[i]; 48 48 result[item['name']] = item['value']; … … 56 56 * @return void 57 57 */ 58 function _request(data, callback) {58 function _request(data, callback) { 59 59 // show loader 60 60 jQuery('#h2-loader').show(); … … 65 65 smaily_for_wp.ajax_url, 66 66 { 67 'action' : 'smaily_admin_save',68 'form_data' : jQuery.param(data)67 'action': 'smaily_admin_save', 68 'form_data': jQuery.param(data) 69 69 }, 70 function (response) {70 function (response) { 71 71 // handle response 72 72 _handleResponse(response); 73 73 74 74 // execute callback function 75 if (typeof(callback) == 'function'){75 if (typeof (callback) == 'function') { 76 76 callback(response); 77 77 } … … 87 87 * @return void 88 88 */ 89 validateApiKey: function (){89 validateApiKey: function () { 90 90 // build query 91 91 var query = _buildQuery(); … … 94 94 95 95 // make the request 96 _request(query, function (response){97 if (response.content){96 _request(query, function (response) { 97 if (response.content) { 98 98 jQuery('#form-container').html(response.content); 99 99 } … … 105 105 * @return void 106 106 */ 107 removeApiKey: function (){107 removeApiKey: function () { 108 108 // build query 109 109 var query = { … … 113 113 114 114 // make the request 115 _request(query, function (response){116 if (response.content){115 _request(query, function (response) { 116 if (response.content) { 117 117 jQuery('#form-container').html(response.content); 118 118 } … … 125 125 * @return void 126 126 */ 127 resetForm: function (){127 resetForm: function () { 128 128 // build query 129 129 var query = { … … 132 132 133 133 // make the request 134 _request(query, function (response){134 _request(query, function (response) { 135 135 // set textarea content 136 136 var content = response.content; … … 143 143 * @return void 144 144 */ 145 save: function (){145 save: function () { 146 146 // build query 147 147 var query = _buildQuery(); … … 158 158 * @param {Object} args 159 159 */ 160 var Tabs = (function (args){160 var Tabs = (function (args) { 161 161 // default options 162 162 var _options = { … … 169 169 170 170 // check required target 171 if (!_options.target || _options.target.length < 1){ return false; }171 if (!_options.target || _options.target.length < 1) { return false; } 172 172 173 173 // bind click event to target tabs 174 jQuery(_options.target +' a').click(function(){174 jQuery(_options.target + ' a').click(function () { 175 175 _select(this); 176 176 }); … … 178 178 // use location hash to select tab 179 179 var hash = location.hash.length > 0 ? location.hash : ''; 180 if (hash.length > 0){181 var target = jQuery(_options.target +' a[href='+hash+']');180 if (hash.length > 0) { 181 var target = jQuery(_options.target + ' a[href=' + hash + ']'); 182 182 _select(target); 183 183 } … … 187 187 * @param {Object} element 188 188 */ 189 function _select(element) {190 if (!element || element.length < 1){ return false; }189 function _select(element) { 190 if (!element || element.length < 1) { return false; } 191 191 var href = jQuery(element).attr('href'); 192 192 var hash = (href.length > 0 && /#/.test(href)) ? href.split('#')[1] : ''; 193 193 194 194 // exit if does not have hash 195 if (hash.length < 1){ return false; }195 if (hash.length < 1) { return false; } 196 196 197 197 // reset target tabs selected state 198 jQuery(_options.target +' a').removeClass('selected');198 jQuery(_options.target + ' a').removeClass('selected'); 199 199 200 200 // set this tab's state to selected … … 203 203 // hide tabs and make clicked tab contents visible 204 204 jQuery('*[id^=content\-]').addClass('hidden'); 205 jQuery('#content-' +hash).removeClass('hidden');205 jQuery('#content-' + hash).removeClass('hidden'); 206 206 } 207 207 }); -
smaily-for-wp/tags/3.1.0/admin/partials/smaily-for-wp-admin-form.php
r2614685 r2873649 46 46 <?php if ( $this->has_credentials ) : ?> 47 47 <ul class="tabs"> 48 <li><a id="link-basic" href="#basic"<?php if ( $this->form_options['is_advanced'] === false): ?> class="selected"<?php endif; ?>><?php echo esc_html__( 'Basic', 'smaily-for-wp' ); ?></a></li> 49 <li><a id="link-advanced" href="#advanced"<?php if ( $this->form_options['is_advanced'] === true): ?> class="selected"<?php endif; ?>><?php echo esc_html__( 'Advanced', 'smaily-for-wp' ); ?></a></li> 48 <li> 49 <?php if ( $this->form_options['is_advanced'] === false ) : ?> 50 <a id="link-basic" href="#basic" class="selected"><?php echo esc_html__( 'Basic', 'smaily-for-wp' ); ?></a> 51 <?php else : ?> 52 <a id="link-basic" href="#basic"><?php echo esc_html__( 'Basic', 'smaily-for-wp' ); ?></a> 53 <?php endif; ?> 54 </li> 55 <li> 56 <?php if ( $this->form_options['is_advanced'] === true ) : ?> 57 <a id="link-advanced" href="#advanced" class="selected"><?php echo esc_html__( 'Advanced', 'smaily-for-wp' ); ?></a> 58 <?php else : ?> 59 <a id="link-advanced" href="#advanced"><?php echo esc_html__( 'Advanced', 'smaily-for-wp' ); ?></a> 60 <?php endif; ?> 61 </li> 50 62 </ul> 51 63 <div class="clear"></div> 52 64 53 <div id="content-advanced" class="tab-content<?php if ( $this->form_options['is_advanced'] === false): ?> hidden<?php endif; ?>"> 65 <?php if ( $this->form_options['is_advanced'] === false ) : ?> 66 <div id="content-advanced" class="tab-content hidden"> 67 <?php else : ?> 68 <div id="content-advanced" class="tab-content"> 69 <?php endif; ?>"> 54 70 <div class="wrap"> 55 71 <label><?php echo esc_html__( 'Newsletter subscription form', 'smaily-for-wp' ); ?> <a href="#" onclick="javascript:Default.resetForm();return false;" title="<?php echo esc_html__( 'Restore original subscription form', 'smaily-for-wp' ); ?>">(<?php echo esc_html__( 'Regenerate', 'smaily-for-wp' ); ?>)</a></label> … … 67 83 68 84 <script type="text/javascript">//<![CDATA[ 69 new Tabs({'target':'ul.tabs'});70 jQuery('#link-basic').click(function(){71 jQuery('input[name=is_advanced]').val('0');72 });73 jQuery('#link-advanced').click(function(){74 jQuery('input[name=is_advanced]').val('1');75 });85 new Tabs({'target':'ul.tabs'}); 86 jQuery('#link-basic').click(function(){ 87 jQuery('input[name=is_advanced]').val('0'); 88 }); 89 jQuery('#link-advanced').click(function(){ 90 jQuery('input[name=is_advanced]').val('1'); 91 }); 76 92 //]]></script> -
smaily-for-wp/tags/3.1.0/admin/partials/smaily-for-wp-admin-page.php
r2485930 r2873649 6 6 7 7 <form id="form-container" action="<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>" method="post"> 8 <?php echo $this->partial( 'admin/partials/smaily-for-wp-admin-form.php', $this->get Vars() ); ?>8 <?php echo $this->partial( 'admin/partials/smaily-for-wp-admin-form.php', $this->get_vars() ); ?> 9 9 </form> 10 10 </div> -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp-i18n.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Define the internationalization functionality. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 9 class Smaily_For_WP_i18n { 10 11 class Smaily_For_WP_I18n { 10 12 11 13 /** -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp-lifecycle.php
r2575319 r2873649 1 1 <?php 2 2 3 /** 3 4 * Define all the logic related to plugin activation, upgrade and uninstall logic. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 10 9 11 class Smaily_For_WP_Lifecycle { 10 12 -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp-loader.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Register all actions and filters for the plugin. … … 11 12 * @subpackage Smaily_For_WP/includes 12 13 */ 14 13 15 class Smaily_For_WP_Loader { 14 16 … … 89 91 'callback' => $callback, 90 92 'priority' => $priority, 91 'accepted_args' => $accepted_args 93 'accepted_args' => $accepted_args, 92 94 ); 93 95 -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp-options.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * This class is used to work with the plugin's options … … 8 9 * @subpackage Smaily_For_WP/includes 9 10 */ 11 10 12 class Smaily_For_WP_Options { 11 13 … … 115 117 if ( is_array( $form_options ) ) { 116 118 $this->form_options = array( 117 'form' => isset( $form_options['form'] ) ? esc_textarea( $form_options['form'] ) : '',119 'form' => isset( $form_options['form'] ) ? esc_textarea( $form_options['form'] ) : '', 118 120 'is_advanced' => isset( $form_options['form'] ) ? (bool) $form_options['is_advanced'] : false, 119 121 ); -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp-request.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Defines the request making functionality of the plugin. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 10 9 11 class Smaily_For_WP_Request { 10 12 … … 66 68 * @return Smaily_For_WP_Request For method chaining. 67 69 */ 68 public function set Url( $url ) {70 public function set_url( $url ) { 69 71 $this->_url = $url; 70 72 return $this; … … 78 80 * @return Smaily_For_WP_Request For method chaining. 79 81 */ 80 public function set Data( array $data ) {82 public function set_data( array $data ) { 81 83 $this->_data = $data; 82 84 return $this; … … 93 95 $useragent = 'smaily-for-wp/' . SMLY4WP_PLUGIN_VERSION . ' (WordPress/' . get_bloginfo( 'version' ) . '; +' . get_bloginfo( 'url' ) . ')'; 94 96 $args = array( 95 'headers' => array(97 'headers' => array( 96 98 'Authorization' => 'Basic ' . base64_encode( $this->_username . ':' . $this->_password ), 97 99 ), -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp-template.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Defines the template generating and rendering functionality of the plugin. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 10 9 11 class Smaily_For_WP_Template { 10 12 … … 108 110 * @return string $lang Language code. 109 111 */ 110 private function get LanguageCode() {112 private function get_language_code() { 111 113 // Language code if using WPML. 112 114 $lang = ''; … … 132 134 * @return array 133 135 */ 134 public function get Vars() {136 public function get_vars() { 135 137 return $this->_vars; 136 138 } -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp-widget.php
r2625099 r2873649 1 1 <?php 2 2 3 /** 3 4 * Defines the widget functionality of the plugin. … … 7 8 * @subpackage Smaily/includes 8 9 */ 10 9 11 class Smaily_For_WP_Widget extends WP_Widget { 10 12 … … 70 72 $file = $form_options['is_advanced'] === true ? 'advanced.php' : 'basic.php'; 71 73 $template = new Smaily_For_WP_Template( 'public/partials/smaily-for-wp-public-' . $file ); 72 $template->assign( array( 73 'domain' => $api_credentials['subdomain'], 74 'form' => $form_options['form'], 75 'is_advanced' => $form_options['is_advanced'], 76 'show_name' => $show_name, 77 'success_url' => $success_url, 78 'failure_url' => $failure_url, 79 'autoresponder_id' => $autoresponder, 80 ) ); 74 $template->assign( 75 array( 76 'domain' => $api_credentials['subdomain'], 77 'form' => $form_options['form'], 78 'is_advanced' => $form_options['is_advanced'], 79 'show_name' => $show_name, 80 'success_url' => $success_url, 81 'failure_url' => $failure_url, 82 'autoresponder_id' => $autoresponder, 83 ) 84 ); 81 85 82 86 // Display responses on Smaily subscription form. … … 129 133 */ 130 134 public function update( $new_instance, $old_instance ) { 131 $instance = $old_instance;132 $instance['title'] = sanitize_text_field( $new_instance['title'] );133 $instance['show_name'] = isset( $new_instance['show_name'] ) ? (bool) $new_instance['show_name'] : false;134 $instance['success_url'] = esc_url_raw( $new_instance['success_url'] );135 $instance['failure_url'] = esc_url_raw( $new_instance['failure_url'] );135 $instance = $old_instance; 136 $instance['title'] = sanitize_text_field( $new_instance['title'] ); 137 $instance['show_name'] = isset( $new_instance['show_name'] ) ? (bool) $new_instance['show_name'] : false; 138 $instance['success_url'] = esc_url_raw( $new_instance['success_url'] ); 139 $instance['failure_url'] = esc_url_raw( $new_instance['failure_url'] ); 136 140 $instance['autoresponder'] = sanitize_text_field( $new_instance['autoresponder'] ); 137 141 … … 174 178 <label for="' . $show_name_id . '">' . __( 'Display name field?', 'smaily-for-wp' ) . '</label>' . 175 179 '</p>'; 180 176 181 // Display inputs for success/failure URLs. 177 182 $success_url_id = esc_attr( $this->get_field_id( 'success_url' ) ); … … 190 195 <input id="' . $failure_url_id . '" name="' . $failure_url . '" type="text" value="' . $instance['failure_url'] . '" /> 191 196 </p>'; 197 192 198 // Display autoresponder select menu. 193 199 $autoresponder_id = esc_attr( $this->get_field_id( 'autoresponder' ) ); -
smaily-for-wp/tags/3.1.0/includes/class-smaily-for-wp.php
r2486913 r2873649 1 1 <?php 2 2 3 /** 3 4 * The core plugin class. … … 13 14 * @subpackage Smaily_For_WP/includes 14 15 */ 16 15 17 class Smaily_For_WP { 16 18 … … 62 64 */ 63 65 public function __construct() { 64 $this->version = SMLY4WP_PLUGIN_VERSION;66 $this->version = SMLY4WP_PLUGIN_VERSION; 65 67 $this->plugin_name = 'smaily-for-wp'; 66 68 $this->load_dependencies(); 67 69 $this->set_locale(); 68 70 $this->define_lifecycle_hooks(); 71 $this->init_blocks(); 69 72 $this->define_admin_hooks(); 70 73 $this->define_public_hooks(); … … 94 97 private function load_dependencies() { 95 98 require_once SMLY4WP_PLUGIN_PATH . 'admin/class-smaily-for-wp-admin.php'; 99 require_once SMLY4WP_PLUGIN_PATH . 'includes/class-smaily-for-wp-block.php'; 96 100 require_once SMLY4WP_PLUGIN_PATH . 'includes/class-smaily-for-wp-i18n.php'; 97 101 require_once SMLY4WP_PLUGIN_PATH . 'includes/class-smaily-for-wp-lifecycle.php'; … … 109 113 * Define the locale for this plugin for internationalization. 110 114 * 111 * Uses the Smaily_For_WP_ i18n class in order to set the domain and to register the hook115 * Uses the Smaily_For_WP_I18n class in order to set the domain and to register the hook 112 116 * with WordPress. 113 117 * … … 116 120 */ 117 121 private function set_locale() { 118 $plugin_i18n = new Smaily_For_WP_ i18n();122 $plugin_i18n = new Smaily_For_WP_I18n(); 119 123 $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); 124 } 125 126 /** 127 * Initialize Gutenberg blocks. 128 * 129 * @since 3.1.0 130 * @access private 131 */ 132 private function init_blocks() { 133 $plugin_block = new Smaily_For_WP_Block( $this->options, $this->get_plugin_name(), $this->get_version() ); 134 135 register_block_type( 136 SMLY4WP_PLUGIN_PATH . '/blocks', 137 array( 138 'render_callback' => array( $plugin_block, 'render' ), 139 ) 140 ); 120 141 } 121 142 … … 148 169 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); 149 170 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 171 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'smaily_subscription_block_init' ); 150 172 $this->loader->add_action( 'wp_ajax_smaily_admin_save', $plugin_admin, 'smaily_admin_save' ); 151 173 $this->loader->add_action( 'widgets_init', $plugin_admin, 'smaily_subscription_widget_init' ); -
smaily-for-wp/tags/3.1.0/lang/smaily-for-wp-et.po
r2575319 r2873649 2 2 msgstr "" 3 3 "Project-Id-Version: Smaily for WP\n" 4 "POT-Creation-Date: 202 1-07-30 11:07+0300\n"5 "PO-Revision-Date: 202 1-07-30 11:07+0300\n"4 "POT-Creation-Date: 2023-03-02 15:00+0200\n" 5 "PO-Revision-Date: 2023-03-02 15:00+0200\n" 6 6 "Last-Translator: Smaily <[email protected]>\n" 7 7 "Language-Team: Smaily <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.3\n" 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3.2.2\n" 13 14 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 15 "X-Poedit-KeywordsList: __;_e;_n:1,2;_n_noop:1,2;_x:1,2c;_nx:4c,1,2;" 16 16 "_nx_noop:4c,1,2;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;" … … 18 18 "X-Poedit-SearchPath-0: .\n" 19 19 20 #: admin/class-smaily-for-wp-admin.php:182 20 #: admin/class-smaily-for-wp-admin.php:103 21 #: includes/class-smaily-for-wp-widget.php:205 22 msgid "No autoresponder" 23 msgstr "Ilma automaatvastajata vorm" 24 25 #: admin/class-smaily-for-wp-admin.php:221 21 26 msgid "Please enter subdomain!" 22 27 msgstr "Palun sisesta alamdomeen!" 23 28 24 #: admin/class-smaily-for-wp-admin.php: 18629 #: admin/class-smaily-for-wp-admin.php:225 25 30 msgid "Please enter username!" 26 31 msgstr "Palun sisesta kasutajatunnus!" 27 32 28 #: admin/class-smaily-for-wp-admin.php: 19033 #: admin/class-smaily-for-wp-admin.php:229 29 34 msgid "Please enter password!" 30 35 msgstr "Palun sisesta parool!" 31 36 32 #: admin/class-smaily-for-wp-admin.php:2 0637 #: admin/class-smaily-for-wp-admin.php:245 33 38 msgid "Wrong credentials" 34 39 msgstr "Valed autentimise tunnused" 35 40 36 #: admin/class-smaily-for-wp-admin.php:2 1141 #: admin/class-smaily-for-wp-admin.php:250 37 42 msgid "Error in subdomain" 38 43 msgstr "Viga alamdomeenis" 39 44 40 #: admin/class-smaily-for-wp-admin.php:2 2145 #: admin/class-smaily-for-wp-admin.php:260 41 46 msgid "Something went wrong with request to Smaily" 42 47 msgstr "Ilmnes probleem Smaily-ga ühendamisel" 43 48 44 #: admin/class-smaily-for-wp-admin.php:2 3049 #: admin/class-smaily-for-wp-admin.php:269 45 50 msgid "Credentials validated." 46 51 msgstr "Autentimise tunnused valideeritud." 47 52 48 #: admin/class-smaily-for-wp-admin.php:2 4753 #: admin/class-smaily-for-wp-admin.php:286 49 54 msgid "Credentials removed." 50 55 msgstr "Autentimise tunnused eemaldatud." 51 56 52 #: admin/class-smaily-for-wp-admin.php: 26457 #: admin/class-smaily-for-wp-admin.php:303 53 58 msgid "Newsletter subscription form reset to default." 54 59 msgstr "Liitumisvormi kood taasloodud." 55 60 56 #: admin/class-smaily-for-wp-admin.php:3 0361 #: admin/class-smaily-for-wp-admin.php:342 57 62 msgid "Changes saved." 58 63 msgstr "Salvestatud." … … 86 91 msgstr "Kontrolli" 87 92 88 #: admin/partials/smaily-for-wp-admin-form.php:48 93 #: admin/partials/smaily-for-wp-admin-form.php:50 94 #: admin/partials/smaily-for-wp-admin-form.php:52 89 95 msgid "Basic" 90 96 msgstr "Tavaseaded" 91 97 92 #: admin/partials/smaily-for-wp-admin-form.php:49 98 #: admin/partials/smaily-for-wp-admin-form.php:57 99 #: admin/partials/smaily-for-wp-admin-form.php:59 93 100 msgid "Advanced" 94 101 msgstr "Spetsialisti seaded" 95 102 96 #: admin/partials/smaily-for-wp-admin-form.php: 55103 #: admin/partials/smaily-for-wp-admin-form.php:71 97 104 msgid "Newsletter subscription form" 98 105 msgstr "Uudiskirja liitumisvorm" 99 106 100 #: admin/partials/smaily-for-wp-admin-form.php: 55107 #: admin/partials/smaily-for-wp-admin-form.php:71 101 108 msgid "Restore original subscription form" 102 109 msgstr "Taasta algne liitumisvorm" 103 110 104 #: admin/partials/smaily-for-wp-admin-form.php: 55111 #: admin/partials/smaily-for-wp-admin-form.php:71 105 112 msgid "Regenerate" 106 113 msgstr "Taastekita" 107 114 108 #: admin/partials/smaily-for-wp-admin-form.php: 56115 #: admin/partials/smaily-for-wp-admin-form.php:72 109 116 msgid "HTML of subscription form" 110 117 msgstr "Liitumisvormi HTML" 111 118 112 #: admin/partials/smaily-for-wp-admin-form.php: 61119 #: admin/partials/smaily-for-wp-admin-form.php:77 113 120 msgid "Note: When you save under Basic tab, default form will be used." 114 121 msgstr "" 115 122 "Hoiatus: Kui salvestad Tavaseadete vaates, kasutatakse lehel vaikimisi vormi." 116 123 117 #: admin/partials/smaily-for-wp-admin-form.php: 64124 #: admin/partials/smaily-for-wp-admin-form.php:80 118 125 msgid "Save changes" 119 126 msgstr "Salvesta muudatused" … … 127 134 msgstr "Palun oota..." 128 135 129 #: includes/class-smaily-for-wp-widget.php:37 136 #: blocks/index.js:221 137 #, fuzzy 138 #| msgid "Email" 139 msgid "E-mail" 140 msgstr "E-post" 141 142 #: blocks/index.js:221 143 #, fuzzy 144 #| msgid "Email" 145 msgid "Smaily" 146 msgstr "E-post" 147 148 #: blocks/index.js:225 includes/class-smaily-for-wp-widget.php:40 149 msgid "Smaily Newsletter Subscription" 150 msgstr "Smaily uudiskirjaga liitumine" 151 152 #: includes/class-smaily-for-wp-widget.php:39 130 153 msgid "Smaily newsletter subscription form" 131 154 msgstr "Smaily uudiskirjaga liitumise vorm" 132 155 133 #: includes/class-smaily-for-wp-widget.php:38 134 msgid "Smaily Newsletter Subscription" 135 msgstr "Smaily uudiskirjaga liitumine" 136 137 #: includes/class-smaily-for-wp-widget.php:89 138 #: public/class-smaily-for-wp-public.php:104 156 #: includes/class-smaily-for-wp-widget.php:93 157 #: public/class-smaily-for-wp-public.php:106 139 158 msgid "Smaily credentials not validated. Subscription form will not work!" 140 159 msgstr "Smaily kasutajatunnused on valideerimata. Uudiskirja vorm ei tööta!" 141 160 142 #: includes/class-smaily-for-wp-widget.php: 96143 #: public/class-smaily-for-wp-public.php:11 1161 #: includes/class-smaily-for-wp-widget.php:100 162 #: public/class-smaily-for-wp-public.php:113 144 163 msgid "Form was not submitted using POST method." 145 164 msgstr "Andmeid peab saatma POST tegevusviisiga." 146 165 147 #: includes/class-smaily-for-wp-widget.php: 99148 #: public/class-smaily-for-wp-public.php:11 4166 #: includes/class-smaily-for-wp-widget.php:103 167 #: public/class-smaily-for-wp-public.php:116 149 168 msgid "Input does not contain a recognizable email address." 150 169 msgstr "Sisend ei sisalda tuntavat emaili aadressi." 151 170 152 #: includes/class-smaily-for-wp-widget.php:10 2153 #: public/class-smaily-for-wp-public.php:11 7171 #: includes/class-smaily-for-wp-widget.php:106 172 #: public/class-smaily-for-wp-public.php:119 154 173 msgid "" 155 174 "Could not add to subscriber list for an unknown reason. Probably something " … … 159 178 "probleem Smaily-s." 160 179 161 #: includes/class-smaily-for-wp-widget.php:16 4180 #: includes/class-smaily-for-wp-widget.php:168 162 181 msgid "Title" 163 182 msgstr "Pealkiri" 164 183 165 #: includes/class-smaily-for-wp-widget.php:17 4184 #: includes/class-smaily-for-wp-widget.php:178 166 185 msgid "Display name field?" 167 186 msgstr "Näita nime välja?" 168 187 169 #: includes/class-smaily-for-wp-widget.php:18 1188 #: includes/class-smaily-for-wp-widget.php:186 170 189 msgid "Success URL" 171 190 msgstr "Õnnestumise URL" 172 191 173 #: includes/class-smaily-for-wp-widget.php:1 89192 #: includes/class-smaily-for-wp-widget.php:194 174 193 msgid "Failure URL" 175 194 msgstr "Ebaõnnestumise URL" 176 195 177 #: includes/class-smaily-for-wp-widget.php: 197196 #: includes/class-smaily-for-wp-widget.php:203 178 197 msgid "Autoresponders" 179 198 msgstr "Automaatvastajad" 180 181 #: includes/class-smaily-for-wp-widget.php:199182 msgid "No autoresponder"183 msgstr "Ilma automaatvastajata vorm"184 199 185 200 #: public/partials/smaily-for-wp-public-basic.php:3 -
smaily-for-wp/tags/3.1.0/migrations/upgrade-3-0-0.php
r2575319 r2873649 1 1 <?php 2 2 3 /** 3 4 * Apply any database upgrades required for 3.0.0. … … 11 12 * @since 3.0.0 12 13 */ 14 13 15 $upgrade = function() { 14 16 global $wpdb; 15 $table_name = $wpdb->prefix . 'smaily_config';16 17 17 if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) === $table_name) {18 $config = $wpdb->get_row( "SELECT * FROM `$table_name`LIMIT 1", ARRAY_A );18 if ( $wpdb->get_var( "SHOW TABLES LIKE {$wpdb->prefix}smaily_config" ) === $wpdb->prefix . 'smaily_config' ) { 19 $config = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}smaily_config LIMIT 1", ARRAY_A ); 19 20 // Get saved autoresponder ID. 20 21 $autoresponder_id = isset( $config['autoresponder'] ) ? $config['autoresponder'] : ''; -
smaily-for-wp/tags/3.1.0/public/class-smaily-for-wp-public.php
r2493245 r2873649 1 1 <?php 2 2 3 /** 3 4 * The public-facing functionality of the plugin. … … 7 8 * @subpackage Smaily_For_WP/public 8 9 */ 10 9 11 class Smaily_For_WP_Public { 10 12 … … 76 78 77 79 // Parse attributes out of shortcode tag. 78 $shortcode_atts = shortcode_atts(80 $shortcode_atts = shortcode_atts( 79 81 array( 80 82 'success_url' => get_site_url(), -
smaily-for-wp/tags/3.1.0/public/partials/smaily-for-wp-public-advanced.php
r2485930 r2873649 1 <?php echo html_entity_decode( $this->form ); ?>1 <?php echo html_entity_decode( $this->form ); -
smaily-for-wp/tags/3.1.0/public/partials/smaily-for-wp-public-basic.php
r2485930 r2873649 2 2 <p class="error" style="padding:15px;background-color:#f2dede;margin:0 0 10px;display:<?php echo $this->form_has_response ? 'block' : 'none'; ?>"><?php echo esc_html( $this->response_message ); ?></p> 3 3 <p class="success" style="padding:15px;background-color:#dff0d8;margin:0 0 10px;display:<?php echo $this->form_is_successful ? 'block' : 'none'; ?>"><?php echo esc_html__( 'Thank you for subscribing to our newsletter.', 'smaily-for-wp' ); ?></p> 4 <?php if ( $this->autoresponder_id ) : ?>4 <?php if ( $this->autoresponder_id ) : ?> 5 5 <input type="hidden" name="autoresponder" value="<?php echo $this->autoresponder_id; ?>" /> 6 6 <?php endif; ?> 7 <input type="hidden" name="lang" value="<?php echo esc_html( $this->get LanguageCode() ); ?>" />7 <input type="hidden" name="lang" value="<?php echo esc_html( $this->get_language_code() ); ?>" /> 8 8 <input type="hidden" name="success_url" value="<?php echo $this->success_url ? $this->success_url : get_site_url(); ?>" /> 9 9 <input type="hidden" name="failure_url" value="<?php echo $this->failure_url ? $this->failure_url : get_site_url(); ?>" /> -
smaily-for-wp/tags/3.1.0/readme.txt
r2625099 r2873649 4 4 Requires PHP: 5.6 5 5 Requires at least: 4.0 6 Stable tag: 3. 0.76 Stable tag: 3.1.0 7 7 Tags: widget, plugin, sidebar, api, mail, email, marketing, smaily 8 Tested up to: 5.8.08 Tested up to: 6.1.1 9 9 10 10 Smaily newsletter subscription plugin for WordPress … … 77 77 == Changelog == 78 78 79 = 3.1.0 = 80 - Basic Gutenberg blocks support 81 79 82 = 3.0.7 = 80 83 - Fix automation workflows being fetched on every operation in WordPress. -
smaily-for-wp/tags/3.1.0/smaily-for-wp.php
r2625099 r2873649 10 10 * Text Domain: smaily-for-wp 11 11 * Description: Smaily newsletter subscription form. 12 * Version: 3. 0.712 * Version: 3.1.0 13 13 * Author: Sendsmaily LLC 14 14 * Author URI: https://smaily.com … … 25 25 * Current plugin version. 26 26 */ 27 define( 'SMLY4WP_PLUGIN_VERSION', '3. 0.7' );27 define( 'SMLY4WP_PLUGIN_VERSION', '3.1.0' ); 28 28 29 29 /** -
smaily-for-wp/tags/3.1.0/vendor/autoload.php
r2625099 r2873649 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e877::getLoader();25 return ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990::getLoader(); -
smaily-for-wp/tags/3.1.0/vendor/composer/ClassLoader.php
r2614685 r2873649 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 109 113 } 110 114 … … 150 154 /** 151 155 * @return string[] Array of classname => path 152 * @psalm- vararray<string, string>156 * @psalm-return array<string, string> 153 157 */ 154 158 public function getClassMap() … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 429 434 430 435 return true; … … 556 561 return false; 557 562 } 563 564 /** 565 * @return void 566 */ 567 private static function initializeIncludeClosure() 568 { 569 if (self::$includeFile !== null) { 570 return; 571 } 572 573 /** 574 * Scope isolated include. 575 * 576 * Prevents access to $this/self from included files. 577 * 578 * @param string $file 579 * @return void 580 */ 581 self::$includeFile = \Closure::bind(static function($file) { 582 include $file; 583 }, null, null); 584 } 558 585 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
smaily-for-wp/tags/3.1.0/vendor/composer/InstalledVersions.php
r2625099 r2873649 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions … … 27 29 /** 28 30 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 30 32 */ 31 33 private static $installed; … … 38 40 /** 39 41 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 41 43 */ 42 44 private static $installedByVendor = array(); … … 242 244 /** 243 245 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 247 */ 246 248 public static function getRootPackage() … … 256 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 257 259 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 259 261 */ 260 262 public static function getRawData() … … 279 281 * 280 282 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 282 284 */ 283 285 public static function getAllRawData() … … 302 304 * @return void 303 305 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 305 307 */ 306 308 public static function reload($data) … … 312 314 /** 313 315 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 315 317 */ 316 318 private static function getInstalled() -
smaily-for-wp/tags/3.1.0/vendor/composer/autoload_classmap.php
r2575319 r2873649 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
smaily-for-wp/tags/3.1.0/vendor/composer/autoload_namespaces.php
r2575319 r2873649 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
smaily-for-wp/tags/3.1.0/vendor/composer/autoload_psr4.php
r2575319 r2873649 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
smaily-for-wp/tags/3.1.0/vendor/composer/autoload_real.php
r2625099 r2873649 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e8775 class ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e877', 'loadClassLoader'), true, true);26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));27 spl_autoload_unregister(array('ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e877', 'loadClassLoader'));25 spl_autoload_register(array('ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990', 'loadClassLoader'), true, true); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990', 'loadClassLoader')); 28 28 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 30 if ($useStaticLoader) { 31 require __DIR__ . '/autoload_static.php'; 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit88c0474316a09b223d787fb04022e877::getInitializer($loader)); 34 } else { 35 $map = require __DIR__ . '/autoload_namespaces.php'; 36 foreach ($map as $namespace => $path) { 37 $loader->set($namespace, $path); 38 } 39 40 $map = require __DIR__ . '/autoload_psr4.php'; 41 foreach ($map as $namespace => $path) { 42 $loader->setPsr4($namespace, $path); 43 } 44 45 $classMap = require __DIR__ . '/autoload_classmap.php'; 46 if ($classMap) { 47 $loader->addClassMap($classMap); 48 } 49 } 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit814b5d616008b0576aeb0740be7b0990::getInitializer($loader)); 50 31 51 32 $loader->register(true); -
smaily-for-wp/tags/3.1.0/vendor/composer/autoload_static.php
r2625099 r2873649 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit8 8c0474316a09b223d787fb04022e8777 class ComposerStaticInit814b5d616008b0576aeb0740be7b0990 8 8 { 9 9 public static $classMap = array ( … … 14 14 { 15 15 return \Closure::bind(function () use ($loader) { 16 $loader->classMap = ComposerStaticInit8 8c0474316a09b223d787fb04022e877::$classMap;16 $loader->classMap = ComposerStaticInit814b5d616008b0576aeb0740be7b0990::$classMap; 17 17 18 18 }, null, ClassLoader::class); -
smaily-for-wp/tags/3.1.0/vendor/composer/installed.php
r2625099 r2873649 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '3.0.7', 4 'version' => '3.0.7.0', 3 'name' => 'smaily/smaily_for_wp', 4 'pretty_version' => '3.1.0', 5 'version' => '3.1.0.0', 6 'reference' => 'b04212fd42f202551db5ff56b280643da8a68edc', 5 7 'type' => 'plugin', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => 'fa56715956b0051386be20ffb4993a7539c91528',9 'name' => 'smaily/smaily_for_wp',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'smaily/smaily_for_wp' => array( 14 'pretty_version' => '3.0.7', 15 'version' => '3.0.7.0', 14 'pretty_version' => '3.1.0', 15 'version' => '3.1.0.0', 16 'reference' => 'b04212fd42f202551db5ff56b280643da8a68edc', 16 17 'type' => 'plugin', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => 'fa56715956b0051386be20ffb4993a7539c91528',20 20 'dev_requirement' => false, 21 21 ), -
smaily-for-wp/trunk/admin/class-smaily-for-wp-admin.php
r2486965 r2873649 79 79 // Load configuration data. 80 80 $has_credentials = $this->options->has_credentials(); 81 $form_options = $this->options->get_form_options();81 $form_options = $this->options->get_form_options(); 82 82 83 83 // Create admin template. … … 87 87 add_menu_page( 'smaily', 'Smaily', 'manage_options', SMLY4WP_PLUGIN_PATH, '', SMLY4WP_PLUGIN_URL . '/gfx/icon.png' ); 88 88 add_submenu_page( 'smaily', 'Newsletter subscription form', 'Form', 'manage_options', SMLY4WP_PLUGIN_PATH, array( $template, 'dispatch' ) ); 89 } 90 91 /** 92 * Load newsletter subscription block. 93 * 94 * @since 3.1.0 95 */ 96 public function smaily_subscription_block_init( $screen ) { 97 if ( ! in_array( $screen, array( 'site-editor.php', 'post.php', 'page.php' ), true ) ) { 98 return; 99 } 100 101 $autoresponders = array( 102 array( 103 'label' => __( 'No autoresponder', 'smaily-for-wp' ), 104 'value' => '', 105 ), 106 ); 107 108 foreach ( $this->get_autoresponders() as $autoresponder_id => $title ) { 109 $autoresponders[] = array( 110 'label' => $title, 111 'value' => (string) $autoresponder_id, 112 ); 113 } 114 115 wp_enqueue_script( 116 $this->plugin_name, 117 SMLY4WP_PLUGIN_URL . '/blocks/index.js', 118 array(), 119 false, 120 true 121 ); 122 123 wp_localize_script( 124 $this->plugin_name, 125 'autoresponders', 126 json_encode( $autoresponders ) 127 ); 89 128 } 90 129 … … 151 190 if ( $refresh && $result['error'] === false ) { 152 191 $has_credentials = $this->options->has_credentials(); 153 $form_options = $this->options->get_form_options();192 $form_options = $this->options->get_form_options(); 154 193 $result['content'] = $this->generate_admin_template( 'form.php', $has_credentials, $form_options )->render(); 155 194 } … … 195 234 $rqst = ( new Smaily_For_WP_Request() ) 196 235 ->auth( $params['username'], $params['password'] ) 197 ->set Url( 'https://' . $params['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' )236 ->set_url( 'https://' . $params['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' ) 198 237 ->get(); 199 238 … … 288 327 // Render template. 289 328 $template = $this->generate_optin_template( 'basic.php', $subdomain ); 290 $form = $template->render();329 $form = $template->render(); 291 330 } 292 331 … … 392 431 393 432 $result = ( new Smaily_For_WP_Request() ) 394 ->set Url( 'https://' . $api_credentials['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' )433 ->set_url( 'https://' . $api_credentials['subdomain'] . '.sendsmaily.net/api/workflows.php?trigger_type=form_submitted' ) 395 434 ->auth( $api_credentials['username'], $api_credentials['password'] ) 396 435 ->get(); -
smaily-for-wp/trunk/admin/css/smaily-for-wp-admin.css
r2485930 r2873649 2 2 * All of the CSS used for the admin view. 3 3 */ 4 .hidden {display:none} 4 .hidden { 5 display: none; 6 } 5 7 6 .wrap h2 sup {color:#090} 8 .wrap h2 sup { 9 color: #009900; 10 } 7 11 8 12 /* form container styles */ 9 #form-container img, #form-container span {vertical-align:middle} 10 #form-container .wrap {padding:5px 0; margin:0} 11 #form-container .wrap label {font-weight:bold} 12 #form-container .wrap em {display:block; font-style:normal; color:#999; padding-bottom:5px} 13 #form-container .wrap input.input-text, #form-container .wrap select, #form-container .wrap textarea {width:100%} 13 #form-container img, 14 #form-container span { 15 vertical-align: middle; 16 } 17 18 #form-container .wrap { 19 margin: 0; 20 padding: 5px 0; 21 } 22 #form-container .wrap label { 23 font-weight: bold; 24 } 25 #form-container .wrap em { 26 color: #999999; 27 display: block; 28 font-style: normal; 29 padding-bottom: 5px; 30 } 31 #form-container .wrap input.input-text, 32 #form-container .wrap select, 33 #form-container .wrap textarea { 34 width: 100%; 35 } 14 36 15 37 /* content tabs */ 16 .tab-content {padding:5px 4px 10px} 38 .tab-content { 39 padding: 5px 4px 10px; 40 } 17 41 18 .tabs {padding-top:10px} 19 .tabs li {float:left; margin-right:2px} 20 .tabs li a {background:#ccc; -moz-border-radius-topleft:5px; -moz-border-radius-topright:5px; padding:4px 6px; color:#999; text-decoration:none} 21 .tabs li a.selected {background:#21759B; color:#fff} 42 .tabs { 43 padding-top: 10px; 44 } 45 .tabs li { 46 float: left; 47 margin-right: 2px; 48 } 49 .tabs li a { 50 -moz-border-radius-topleft: 5px; 51 -moz-border-radius-topright: 5px; 52 background: #cccccc; 53 color: #999999; 54 padding: 4px 6px; 55 text-decoration: none; 56 } 57 .tabs li a.selected { 58 background: #21759B; 59 color: #fff; 60 } -
smaily-for-wp/trunk/admin/js/smaily-for-wp-admin.js
r2485930 r2873649 1 var Default = (function (){1 var Default = (function () { 2 2 var _form = null; 3 3 … … 6 6 * @return void 7 7 */ 8 function _throwMessage(text, error) {8 function _throwMessage(text, error) { 9 9 // create message and insert to dom 10 10 var message = jQuery('<div></div>').attr({ … … 22 22 * @return void|bool 23 23 */ 24 function _handleResponse(response) {25 if (!response){ return false; }26 27 if (response.message){24 function _handleResponse(response) { 25 if (!response) { return false; } 26 27 if (response.message) { 28 28 // remove previous messages 29 29 jQuery('#message').remove(); … … 39 39 * @return String 40 40 */ 41 function _buildQuery() {41 function _buildQuery() { 42 42 var result = {}; 43 43 44 44 // get serialized data and restructure 45 45 var data = jQuery('#form-container').serializeArray(); 46 for (var i in data){46 for (var i in data) { 47 47 var item = data[i]; 48 48 result[item['name']] = item['value']; … … 56 56 * @return void 57 57 */ 58 function _request(data, callback) {58 function _request(data, callback) { 59 59 // show loader 60 60 jQuery('#h2-loader').show(); … … 65 65 smaily_for_wp.ajax_url, 66 66 { 67 'action' : 'smaily_admin_save',68 'form_data' : jQuery.param(data)67 'action': 'smaily_admin_save', 68 'form_data': jQuery.param(data) 69 69 }, 70 function (response) {70 function (response) { 71 71 // handle response 72 72 _handleResponse(response); 73 73 74 74 // execute callback function 75 if (typeof(callback) == 'function'){75 if (typeof (callback) == 'function') { 76 76 callback(response); 77 77 } … … 87 87 * @return void 88 88 */ 89 validateApiKey: function (){89 validateApiKey: function () { 90 90 // build query 91 91 var query = _buildQuery(); … … 94 94 95 95 // make the request 96 _request(query, function (response){97 if (response.content){96 _request(query, function (response) { 97 if (response.content) { 98 98 jQuery('#form-container').html(response.content); 99 99 } … … 105 105 * @return void 106 106 */ 107 removeApiKey: function (){107 removeApiKey: function () { 108 108 // build query 109 109 var query = { … … 113 113 114 114 // make the request 115 _request(query, function (response){116 if (response.content){115 _request(query, function (response) { 116 if (response.content) { 117 117 jQuery('#form-container').html(response.content); 118 118 } … … 125 125 * @return void 126 126 */ 127 resetForm: function (){127 resetForm: function () { 128 128 // build query 129 129 var query = { … … 132 132 133 133 // make the request 134 _request(query, function (response){134 _request(query, function (response) { 135 135 // set textarea content 136 136 var content = response.content; … … 143 143 * @return void 144 144 */ 145 save: function (){145 save: function () { 146 146 // build query 147 147 var query = _buildQuery(); … … 158 158 * @param {Object} args 159 159 */ 160 var Tabs = (function (args){160 var Tabs = (function (args) { 161 161 // default options 162 162 var _options = { … … 169 169 170 170 // check required target 171 if (!_options.target || _options.target.length < 1){ return false; }171 if (!_options.target || _options.target.length < 1) { return false; } 172 172 173 173 // bind click event to target tabs 174 jQuery(_options.target +' a').click(function(){174 jQuery(_options.target + ' a').click(function () { 175 175 _select(this); 176 176 }); … … 178 178 // use location hash to select tab 179 179 var hash = location.hash.length > 0 ? location.hash : ''; 180 if (hash.length > 0){181 var target = jQuery(_options.target +' a[href='+hash+']');180 if (hash.length > 0) { 181 var target = jQuery(_options.target + ' a[href=' + hash + ']'); 182 182 _select(target); 183 183 } … … 187 187 * @param {Object} element 188 188 */ 189 function _select(element) {190 if (!element || element.length < 1){ return false; }189 function _select(element) { 190 if (!element || element.length < 1) { return false; } 191 191 var href = jQuery(element).attr('href'); 192 192 var hash = (href.length > 0 && /#/.test(href)) ? href.split('#')[1] : ''; 193 193 194 194 // exit if does not have hash 195 if (hash.length < 1){ return false; }195 if (hash.length < 1) { return false; } 196 196 197 197 // reset target tabs selected state 198 jQuery(_options.target +' a').removeClass('selected');198 jQuery(_options.target + ' a').removeClass('selected'); 199 199 200 200 // set this tab's state to selected … … 203 203 // hide tabs and make clicked tab contents visible 204 204 jQuery('*[id^=content\-]').addClass('hidden'); 205 jQuery('#content-' +hash).removeClass('hidden');205 jQuery('#content-' + hash).removeClass('hidden'); 206 206 } 207 207 }); -
smaily-for-wp/trunk/admin/partials/smaily-for-wp-admin-form.php
r2614685 r2873649 46 46 <?php if ( $this->has_credentials ) : ?> 47 47 <ul class="tabs"> 48 <li><a id="link-basic" href="#basic"<?php if ( $this->form_options['is_advanced'] === false): ?> class="selected"<?php endif; ?>><?php echo esc_html__( 'Basic', 'smaily-for-wp' ); ?></a></li> 49 <li><a id="link-advanced" href="#advanced"<?php if ( $this->form_options['is_advanced'] === true): ?> class="selected"<?php endif; ?>><?php echo esc_html__( 'Advanced', 'smaily-for-wp' ); ?></a></li> 48 <li> 49 <?php if ( $this->form_options['is_advanced'] === false ) : ?> 50 <a id="link-basic" href="#basic" class="selected"><?php echo esc_html__( 'Basic', 'smaily-for-wp' ); ?></a> 51 <?php else : ?> 52 <a id="link-basic" href="#basic"><?php echo esc_html__( 'Basic', 'smaily-for-wp' ); ?></a> 53 <?php endif; ?> 54 </li> 55 <li> 56 <?php if ( $this->form_options['is_advanced'] === true ) : ?> 57 <a id="link-advanced" href="#advanced" class="selected"><?php echo esc_html__( 'Advanced', 'smaily-for-wp' ); ?></a> 58 <?php else : ?> 59 <a id="link-advanced" href="#advanced"><?php echo esc_html__( 'Advanced', 'smaily-for-wp' ); ?></a> 60 <?php endif; ?> 61 </li> 50 62 </ul> 51 63 <div class="clear"></div> 52 64 53 <div id="content-advanced" class="tab-content<?php if ( $this->form_options['is_advanced'] === false): ?> hidden<?php endif; ?>"> 65 <?php if ( $this->form_options['is_advanced'] === false ) : ?> 66 <div id="content-advanced" class="tab-content hidden"> 67 <?php else : ?> 68 <div id="content-advanced" class="tab-content"> 69 <?php endif; ?>"> 54 70 <div class="wrap"> 55 71 <label><?php echo esc_html__( 'Newsletter subscription form', 'smaily-for-wp' ); ?> <a href="#" onclick="javascript:Default.resetForm();return false;" title="<?php echo esc_html__( 'Restore original subscription form', 'smaily-for-wp' ); ?>">(<?php echo esc_html__( 'Regenerate', 'smaily-for-wp' ); ?>)</a></label> … … 67 83 68 84 <script type="text/javascript">//<![CDATA[ 69 new Tabs({'target':'ul.tabs'});70 jQuery('#link-basic').click(function(){71 jQuery('input[name=is_advanced]').val('0');72 });73 jQuery('#link-advanced').click(function(){74 jQuery('input[name=is_advanced]').val('1');75 });85 new Tabs({'target':'ul.tabs'}); 86 jQuery('#link-basic').click(function(){ 87 jQuery('input[name=is_advanced]').val('0'); 88 }); 89 jQuery('#link-advanced').click(function(){ 90 jQuery('input[name=is_advanced]').val('1'); 91 }); 76 92 //]]></script> -
smaily-for-wp/trunk/admin/partials/smaily-for-wp-admin-page.php
r2485930 r2873649 6 6 7 7 <form id="form-container" action="<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>" method="post"> 8 <?php echo $this->partial( 'admin/partials/smaily-for-wp-admin-form.php', $this->get Vars() ); ?>8 <?php echo $this->partial( 'admin/partials/smaily-for-wp-admin-form.php', $this->get_vars() ); ?> 9 9 </form> 10 10 </div> -
smaily-for-wp/trunk/includes/class-smaily-for-wp-i18n.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Define the internationalization functionality. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 9 class Smaily_For_WP_i18n { 10 11 class Smaily_For_WP_I18n { 10 12 11 13 /** -
smaily-for-wp/trunk/includes/class-smaily-for-wp-lifecycle.php
r2575319 r2873649 1 1 <?php 2 2 3 /** 3 4 * Define all the logic related to plugin activation, upgrade and uninstall logic. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 10 9 11 class Smaily_For_WP_Lifecycle { 10 12 -
smaily-for-wp/trunk/includes/class-smaily-for-wp-loader.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Register all actions and filters for the plugin. … … 11 12 * @subpackage Smaily_For_WP/includes 12 13 */ 14 13 15 class Smaily_For_WP_Loader { 14 16 … … 89 91 'callback' => $callback, 90 92 'priority' => $priority, 91 'accepted_args' => $accepted_args 93 'accepted_args' => $accepted_args, 92 94 ); 93 95 -
smaily-for-wp/trunk/includes/class-smaily-for-wp-options.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * This class is used to work with the plugin's options … … 8 9 * @subpackage Smaily_For_WP/includes 9 10 */ 11 10 12 class Smaily_For_WP_Options { 11 13 … … 115 117 if ( is_array( $form_options ) ) { 116 118 $this->form_options = array( 117 'form' => isset( $form_options['form'] ) ? esc_textarea( $form_options['form'] ) : '',119 'form' => isset( $form_options['form'] ) ? esc_textarea( $form_options['form'] ) : '', 118 120 'is_advanced' => isset( $form_options['form'] ) ? (bool) $form_options['is_advanced'] : false, 119 121 ); -
smaily-for-wp/trunk/includes/class-smaily-for-wp-request.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Defines the request making functionality of the plugin. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 10 9 11 class Smaily_For_WP_Request { 10 12 … … 66 68 * @return Smaily_For_WP_Request For method chaining. 67 69 */ 68 public function set Url( $url ) {70 public function set_url( $url ) { 69 71 $this->_url = $url; 70 72 return $this; … … 78 80 * @return Smaily_For_WP_Request For method chaining. 79 81 */ 80 public function set Data( array $data ) {82 public function set_data( array $data ) { 81 83 $this->_data = $data; 82 84 return $this; … … 93 95 $useragent = 'smaily-for-wp/' . SMLY4WP_PLUGIN_VERSION . ' (WordPress/' . get_bloginfo( 'version' ) . '; +' . get_bloginfo( 'url' ) . ')'; 94 96 $args = array( 95 'headers' => array(97 'headers' => array( 96 98 'Authorization' => 'Basic ' . base64_encode( $this->_username . ':' . $this->_password ), 97 99 ), -
smaily-for-wp/trunk/includes/class-smaily-for-wp-template.php
r2485930 r2873649 1 1 <?php 2 2 3 /** 3 4 * Defines the template generating and rendering functionality of the plugin. … … 7 8 * @subpackage Smaily_For_WP/includes 8 9 */ 10 9 11 class Smaily_For_WP_Template { 10 12 … … 108 110 * @return string $lang Language code. 109 111 */ 110 private function get LanguageCode() {112 private function get_language_code() { 111 113 // Language code if using WPML. 112 114 $lang = ''; … … 132 134 * @return array 133 135 */ 134 public function get Vars() {136 public function get_vars() { 135 137 return $this->_vars; 136 138 } -
smaily-for-wp/trunk/includes/class-smaily-for-wp-widget.php
r2625099 r2873649 1 1 <?php 2 2 3 /** 3 4 * Defines the widget functionality of the plugin. … … 7 8 * @subpackage Smaily/includes 8 9 */ 10 9 11 class Smaily_For_WP_Widget extends WP_Widget { 10 12 … … 70 72 $file = $form_options['is_advanced'] === true ? 'advanced.php' : 'basic.php'; 71 73 $template = new Smaily_For_WP_Template( 'public/partials/smaily-for-wp-public-' . $file ); 72 $template->assign( array( 73 'domain' => $api_credentials['subdomain'], 74 'form' => $form_options['form'], 75 'is_advanced' => $form_options['is_advanced'], 76 'show_name' => $show_name, 77 'success_url' => $success_url, 78 'failure_url' => $failure_url, 79 'autoresponder_id' => $autoresponder, 80 ) ); 74 $template->assign( 75 array( 76 'domain' => $api_credentials['subdomain'], 77 'form' => $form_options['form'], 78 'is_advanced' => $form_options['is_advanced'], 79 'show_name' => $show_name, 80 'success_url' => $success_url, 81 'failure_url' => $failure_url, 82 'autoresponder_id' => $autoresponder, 83 ) 84 ); 81 85 82 86 // Display responses on Smaily subscription form. … … 129 133 */ 130 134 public function update( $new_instance, $old_instance ) { 131 $instance = $old_instance;132 $instance['title'] = sanitize_text_field( $new_instance['title'] );133 $instance['show_name'] = isset( $new_instance['show_name'] ) ? (bool) $new_instance['show_name'] : false;134 $instance['success_url'] = esc_url_raw( $new_instance['success_url'] );135 $instance['failure_url'] = esc_url_raw( $new_instance['failure_url'] );135 $instance = $old_instance; 136 $instance['title'] = sanitize_text_field( $new_instance['title'] ); 137 $instance['show_name'] = isset( $new_instance['show_name'] ) ? (bool) $new_instance['show_name'] : false; 138 $instance['success_url'] = esc_url_raw( $new_instance['success_url'] ); 139 $instance['failure_url'] = esc_url_raw( $new_instance['failure_url'] ); 136 140 $instance['autoresponder'] = sanitize_text_field( $new_instance['autoresponder'] ); 137 141 … … 174 178 <label for="' . $show_name_id . '">' . __( 'Display name field?', 'smaily-for-wp' ) . '</label>' . 175 179 '</p>'; 180 176 181 // Display inputs for success/failure URLs. 177 182 $success_url_id = esc_attr( $this->get_field_id( 'success_url' ) ); … … 190 195 <input id="' . $failure_url_id . '" name="' . $failure_url . '" type="text" value="' . $instance['failure_url'] . '" /> 191 196 </p>'; 197 192 198 // Display autoresponder select menu. 193 199 $autoresponder_id = esc_attr( $this->get_field_id( 'autoresponder' ) ); -
smaily-for-wp/trunk/includes/class-smaily-for-wp.php
r2486913 r2873649 1 1 <?php 2 2 3 /** 3 4 * The core plugin class. … … 13 14 * @subpackage Smaily_For_WP/includes 14 15 */ 16 15 17 class Smaily_For_WP { 16 18 … … 62 64 */ 63 65 public function __construct() { 64 $this->version = SMLY4WP_PLUGIN_VERSION;66 $this->version = SMLY4WP_PLUGIN_VERSION; 65 67 $this->plugin_name = 'smaily-for-wp'; 66 68 $this->load_dependencies(); 67 69 $this->set_locale(); 68 70 $this->define_lifecycle_hooks(); 71 $this->init_blocks(); 69 72 $this->define_admin_hooks(); 70 73 $this->define_public_hooks(); … … 94 97 private function load_dependencies() { 95 98 require_once SMLY4WP_PLUGIN_PATH . 'admin/class-smaily-for-wp-admin.php'; 99 require_once SMLY4WP_PLUGIN_PATH . 'includes/class-smaily-for-wp-block.php'; 96 100 require_once SMLY4WP_PLUGIN_PATH . 'includes/class-smaily-for-wp-i18n.php'; 97 101 require_once SMLY4WP_PLUGIN_PATH . 'includes/class-smaily-for-wp-lifecycle.php'; … … 109 113 * Define the locale for this plugin for internationalization. 110 114 * 111 * Uses the Smaily_For_WP_ i18n class in order to set the domain and to register the hook115 * Uses the Smaily_For_WP_I18n class in order to set the domain and to register the hook 112 116 * with WordPress. 113 117 * … … 116 120 */ 117 121 private function set_locale() { 118 $plugin_i18n = new Smaily_For_WP_ i18n();122 $plugin_i18n = new Smaily_For_WP_I18n(); 119 123 $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); 124 } 125 126 /** 127 * Initialize Gutenberg blocks. 128 * 129 * @since 3.1.0 130 * @access private 131 */ 132 private function init_blocks() { 133 $plugin_block = new Smaily_For_WP_Block( $this->options, $this->get_plugin_name(), $this->get_version() ); 134 135 register_block_type( 136 SMLY4WP_PLUGIN_PATH . '/blocks', 137 array( 138 'render_callback' => array( $plugin_block, 'render' ), 139 ) 140 ); 120 141 } 121 142 … … 148 169 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); 149 170 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 171 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'smaily_subscription_block_init' ); 150 172 $this->loader->add_action( 'wp_ajax_smaily_admin_save', $plugin_admin, 'smaily_admin_save' ); 151 173 $this->loader->add_action( 'widgets_init', $plugin_admin, 'smaily_subscription_widget_init' ); -
smaily-for-wp/trunk/lang/smaily-for-wp-et.po
r2575319 r2873649 2 2 msgstr "" 3 3 "Project-Id-Version: Smaily for WP\n" 4 "POT-Creation-Date: 202 1-07-30 11:07+0300\n"5 "PO-Revision-Date: 202 1-07-30 11:07+0300\n"4 "POT-Creation-Date: 2023-03-02 15:00+0200\n" 5 "PO-Revision-Date: 2023-03-02 15:00+0200\n" 6 6 "Last-Translator: Smaily <[email protected]>\n" 7 7 "Language-Team: Smaily <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.3\n" 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3.2.2\n" 13 14 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n"15 15 "X-Poedit-KeywordsList: __;_e;_n:1,2;_n_noop:1,2;_x:1,2c;_nx:4c,1,2;" 16 16 "_nx_noop:4c,1,2;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;" … … 18 18 "X-Poedit-SearchPath-0: .\n" 19 19 20 #: admin/class-smaily-for-wp-admin.php:182 20 #: admin/class-smaily-for-wp-admin.php:103 21 #: includes/class-smaily-for-wp-widget.php:205 22 msgid "No autoresponder" 23 msgstr "Ilma automaatvastajata vorm" 24 25 #: admin/class-smaily-for-wp-admin.php:221 21 26 msgid "Please enter subdomain!" 22 27 msgstr "Palun sisesta alamdomeen!" 23 28 24 #: admin/class-smaily-for-wp-admin.php: 18629 #: admin/class-smaily-for-wp-admin.php:225 25 30 msgid "Please enter username!" 26 31 msgstr "Palun sisesta kasutajatunnus!" 27 32 28 #: admin/class-smaily-for-wp-admin.php: 19033 #: admin/class-smaily-for-wp-admin.php:229 29 34 msgid "Please enter password!" 30 35 msgstr "Palun sisesta parool!" 31 36 32 #: admin/class-smaily-for-wp-admin.php:2 0637 #: admin/class-smaily-for-wp-admin.php:245 33 38 msgid "Wrong credentials" 34 39 msgstr "Valed autentimise tunnused" 35 40 36 #: admin/class-smaily-for-wp-admin.php:2 1141 #: admin/class-smaily-for-wp-admin.php:250 37 42 msgid "Error in subdomain" 38 43 msgstr "Viga alamdomeenis" 39 44 40 #: admin/class-smaily-for-wp-admin.php:2 2145 #: admin/class-smaily-for-wp-admin.php:260 41 46 msgid "Something went wrong with request to Smaily" 42 47 msgstr "Ilmnes probleem Smaily-ga ühendamisel" 43 48 44 #: admin/class-smaily-for-wp-admin.php:2 3049 #: admin/class-smaily-for-wp-admin.php:269 45 50 msgid "Credentials validated." 46 51 msgstr "Autentimise tunnused valideeritud." 47 52 48 #: admin/class-smaily-for-wp-admin.php:2 4753 #: admin/class-smaily-for-wp-admin.php:286 49 54 msgid "Credentials removed." 50 55 msgstr "Autentimise tunnused eemaldatud." 51 56 52 #: admin/class-smaily-for-wp-admin.php: 26457 #: admin/class-smaily-for-wp-admin.php:303 53 58 msgid "Newsletter subscription form reset to default." 54 59 msgstr "Liitumisvormi kood taasloodud." 55 60 56 #: admin/class-smaily-for-wp-admin.php:3 0361 #: admin/class-smaily-for-wp-admin.php:342 57 62 msgid "Changes saved." 58 63 msgstr "Salvestatud." … … 86 91 msgstr "Kontrolli" 87 92 88 #: admin/partials/smaily-for-wp-admin-form.php:48 93 #: admin/partials/smaily-for-wp-admin-form.php:50 94 #: admin/partials/smaily-for-wp-admin-form.php:52 89 95 msgid "Basic" 90 96 msgstr "Tavaseaded" 91 97 92 #: admin/partials/smaily-for-wp-admin-form.php:49 98 #: admin/partials/smaily-for-wp-admin-form.php:57 99 #: admin/partials/smaily-for-wp-admin-form.php:59 93 100 msgid "Advanced" 94 101 msgstr "Spetsialisti seaded" 95 102 96 #: admin/partials/smaily-for-wp-admin-form.php: 55103 #: admin/partials/smaily-for-wp-admin-form.php:71 97 104 msgid "Newsletter subscription form" 98 105 msgstr "Uudiskirja liitumisvorm" 99 106 100 #: admin/partials/smaily-for-wp-admin-form.php: 55107 #: admin/partials/smaily-for-wp-admin-form.php:71 101 108 msgid "Restore original subscription form" 102 109 msgstr "Taasta algne liitumisvorm" 103 110 104 #: admin/partials/smaily-for-wp-admin-form.php: 55111 #: admin/partials/smaily-for-wp-admin-form.php:71 105 112 msgid "Regenerate" 106 113 msgstr "Taastekita" 107 114 108 #: admin/partials/smaily-for-wp-admin-form.php: 56115 #: admin/partials/smaily-for-wp-admin-form.php:72 109 116 msgid "HTML of subscription form" 110 117 msgstr "Liitumisvormi HTML" 111 118 112 #: admin/partials/smaily-for-wp-admin-form.php: 61119 #: admin/partials/smaily-for-wp-admin-form.php:77 113 120 msgid "Note: When you save under Basic tab, default form will be used." 114 121 msgstr "" 115 122 "Hoiatus: Kui salvestad Tavaseadete vaates, kasutatakse lehel vaikimisi vormi." 116 123 117 #: admin/partials/smaily-for-wp-admin-form.php: 64124 #: admin/partials/smaily-for-wp-admin-form.php:80 118 125 msgid "Save changes" 119 126 msgstr "Salvesta muudatused" … … 127 134 msgstr "Palun oota..." 128 135 129 #: includes/class-smaily-for-wp-widget.php:37 136 #: blocks/index.js:221 137 #, fuzzy 138 #| msgid "Email" 139 msgid "E-mail" 140 msgstr "E-post" 141 142 #: blocks/index.js:221 143 #, fuzzy 144 #| msgid "Email" 145 msgid "Smaily" 146 msgstr "E-post" 147 148 #: blocks/index.js:225 includes/class-smaily-for-wp-widget.php:40 149 msgid "Smaily Newsletter Subscription" 150 msgstr "Smaily uudiskirjaga liitumine" 151 152 #: includes/class-smaily-for-wp-widget.php:39 130 153 msgid "Smaily newsletter subscription form" 131 154 msgstr "Smaily uudiskirjaga liitumise vorm" 132 155 133 #: includes/class-smaily-for-wp-widget.php:38 134 msgid "Smaily Newsletter Subscription" 135 msgstr "Smaily uudiskirjaga liitumine" 136 137 #: includes/class-smaily-for-wp-widget.php:89 138 #: public/class-smaily-for-wp-public.php:104 156 #: includes/class-smaily-for-wp-widget.php:93 157 #: public/class-smaily-for-wp-public.php:106 139 158 msgid "Smaily credentials not validated. Subscription form will not work!" 140 159 msgstr "Smaily kasutajatunnused on valideerimata. Uudiskirja vorm ei tööta!" 141 160 142 #: includes/class-smaily-for-wp-widget.php: 96143 #: public/class-smaily-for-wp-public.php:11 1161 #: includes/class-smaily-for-wp-widget.php:100 162 #: public/class-smaily-for-wp-public.php:113 144 163 msgid "Form was not submitted using POST method." 145 164 msgstr "Andmeid peab saatma POST tegevusviisiga." 146 165 147 #: includes/class-smaily-for-wp-widget.php: 99148 #: public/class-smaily-for-wp-public.php:11 4166 #: includes/class-smaily-for-wp-widget.php:103 167 #: public/class-smaily-for-wp-public.php:116 149 168 msgid "Input does not contain a recognizable email address." 150 169 msgstr "Sisend ei sisalda tuntavat emaili aadressi." 151 170 152 #: includes/class-smaily-for-wp-widget.php:10 2153 #: public/class-smaily-for-wp-public.php:11 7171 #: includes/class-smaily-for-wp-widget.php:106 172 #: public/class-smaily-for-wp-public.php:119 154 173 msgid "" 155 174 "Could not add to subscriber list for an unknown reason. Probably something " … … 159 178 "probleem Smaily-s." 160 179 161 #: includes/class-smaily-for-wp-widget.php:16 4180 #: includes/class-smaily-for-wp-widget.php:168 162 181 msgid "Title" 163 182 msgstr "Pealkiri" 164 183 165 #: includes/class-smaily-for-wp-widget.php:17 4184 #: includes/class-smaily-for-wp-widget.php:178 166 185 msgid "Display name field?" 167 186 msgstr "Näita nime välja?" 168 187 169 #: includes/class-smaily-for-wp-widget.php:18 1188 #: includes/class-smaily-for-wp-widget.php:186 170 189 msgid "Success URL" 171 190 msgstr "Õnnestumise URL" 172 191 173 #: includes/class-smaily-for-wp-widget.php:1 89192 #: includes/class-smaily-for-wp-widget.php:194 174 193 msgid "Failure URL" 175 194 msgstr "Ebaõnnestumise URL" 176 195 177 #: includes/class-smaily-for-wp-widget.php: 197196 #: includes/class-smaily-for-wp-widget.php:203 178 197 msgid "Autoresponders" 179 198 msgstr "Automaatvastajad" 180 181 #: includes/class-smaily-for-wp-widget.php:199182 msgid "No autoresponder"183 msgstr "Ilma automaatvastajata vorm"184 199 185 200 #: public/partials/smaily-for-wp-public-basic.php:3 -
smaily-for-wp/trunk/migrations/upgrade-3-0-0.php
r2575319 r2873649 1 1 <?php 2 2 3 /** 3 4 * Apply any database upgrades required for 3.0.0. … … 11 12 * @since 3.0.0 12 13 */ 14 13 15 $upgrade = function() { 14 16 global $wpdb; 15 $table_name = $wpdb->prefix . 'smaily_config';16 17 17 if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) === $table_name) {18 $config = $wpdb->get_row( "SELECT * FROM `$table_name`LIMIT 1", ARRAY_A );18 if ( $wpdb->get_var( "SHOW TABLES LIKE {$wpdb->prefix}smaily_config" ) === $wpdb->prefix . 'smaily_config' ) { 19 $config = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}smaily_config LIMIT 1", ARRAY_A ); 19 20 // Get saved autoresponder ID. 20 21 $autoresponder_id = isset( $config['autoresponder'] ) ? $config['autoresponder'] : ''; -
smaily-for-wp/trunk/public/class-smaily-for-wp-public.php
r2493245 r2873649 1 1 <?php 2 2 3 /** 3 4 * The public-facing functionality of the plugin. … … 7 8 * @subpackage Smaily_For_WP/public 8 9 */ 10 9 11 class Smaily_For_WP_Public { 10 12 … … 76 78 77 79 // Parse attributes out of shortcode tag. 78 $shortcode_atts = shortcode_atts(80 $shortcode_atts = shortcode_atts( 79 81 array( 80 82 'success_url' => get_site_url(), -
smaily-for-wp/trunk/public/partials/smaily-for-wp-public-advanced.php
r2485930 r2873649 1 <?php echo html_entity_decode( $this->form ); ?>1 <?php echo html_entity_decode( $this->form ); -
smaily-for-wp/trunk/public/partials/smaily-for-wp-public-basic.php
r2485930 r2873649 2 2 <p class="error" style="padding:15px;background-color:#f2dede;margin:0 0 10px;display:<?php echo $this->form_has_response ? 'block' : 'none'; ?>"><?php echo esc_html( $this->response_message ); ?></p> 3 3 <p class="success" style="padding:15px;background-color:#dff0d8;margin:0 0 10px;display:<?php echo $this->form_is_successful ? 'block' : 'none'; ?>"><?php echo esc_html__( 'Thank you for subscribing to our newsletter.', 'smaily-for-wp' ); ?></p> 4 <?php if ( $this->autoresponder_id ) : ?>4 <?php if ( $this->autoresponder_id ) : ?> 5 5 <input type="hidden" name="autoresponder" value="<?php echo $this->autoresponder_id; ?>" /> 6 6 <?php endif; ?> 7 <input type="hidden" name="lang" value="<?php echo esc_html( $this->get LanguageCode() ); ?>" />7 <input type="hidden" name="lang" value="<?php echo esc_html( $this->get_language_code() ); ?>" /> 8 8 <input type="hidden" name="success_url" value="<?php echo $this->success_url ? $this->success_url : get_site_url(); ?>" /> 9 9 <input type="hidden" name="failure_url" value="<?php echo $this->failure_url ? $this->failure_url : get_site_url(); ?>" /> -
smaily-for-wp/trunk/readme.txt
r2625099 r2873649 4 4 Requires PHP: 5.6 5 5 Requires at least: 4.0 6 Stable tag: 3. 0.76 Stable tag: 3.1.0 7 7 Tags: widget, plugin, sidebar, api, mail, email, marketing, smaily 8 Tested up to: 5.8.08 Tested up to: 6.1.1 9 9 10 10 Smaily newsletter subscription plugin for WordPress … … 77 77 == Changelog == 78 78 79 = 3.1.0 = 80 - Basic Gutenberg blocks support 81 79 82 = 3.0.7 = 80 83 - Fix automation workflows being fetched on every operation in WordPress. -
smaily-for-wp/trunk/smaily-for-wp.php
r2625099 r2873649 10 10 * Text Domain: smaily-for-wp 11 11 * Description: Smaily newsletter subscription form. 12 * Version: 3. 0.712 * Version: 3.1.0 13 13 * Author: Sendsmaily LLC 14 14 * Author URI: https://smaily.com … … 25 25 * Current plugin version. 26 26 */ 27 define( 'SMLY4WP_PLUGIN_VERSION', '3. 0.7' );27 define( 'SMLY4WP_PLUGIN_VERSION', '3.1.0' ); 28 28 29 29 /** -
smaily-for-wp/trunk/vendor/autoload.php
r2625099 r2873649 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e877::getLoader();25 return ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990::getLoader(); -
smaily-for-wp/trunk/vendor/composer/ClassLoader.php
r2614685 r2873649 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 109 113 } 110 114 … … 150 154 /** 151 155 * @return string[] Array of classname => path 152 * @psalm- vararray<string, string>156 * @psalm-return array<string, string> 153 157 */ 154 158 public function getClassMap() … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 429 434 430 435 return true; … … 556 561 return false; 557 562 } 563 564 /** 565 * @return void 566 */ 567 private static function initializeIncludeClosure() 568 { 569 if (self::$includeFile !== null) { 570 return; 571 } 572 573 /** 574 * Scope isolated include. 575 * 576 * Prevents access to $this/self from included files. 577 * 578 * @param string $file 579 * @return void 580 */ 581 self::$includeFile = \Closure::bind(static function($file) { 582 include $file; 583 }, null, null); 584 } 558 585 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
smaily-for-wp/trunk/vendor/composer/InstalledVersions.php
r2625099 r2873649 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions … … 27 29 /** 28 30 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 30 32 */ 31 33 private static $installed; … … 38 40 /** 39 41 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 41 43 */ 42 44 private static $installedByVendor = array(); … … 242 244 /** 243 245 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 247 */ 246 248 public static function getRootPackage() … … 256 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 257 259 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 259 261 */ 260 262 public static function getRawData() … … 279 281 * 280 282 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 282 284 */ 283 285 public static function getAllRawData() … … 302 304 * @return void 303 305 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 305 307 */ 306 308 public static function reload($data) … … 312 314 /** 313 315 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 315 317 */ 316 318 private static function getInstalled() -
smaily-for-wp/trunk/vendor/composer/autoload_classmap.php
r2575319 r2873649 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
smaily-for-wp/trunk/vendor/composer/autoload_namespaces.php
r2575319 r2873649 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
smaily-for-wp/trunk/vendor/composer/autoload_psr4.php
r2575319 r2873649 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
smaily-for-wp/trunk/vendor/composer/autoload_real.php
r2625099 r2873649 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e8775 class ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e877', 'loadClassLoader'), true, true);26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));27 spl_autoload_unregister(array('ComposerAutoloaderInit8 8c0474316a09b223d787fb04022e877', 'loadClassLoader'));25 spl_autoload_register(array('ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990', 'loadClassLoader'), true, true); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit814b5d616008b0576aeb0740be7b0990', 'loadClassLoader')); 28 28 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 30 if ($useStaticLoader) { 31 require __DIR__ . '/autoload_static.php'; 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit88c0474316a09b223d787fb04022e877::getInitializer($loader)); 34 } else { 35 $map = require __DIR__ . '/autoload_namespaces.php'; 36 foreach ($map as $namespace => $path) { 37 $loader->set($namespace, $path); 38 } 39 40 $map = require __DIR__ . '/autoload_psr4.php'; 41 foreach ($map as $namespace => $path) { 42 $loader->setPsr4($namespace, $path); 43 } 44 45 $classMap = require __DIR__ . '/autoload_classmap.php'; 46 if ($classMap) { 47 $loader->addClassMap($classMap); 48 } 49 } 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit814b5d616008b0576aeb0740be7b0990::getInitializer($loader)); 50 31 51 32 $loader->register(true); -
smaily-for-wp/trunk/vendor/composer/autoload_static.php
r2625099 r2873649 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit8 8c0474316a09b223d787fb04022e8777 class ComposerStaticInit814b5d616008b0576aeb0740be7b0990 8 8 { 9 9 public static $classMap = array ( … … 14 14 { 15 15 return \Closure::bind(function () use ($loader) { 16 $loader->classMap = ComposerStaticInit8 8c0474316a09b223d787fb04022e877::$classMap;16 $loader->classMap = ComposerStaticInit814b5d616008b0576aeb0740be7b0990::$classMap; 17 17 18 18 }, null, ClassLoader::class); -
smaily-for-wp/trunk/vendor/composer/installed.php
r2625099 r2873649 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '3.0.7', 4 'version' => '3.0.7.0', 3 'name' => 'smaily/smaily_for_wp', 4 'pretty_version' => '3.1.0', 5 'version' => '3.1.0.0', 6 'reference' => 'b04212fd42f202551db5ff56b280643da8a68edc', 5 7 'type' => 'plugin', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => 'fa56715956b0051386be20ffb4993a7539c91528',9 'name' => 'smaily/smaily_for_wp',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'smaily/smaily_for_wp' => array( 14 'pretty_version' => '3.0.7', 15 'version' => '3.0.7.0', 14 'pretty_version' => '3.1.0', 15 'version' => '3.1.0.0', 16 'reference' => 'b04212fd42f202551db5ff56b280643da8a68edc', 16 17 'type' => 'plugin', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => 'fa56715956b0051386be20ffb4993a7539c91528',20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.