Title: aksl's Replies | WordPress.org

---

# aksl

  [  ](https://wordpress.org/support/users/aksl/)

 *   [Profile](https://wordpress.org/support/users/aksl/)
 *   [Topics Started](https://wordpress.org/support/users/aksl/topics/)
 *   [Replies Created](https://wordpress.org/support/users/aksl/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/aksl/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/aksl/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/aksl/engagements/)
 *   [Favorites](https://wordpress.org/support/users/aksl/favorites/)

 Search replies:

## Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Photography Management - WordPress Photo Proofing Plugin] Suggestion: add ‘full’ to help quality issues with portraits](https://wordpress.org/support/topic/suggestion-add-full-to-help-quality-issues-with-portraits/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/suggestion-add-full-to-help-quality-issues-with-portraits/#post-13090324)
 * On a further thought, you could just strip the condition together and always 
   append the original size to the output, because the browser will decide the image
   via the srcset attribute. The only thing that should be added is the watermarking
   of original image. This would be the code for the relevant part, with the condition
   being commented out:
 *     ```
       //if (\count($mapped_sizes) === 0) {
         $width =
           \hacklib_cast_as_boolean(\array_key_exists("width", $imagedata))
             ? ((int) $imagedata[\hacklib_id("width")])
             : null;
         $height =
           \hacklib_cast_as_boolean(\array_key_exists("height", $imagedata))
             ? ((int) $imagedata[\hacklib_id("height")])
             : null;
         if (($width !== null) && ($height !== null)) {
           $url = \wp_get_attachment_url($id);
           // added: watermarking of the original image
           if (\hacklib_cast_as_boolean($watermark)) {
             $url = self::get_watermark_url($url, $query_args);
           }
           $url = Utils::get_protocol_relative_url($url);
           $mapped_sizes[] = array(
             "url" => $url,
             "width" => $width,
             "height" => $height,
             "name" => "original"
           );
         }
       //}
       ```
   
 * Might cause some side effects(?), not sure if the ‘sizes’ array element of the
   get_image() response is used in other cases.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Photography Management - WordPress Photo Proofing Plugin] Suggestion: add ‘full’ to help quality issues with portraits](https://wordpress.org/support/topic/suggestion-add-full-to-help-quality-issues-with-portraits/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/suggestion-add-full-to-help-quality-issues-with-portraits/#post-13090156)
 * Because there can be custom image sizes, perhaps this type of approach would 
   work with _codeneric\phmm\base\includes\Image::get\_image()_.
 * After line 29:
 *     ```
       $small_sizes_names = array("thumbnail", "medium");
       $small_sizes_count = \count(\array_intersect($uncropped_sizes_names, $small_sizes_names));
       ```
   
 * Replace line 78 `if (\count($mapped_sizes) === 0) {` with:
    `if (\count($mapped_sizes)
   === 0 || \count($mapped_sizes) <= $small_sizes_count) {`
 * Did a quick test and seemed to work. One additional thing that you might to consider
   is to label the “medium_large” as a “small” size, so that you will have full 
   size when the gallery is displayed with 1-column view.
    -  This reply was modified 5 years, 10 months ago by [aksl](https://wordpress.org/support/users/aksl/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] 500 Error – File upload firewall rules causes timeout](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/#post-10895795)
 * Gravity Forms form with a file upload field used for image uploads.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] 500 Error – File upload firewall rules causes timeout](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/#post-10892465)
 * Sent the file on 13th. Got it?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] 500 Error – File upload firewall rules causes timeout](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/#post-10857205)
 * I was able to reproduce the issue while not logged in. Disabling the firewall
   rule “file_upload Malicious File Upload (Patterns)” fixed the issue, so it seems
   to be the root cause. If it helps, the PHP version in use before 7.2 was 7.0.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] 500 Error – File upload firewall rules causes timeout](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/500-error-file-upload-firewall-rules-causes-timeout/#post-10854276)
 * Temporarily disabling all the File Upload rules did the trick earlier. I re-enabled
   all but the “file_upload Malicious File Upload (Patterns)”. I can’t reproduce
   the issue myself, so will have to wait a few days to see if any failed requests
   end up in error log.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Reusable Text Blocks] Retrieving via slug conflicts with Polylang](https://wordpress.org/support/topic/retrieving-via-slug-conflicts-with-polylang/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/retrieving-via-slug-conflicts-with-polylang/#post-9462687)
 * Workaround for the issue (translates slug to ID without applying the wpml_object_id
   filter):
 *     ```
       add_filter( 'text_blocks_show_text_block_id', 'fix_tb_wpml_bug' );
   
       function fix_tb_wpml_bug( $id )
       {
           if ( !is_numeric( $id ) ) {
               $page = get_page_by_path( $id, null, 'text-blocks' );
               if ( $page ) {
                   $id = $page->ID;
               } else {
                   $id = 0;
               }
           }
   
           return $id;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Add option to prevent wpautop for HTML mails](https://wordpress.org/support/topic/add-option-to-prevent-wpautop-for-html-mails/)
 *  Thread Starter [aksl](https://wordpress.org/support/users/aksl/)
 * (@aksl)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/add-option-to-prevent-wpautop-for-html-mails/#post-6801352)
 * WPCF7_AUTOP does not apply, checked the source code, hence the request.
 * Reverting the effects of autop takes some effort (linebreaks, paragraph tags),
   given that one might need to use them in the mail template.
 * One (lenghty) way to do it would be to hook _wpcf7\_before\_send\_mail_, replace
   any paragraphs and linebreaks (<p>, </p>, 
   ) to something else (<actual-p>, </
   actual-p>, …), then hook _wpcf7\_mail\_components_ to remove the effects of autop,
   and then convert the magical tags (<actual-p>, …) to real tags. I’d still wish
   that there was a filter (“wpcf_autop_html_mails”) that would control the behaviour.

Viewing 8 replies - 1 through 8 (of 8 total)