Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
KingYes committed Nov 3, 2016
2 parents e4c1030 + a3c561a commit 5e84140
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 73 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Tags:** page builder, editor, builder, visual editor, front-end editor, design, drag and drop builder, front-end builder, landing page, page builder plugin, site builder, template builder, visual builder, website builder, wysiwyg
**Requires at least:** 4.4
**Tested up to:** 4.6
**Stable tag:** 0.10.5
**Stable tag:** 0.10.6
**License:** GPLv3
**License URI:** https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -161,6 +161,9 @@ No. Elementor supports WordPress 4.4 or greater, and is compatible with PHP 5.4

## Changelog ##

### 0.10.6 - 02.11.2016 ###
* Fix! - Some breaks layouts from previous release

### 0.10.5 - 02.11.2016 ###
* Tweak! - Added Compatibility for Autoptimize Plugin ([Topic](https://wordpress.org/support/topic/open-link-in-new-tab-doesnt-work/))
* Tweak! - Now `elementor_library` custom post type excluded from the sitemap by Yoast SEO ([Topic](https://wordpress.org/support/topic/disable-elementor_library-sitemap-xml/))
Expand All @@ -169,7 +172,6 @@ No. Elementor supports WordPress 4.4 or greater, and is compatible with PHP 5.4
* Tweak! - Added Compatibility for jQuery Masonry Image Gallery plugin ([#762](https://github.com/pojome/elementor/issues/762))
* Tweak! - Added support for "multiple value" condition in Repeater control
* Fixed! - Bug corrupting JSON post meta on import Elementor pages ([Topic](https://wordpress.org/support/topic/pages-importexport-not-working-properly/))
* Fixed! - Image widget template for link and caption ([Topic](https://wordpress.org/support/topic/image-not-aligning-when-linked/))
* Fixed! - `.elementor-slick-slider` class now apply on all Elementor custom slick theme ([#424](https://github.com/pojome/elementor/issues/424))
* Fixed! - Added subset support for Google Fonts to fix issues with some browsers

Expand Down
4 changes: 2 additions & 2 deletions elementor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
* Plugin URI: https://elementor.com/
* Author: Elementor.com
* Version: 0.10.5
* Version: 0.10.6
* Author URI: https://elementor.com/
*
* Text Domain: elementor
Expand All @@ -22,7 +22,7 @@

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

define( 'ELEMENTOR_VERSION', '0.10.5' );
define( 'ELEMENTOR_VERSION', '0.10.6' );

define( 'ELEMENTOR__FILE__', __FILE__ );
define( 'ELEMENTOR_PLUGIN_BASE', plugin_basename( ELEMENTOR__FILE__ ) );
Expand Down
120 changes: 54 additions & 66 deletions includes/widgets/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,47 +282,35 @@ protected function render() {
if ( empty( $settings['image']['url'] ) ) {
return;
}

$has_caption = ! empty( $settings['caption'] );

$this->add_render_attribute( 'wrapper', 'class', 'elementor-image' );
$image_html = '<div class="elementor-image' . ( ! empty( $settings['shape'] ) ? ' elementor-image-shape-' . $settings['shape'] : '' ) . '">';

if ( ! empty( $settings['shape'] ) ) {
$this->add_render_attribute( 'wrapper', 'class', 'elementor-image-shape-' . $settings['shape'] );
if ( $has_caption ) {
$image_html .= '<figure class="wp-caption">';
}

$link = $this->get_link_url( $settings );
$image_html .= Group_Control_Image_Size::get_attachment_image_html( $settings );

$link = $this->get_link_url( $settings );
if ( $link ) {
$this->add_render_attribute( 'link', 'href', $link['url'] );

$target = '';
if ( ! empty( $link['is_external'] ) ) {
$this->add_render_attribute( 'link', 'target', '_blank' );
$target = ' target="_blank"';
}
} ?>
<div <?php echo $this->get_render_attribute_string( 'wrapper' ); ?>>
<?php
if ( $link ) : ?>
<a <?php echo $this->get_render_attribute_string( 'link' ); ?>>
<?php endif;
if ( $has_caption ) : ?>
<figure class="wp-caption">
<?php endif;
$image_html = sprintf( '<a href="%s"%s>%s</a>', $link['url'], $target, $image_html );
}

echo Group_Control_Image_Size::get_attachment_image_html( $settings );
if ( $has_caption ) {
$image_html .= sprintf( '<figcaption class="widget-image-caption wp-caption-text">%s</figcaption>', $settings['caption'] );
}

if ( $has_caption ) : ?>
<figcaption class="widget-image-caption wp-caption-text"><?php echo $settings['caption']; ?></figcaption>
<?php endif;
if ( $has_caption ) {
$image_html .= '</figure>';
}
$image_html .= '</div>';

if ( $has_caption ) : ?>
</figure>
<?php
if ( $link ) : ?>
</a>
<?php endif; ?>
</div>
<?php endif;
echo $image_html;
}

protected function _content_template() {
Expand All @@ -337,57 +325,57 @@ protected function _content_template() {
// If it's not in cache, like a new dropped widget or a custom size - get from settings
if ( ! image_url ) {

if ( 'custom' === settings.image_size ) {
return;
}

// If it's a new dropped widget
image_url = settings.image.url;
if ( 'custom' === settings.image_size ) {
return;
}

var link_url;

if ( 'custom' === settings.link_to ) {
link_url = settings.link.url;
// If it's a new dropped widget
image_url = settings.image.url;
}

if ( 'file' === settings.link_to ) {
link_url = settings.image.url;
}
#>
<div class="elementor-image{{ settings.shape ? ' elementor-image-shape-' + settings.shape : '' }}">
<#
var imgClass = '', image_html = '',
hasCaption = '' !== settings.caption,
image_html = '';

#><div class="elementor-image{{ settings.shape ? ' elementor-image-shape-' + settings.shape : '' }}"><#
if ( '' !== settings.hover_animation ) {
imgClass = 'elementor-animation-' + settings.hover_animation;
}

if ( link_url ) {
#><a href="{{ link_url }}"><#
}
if ( hasCaption ) {
image_html += '<figure class="wp-caption">';
}

var imgClass = '',
hasCaption = '' !== settings.caption;
image_html += '<img src="' + image_url + '" class="' + imgClass + '" />';

if ( '' !== settings.hover_animation ) {
imgClass = 'elementor-animation-' + settings.hover_animation;
}
var link_url;
if ( 'custom' === settings.link_to ) {
link_url = settings.link.url;
}

if ( hasCaption ) {
#><figure class="wp-caption"><#
}
if ( 'file' === settings.link_to ) {
link_url = settings.image.url;
}

#><img src="{{ image_url }}" class="{{ imgClass }}" /><#
if ( link_url ) {
image_html = '<a href="' + link_url + '">' + image_html + '</a>';
}

if ( hasCaption ) {
#><figcaption class="widget-image-caption wp-caption-text">{{{ settings.caption }}}</figcaption><#
}
if ( hasCaption ) {
image_html += '<figcaption class="widget-image-caption wp-caption-text">' + settings.caption + '</figcaption>';
}

if ( hasCaption ) {
#></figure><#
}
if ( hasCaption ) {
image_html += '</figure>';
}

if ( link_url ) {
#></a><#
}
print( image_html );

#></div><#
} #>
#>
</div>
<# } #>
<?php
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elementor",
"slug": "elementor",
"version": "0.10.5",
"version": "0.10.6",
"author": "Pojo Team",
"homepage": "http://pojo.me/",
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: pojo.me, KingYes, ariel.k, jzaltzberg, yehudah, mati1000, pojosh
Tags: page builder, editor, builder, visual editor, front-end editor, design, drag and drop builder, front-end builder, landing page, page builder plugin, site builder, template builder, visual builder, website builder, wysiwyg
Requires at least: 4.4
Tested up to: 4.6
Stable tag: 0.10.5
Stable tag: 0.10.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -159,6 +159,9 @@ No. Elementor supports WordPress 4.4 or greater, and is compatible with PHP 5.4

== Changelog ==

= 0.10.6 - 02.11.2016 =
* Fix! - Some breaks layouts from previous release

= 0.10.5 - 02.11.2016 =
* Tweak! - Added Compatibility for Autoptimize Plugin ([Topic](https://wordpress.org/support/topic/open-link-in-new-tab-doesnt-work/))
* Tweak! - Now `elementor_library` custom post type excluded from the sitemap by Yoast SEO ([Topic](https://wordpress.org/support/topic/disable-elementor_library-sitemap-xml/))
Expand All @@ -167,7 +170,6 @@ No. Elementor supports WordPress 4.4 or greater, and is compatible with PHP 5.4
* Tweak! - Added Compatibility for jQuery Masonry Image Gallery plugin ([#762](https://github.com/pojome/elementor/issues/762))
* Tweak! - Added support for "multiple value" condition in Repeater control
* Fixed! - Bug corrupting JSON post meta on import Elementor pages ([Topic](https://wordpress.org/support/topic/pages-importexport-not-working-properly/))
* Fixed! - Image widget template for link and caption ([Topic](https://wordpress.org/support/topic/image-not-aligning-when-linked/))
* Fixed! - `.elementor-slick-slider` class now apply on all Elementor custom slick theme ([#424](https://github.com/pojome/elementor/issues/424))
* Fixed! - Added subset support for Google Fonts to fix issues with some browsers

Expand Down

0 comments on commit 5e84140

Please sign in to comment.