Plugin Directory

Changeset 3261841


Ignore:
Timestamp:
03/25/2025 11:56:26 PM (12 months ago)
Author:
etruel
Message:

2.8.1 Mar 25, 2025

Location:
wpematico
Files:
158 added
7 edited

Legend:

Unmodified
Added
Removed
  • wpematico/trunk/app/campaign_edit_functions.php

    r3249023 r3261841  
    508508                <input class="checkbox" value="1" type="checkbox" <?php checked($campaign_attach_img,true); ?> name="campaign_attach_img" id="campaign_attach_img" /><b>&nbsp;<label for="campaign_attach_img"><?php _e('Attach Images to posts.', 'wpematico' ); ?></label></b><span class="dashicons dashicons-warning help_tip" title="<?php echo $helptip['imgattach']; ?>"></span><br/>
    509509
    510                 <p class="campaign_attr_image_p" style="margin-top:-2px; <?php if(!$campaign_attach_img) echo 'display:none;'; ?>"><input class="checkbox" value="1" type="checkbox" <?php checked($campaign_attr_images, true); ?>  name="campaign_attr_images" id="campaign_attr_images" /><b>&nbsp;<label for="campaign_attr_images"><?php _e('Save Image attributes on WP Media.', 'wpematico' ); ?></label></b><span class="dashicons dashicons-warning help_tip" title="<?php echo $helptip['save_attr_images']; ?>"></span></p>
     510                <p class="campaign_attr_image_p" style="margin-top:-2px;"><input class="checkbox" value="1" type="checkbox" <?php checked($campaign_attr_images, true); ?>  name="campaign_attr_images" id="campaign_attr_images" /><b>&nbsp;<label for="campaign_attr_images"><?php _e('Save Image attributes on WP Media.', 'wpematico' ); ?></label></b><span class="dashicons dashicons-warning help_tip" title="<?php echo $helptip['save_attr_images']; ?>"></span></p>
    511511               
    512512                <input name="campaign_nolinkimg" id="campaign_nolinkimg" class="checkbox" value="1" type="checkbox" <?php checked($campaign_nolinkimg,true); ?> />&nbsp;<label for="campaign_nolinkimg"><?php _e('Remove link to source images', 'wpematico' ); ?></label> <span class="dashicons dashicons-warning help_tip" title="<?php echo $helptip['gralnolinkimg']; ?>"></span><br/>
  • wpematico/trunk/app/campaign_fetch.php

    r3249023 r3261841  
    482482            }
    483483        }
    484 
     484       
    485485        if ($options_images['rmfeaturedimg']) { // removes featured from content
    486486            if(!empty($this->current_item['featured_image'])){
     
    490490            }
    491491        }
    492 
     492       
    493493        /**
    494494         * @since 2.7.7
  • wpematico/trunk/app/campaign_fetch_functions.php

    r3249023 r3261841  
    469469                    ///////////////***************************************************************************************////////////////////////
    470470                    $newimgname      = apply_filters('wpematico_newimgname', sanitize_file_name(urlencode(basename($imagen_src_real))), $current_item, $campaign, $item);  // new name here
    471                     // Primero intento con mi funcion mas rapida
    472                     $newimgname      = substr($newimgname , 0, 255);
     471                   
     472                    // We need to cut the number of characters in the name to avoid upload errors by OS limits.
     473                    $newimgname      = mb_substr($newimgname , 0, 245);
     474                   
     475                    // First I try my fastest function
    473476                    $upload_dir      = wp_upload_dir();
    474477                    $imagen_dst      = trailingslashit($upload_dir['path']) . $newimgname;
     
    789792               
    790793                $new_content = apply_filters('wpematico_filter_attr_images', $new_content, $attributes);
    791                 $out[2] = wp_parse_args(array($attributes['src']));
     794               
     795                // Merges the new 'src' attribute with existing $out[2] values, preserving previous entries.
     796                // wp_parse_args() instead of array_merge() as this did strange things.
     797                $out[2] = wp_parse_args(array($attributes['src']), $out[2]);
    792798               
    793799                // Store attributes in the image_attributes_array
  • wpematico/trunk/app/plugin_functions.php

    r3249023 r3261841  
    5050            </a>
    5151            <div class="wpe_modal_log-header">
    52                 <h3><?php _e('QUICK FEEDBACK', 'wpematico') ?></h3>
     52                <h3><?php esc_html_e('Quick Feedback', 'wpematico') ?></h3>
    5353            </div>
    5454            <div class="wpe_modal_log-content">
    55                 <h3><?php _e("If you have a moment, please let us know why you're deactivating:", 'wpematico') ?></h3>
     55                <h3><?php esc_html_e("We’d love to know why you're deactivating. Your feedback helps us improve!", 'wpematico') ?></h3>
    5656                <form id="feedback_form">
    5757                    <label>
    5858                        <input type="radio" name="deactivation_reason" value="short_period" required>
    59                         <?php _e('I only needed the plugin for a short period', 'wpematico') ?>
     59                        <?php esc_html_e('✅ I only needed the plugin temporarily', 'wpematico') ?>
     60                    </label><br>
     61                    <label>
     62                        <input type="radio" name="deactivation_reason" value="temporary_deactivation">
     63                        <?php esc_html_e('🔧 I’m troubleshooting an issue and will likely reactivate it', 'wpematico') ?>
     64                    </label><br>
     65                    <label>
     66                        <input type="radio" name="deactivation_reason" value="stopped_working">
     67                        <?php esc_html_e("⚡ The plugin isn’t working as expected (we can help fix it!)", 'wpematico') ?>
     68                    </label><br>
     69                    <label>
     70                        <input type="radio" name="deactivation_reason" value="broke_site" id="broke_site_radio">
     71                        <?php esc_html_e('❌ The plugin caused issues on my site (let us know so we can resolve them)', 'wpematico') ?>
     72                    </label><br>
     73                    <label>
     74                        <input type="radio" name="deactivation_reason" value="another_plugin">
     75                        <?php esc_html_e('🔄 I’m switching to another plugin (tell us what’s missing, and we may add it!)', 'wpematico') ?>
    6076                    </label><br>
    6177                    <label>
    6278                        <input type="radio" name="deactivation_reason" value="no_longer_needed">
    63                         <?php _e('I no longer need the plugin', 'wpematico') ?>
    64                     </label><br>
    65                     <label>
    66                         <input type="radio" name="deactivation_reason" value="stopped_working">
    67                         <?php _e('The plugin suddenly stopped working', 'wpematico') ?>
    68                     </label><br>
    69                     <label>
    70                         <input type="radio" name="deactivation_reason" value="broke_site">
    71                         <?php _e('The plugin broke my site', 'wpematico') ?>
    72                     </label><br>
    73                     <label>
    74                         <input type="radio" name="deactivation_reason" value="better_plugin">
    75                         <?php _e('I found a better plugin', 'wpematico') ?>
    76                     </label><br>
    77                     <label>
    78                         <input type="radio" name="deactivation_reason" value="temporary_deactivation">
    79                         <?php _e("It's a temporary deactivation - I'm troubleshooting an issue", 'wpematico') ?>
     79                        <?php esc_html_e('🤷 I no longer need it', 'wpematico') ?>
    8080                    </label><br>
    8181                    <label>
    8282                        <input type="radio" name="deactivation_reason" value="other">
    83                         <?php _e('Other', 'wpematico') ?>
     83                        <?php esc_html_e('📝 Other', 'wpematico') ?>
    8484                    </label>
     85                    <div id="other_reason_div" style="margin-left:40px; display: none;">
     86                        <label for="other_reason">
     87                            <b><?php esc_html_e('Tell us more about your experience: (Optional)', 'wpematico') ?></b>
     88                        </label><br>
     89                        <textarea name="explicit_reason" id="other_reason" style="width: 100%;"></textarea>
     90                    </div>
    8591                    <div class="form_footer">
     92                        <div style="float: left; margin-left: 20px;"><?php printf( esc_html__('💡 Remember, we offer FREE support on %s.', 'wpematico'),
     93                            '<a href="https://etruel.com/my-account/support/" target="_blank" rel="noopener noreferrer" class="support-link">' . esc_html__('Our Site', 'wpematico') . '</a>');
     94                            esc_html_e(' – we’re happy to help!', 'wpematico'); ?>
     95                        </div>
    8696                        <button id="send_feedback" type="submit" class="button"><?php _e('Send & deactivate', 'wpematico') ?></button>
    8797                    </div>
     
    96106            jQuery('body').addClass('wpe_modal_log-is-active');
    97107        });
     108
     109        jQuery('[name=deactivation_reason]').on("change", function () {
     110            var $otherReasonDiv = jQuery('#other_reason_div');
     111            $otherReasonDiv.hide();
     112           
     113            let selected = jQuery('input[name="deactivation_reason"]:checked').val();
     114            let tellmore = ['stopped_working', 'broke_site', 'another_plugin', 'no_longer_needed', 'other'];
     115           
     116            if (tellmore.includes(selected)) {
     117                // Move the div immediately after the selected radio label
     118                $otherReasonDiv.insertAfter(jQuery(this).closest('label'));
     119                $otherReasonDiv.fadeIn();
     120            }
     121        });
    98122       
    99123        jQuery('#feedback_form').on('submit', function(e) {
    100         e.preventDefault(); // Prevent form from submitting the default way
    101         var reason = jQuery('input[name="deactivation_reason"]:checked').val(); // Get the selected reason
    102 
    103         // Send AJAX request to the server
    104         jQuery.ajax({
    105             url: ajaxurl, // WordPress AJAX URL
    106             type: 'POST',
    107             data: {
    108                 action: 'handle_feedback_submission', // The PHP function to handle the feedback
    109                 reason: reason
    110             },
    111             success: function(response) {
    112                 if(response.success) {
    113                     // Close the feedback modal
    114                     jQuery('#wpe_feedback').fadeToggle().removeClass('active');
    115                     jQuery('body').removeClass('wpe_modal_log-is-active');
    116 
    117                     // Reload the page and display the success message
    118                     alert(response.data.message); // Display the success message
    119                     location.reload(); // Reload the page
    120                 } else {
    121                     alert('Error: ' + response.data); // Handle errors, if any
    122                 }
    123             },
    124             error: function() {
    125                 alert('An unexpected error occurred.');
    126             }
    127         });
    128     });
    129 
    130     jQuery('#skip_feedback').on('click', function() {
    131        // Send AJAX request to the server
    132        jQuery.ajax({
    133             url: ajaxurl, // WordPress AJAX URL
    134             type: 'POST',
    135             data: {
    136                 action: 'handle_feedback_submission', // The PHP function to handle the feedback
    137                 reason: 'skipped'
    138             },
    139             success: function(response) {
    140                 if(response.success) {
    141                     // Close the feedback modal
    142                     jQuery('#wpe_feedback').fadeToggle().removeClass('active');
    143                     jQuery('body').removeClass('wpe_modal_log-is-active');
    144 
    145                     // Reload the page and display the success message
    146                     alert(response.data.message); // Display the success message
    147                     location.reload(); // Reload the page
    148                 } else {
    149                     alert('Error: ' + response.data); // Handle errors, if any
    150                 }
    151             },
    152             error: function() {
    153                 alert('An unexpected error occurred.');
    154             }
    155         });
    156     });
     124            e.preventDefault(); // Prevent form from submitting the default way
     125            var reason = jQuery('input[name="deactivation_reason"]:checked').val(); // Get the selected reason
     126            var explicit_reason = jQuery('#other_reason').val();
     127
     128            // Send AJAX request to the server
     129            jQuery.ajax({
     130                url: ajaxurl, // WordPress AJAX URL
     131                type: 'POST',
     132                data: {
     133                    action: 'handle_feedback_submission', // The PHP function to handle the feedback
     134                    reason: reason,
     135                    explicit_reason: explicit_reason
     136                },
     137                success: function(response) {
     138                    if(response.success) {
     139                        // Close the feedback modal
     140                        jQuery('#wpe_feedback').fadeToggle().removeClass('active');
     141                        jQuery('body').removeClass('wpe_modal_log-is-active');
     142
     143                        // Reload the page and display the success message
     144                        alert(response.data.message); // Display the success message
     145                        location.reload(); // Reload the page
     146                    } else {
     147                        alert('Error: ' + response.data); // Handle errors, if any
     148                    }
     149                },
     150                error: function() {
     151                    alert('An unexpected error occurred.');
     152                }
     153            });
     154        });
     155
     156        jQuery('#skip_feedback').on('click', function() {
     157           // Send AJAX request to the server
     158           jQuery.ajax({
     159                url: ajaxurl, // WordPress AJAX URL
     160                type: 'POST',
     161                data: {
     162                    action: 'handle_feedback_submission', // The PHP function to handle the feedback
     163                    reason: 'skipped'
     164                },
     165                success: function(response) {
     166                    if(response.success) {
     167                        // Close the feedback modal
     168                        jQuery('#wpe_feedback').fadeToggle().removeClass('active');
     169                        jQuery('body').removeClass('wpe_modal_log-is-active');
     170
     171                        // Reload the page and display the success message
     172                        alert(response.data.message); // Display the success message
     173                        location.reload(); // Reload the page
     174                    } else {
     175                        alert('Error: ' + response.data); // Handle errors, if any
     176                    }
     177                },
     178                error: function() {
     179                    alert('An unexpected error occurred.');
     180                }
     181            });
     182        });
    157183    </script>
    158184    <?php
     
    167193    // Get the feedback reason from the form
    168194    $reason = isset($_POST['reason']) ? sanitize_text_field($_POST['reason']) : '';
    169 
     195    $explicit_reason = isset($_POST['explicit_reason']) ? sanitize_text_field($_POST['explicit_reason']) : '';
    170196    // Prepare the email
    171197    $to = '[email protected]';
    172198    $subject = 'Plugin Deactivation Feedback';
    173199    $message = "A user deactivated the plugin for the following reason: " . $reason;
     200    $message .= "\n\nThe user wrote the following $explicit_reason";
    174201    $headers = ['From: ' . get_bloginfo('name') . ' <wordpress@' . parse_url(home_url(), PHP_URL_HOST) . '>'];
    175202
     
    180207
    181208        // Return success message
    182         wp_send_json_success(['message' => 'Deactivate successfully']);
     209        wp_send_json_success(['message' => esc_html__('Deactivated successfully','wpematico') ]);
    183210    } else {
    184211        // Return error message if email fails
  • wpematico/trunk/app/settings_page.php

    r3249023 r3261841  
    404404                                                <input class="checkbox" value="1" type="checkbox" <?php checked($cfg['imgattach'], true); ?> name="imgattach" id="imgattach" /><b>&nbsp;<label for="imgattach"><?php _e('Attach Images to posts.', 'wpematico'); ?></label></b><span class="dashicons dashicons-warning help_tip" title="<?php echo $helptip['imgattach']; ?>"></span>
    405405                                                <br/>
    406                                                 <p class="attr_image_p" style="margin-top:-2px; <?php if(!$cfg['imgattach']) echo 'display:none;'; ?>">
     406                                                <p class="attr_image_p" style="margin-top:-2px;">
    407407                                                    <input class="checkbox"  value="1" type="checkbox" <?php checked($cfg['save_attr_images'], true); ?> name="save_attr_images" id="save_attr_images" /><b>&nbsp;<label for="save_attr_images"><?php _e('Save Image attributes on WP Media.', 'wpematico'); ?></label></b><span class="dashicons dashicons-warning help_tip" title="<?php echo $helptip['save_attr_images']; ?>"></span>
    408408                                                </p>
  • wpematico/trunk/readme.txt

    r3249023 r3261841  
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B8V39NWK3NFQU
    44Tags: RSS,XML,rss to blog,feed to post,rss aggregator
    5 Stable tag: 2.8
     5Stable tag: 2.8.1
    66Tested up to: 6.7.2
    77Requires at least: 4.8
     
    244244> See all detailed changelog at [WPeMatico Releases](https://wpematico.com/releases/)
    245245
     246= 2.8.1 Mar 25, 2025 =
     247
     248* **Fixed few bugs incorporated in the last version.**
     249* Fixes images fetched from the enclosure being skipped during processing on Professional Extension.
     250* Fixes featured image assignment issue where the last image was being assigned instead of the first one.
     251* Fixes visibility issue with the "Save Image attributes on WP Media" option, which was hidden unintentionally.
     252* Improves feedback popup notifications for better user experience.
     253
    246254= 2.8 Mar 1, 2025 =
    247255
     
    280288> * Fixes Notice: Function _load_textdomain_just_in_time was called incorrectly.
    281289> * Fixes **several security issues** to enhance plugin stability and safety.
    282 
    283290
    284291#### _Recent (may break) changes:_
     
    423430== Upgrade Notice ==
    424431
    425 Major version. Make backup before update! See changelog for tweaks and improvements in this version.
     432Fixes few bugs about images incorporated in the last version.
  • wpematico/trunk/wpematico.php

    r3249023 r3261841  
    44 * Plugin URI: https://www.wpematico.com
    55 * Description: Create posts automatically from RSS/Atom feeds organized into campaigns with multiples filters.  If you like it, please rate it 5 stars.
    6  * Version: 2.8
     6 * Version: 2.8.1
    77 * Author: Etruel Developments LLC
    88 * Author URI: https://etruel.com/wpematico/
     
    2828        private function setup_constants() {
    2929            if (!defined('WPEMATICO_VERSION'))
    30                 define('WPEMATICO_VERSION', '2.8');
     30                define('WPEMATICO_VERSION', '2.8.1');
    3131            if (!defined('WPEMATICO_BASENAME'))
    3232                define('WPEMATICO_BASENAME', plugin_basename(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.