Title: PHP code proposal
Last modified: March 21, 2022

---

# PHP code proposal

 *  Resolved [lofesa](https://wordpress.org/support/users/lofesa/)
 * (@lofesa)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-code-proposal/)
 * Hi
 * 1.- In the file `smart-slider-3/Nextend/SmartSlider3/Slider/SliderType/Simple/
   SliderTypeSimpleFrontend.php` lines 64 and 72 are this code
    `64 <div class="
   n2-ss-slider-1 n2_ss__touch_element n2-ow" style="<?php echo Sanitize::esc_attr(
   $sliderCSS); ?>">` `72 <div class="n2-ss-slider-3 n2-ow" style="<?php echo $slideCSS;?
   >">`
 * But when `$slideCSS` is empty the output contais a `style=>`
    So changin `style
   ="<?php echo Sanitize::esc_attr($sliderCSS); ?>">`` with some like `<?php if (!
   empty($sliderCSS)) echo 'style="' . Sanitize::esc_attr($sliderCSS);` the output
   don´t contain an empty attribute.
 * 2.- When this svg is created in the same file as 1 in line 85
    `<svg viewBox="
   0 0 1400 600" data-related-device="desktopPortrait" class="n2-ow n2-ss-preserve-
   size n2-ss-preserve-size--slider n2-ss-slide-limiter"></svg>` Some html parsers
   throw error of unmatched `</svg>` label. Putting a space then between th `>` 
   and the `</svg>` the report pases.
    -  This topic was modified 4 years, 2 months ago by [lofesa](https://wordpress.org/support/users/lofesa/).

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/php-code-proposal/?output_format=md) [1](https://wordpress.org/support/topic/php-code-proposal/?output_format=md)
2

 *  Thread Starter [lofesa](https://wordpress.org/support/users/lofesa/)
 * (@lofesa)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php-code-proposal/page/2/#post-15485040)
 * Hi [@nextend_ramona](https://wordpress.org/support/users/nextend_ramona/)
 * Well… the plugin is doing the rigth way, I have tested more deeper and in the
 *     ```
       if ($content === false) {
                 return $closeTag && self::$closeSingleTags ? $html . ' />' : $html . '>'; 
               } else {
                 return $closeTag ? $html . '>' . $content . '</' . $tag . '>' : $html . '>' . $content;
               }
       ```
   
 * take the else way.
 * I need to debug what is adding the `/` and stripping the xmnls attribute.
 * Thx for your time and sorry for bother you. I will come here when found the issue
   origin.
 * EDIT: Found it. Is a lazy-load plugin called “Lazy loader”, when disabled the
   issue is gone. The plugin has an option to parse all the html (by defaul only
   works with `the_content()` so this option is needed for lazyload images out of
   it).
    I will investigate it.
    -  This reply was modified 4 years, 2 months ago by [lofesa](https://wordpress.org/support/users/lofesa/).
    -  This reply was modified 4 years, 2 months ago by [lofesa](https://wordpress.org/support/users/lofesa/).

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/php-code-proposal/?output_format=md) [1](https://wordpress.org/support/topic/php-code-proposal/?output_format=md)
2

The topic ‘PHP code proposal’ is closed to new replies.

 * ![](https://ps.w.org/smart-slider-3/assets/icon.svg?rev=2307688)
 * [Smart Slider 3](https://wordpress.org/plugins/smart-slider-3/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-slider-3/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-slider-3/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-slider-3/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-slider-3/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-slider-3/reviews/)

 * 16 replies
 * 3 participants
 * Last reply from: [lofesa](https://wordpress.org/support/users/lofesa/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/php-code-proposal/page/2/#post-15485040)
 * Status: resolved