Skip to content

Commit

Permalink
2.0
Browse files Browse the repository at this point in the history
2.0
  • Loading branch information
Tabrisrp authored Jul 20, 2022
2 parents 6c63d3f + d6073d9 commit ea81618
Show file tree
Hide file tree
Showing 38 changed files with 272 additions and 666 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Normal compression is a "lossless" optimization. This means there is no loss of

### Is the EXIF data of images removed?

By default EXIF data is removed. It is however possible to keep it by enabling the option.
EXIF data is not removed.

### Will the original images be deleted?

Expand Down
17 changes: 8 additions & 9 deletions assets/css/bulk.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress {
body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent {
position: absolute;
top: 6px;
right: 0;
right: -28px;
text-shadow: none;
width: auto;
padding: 0 5px;
Expand Down Expand Up @@ -312,12 +312,6 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
color: #40B1D0;
}

.imagify-col-content {
background: #F4F7F9;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}

.imagify-col-content .imagify-block-secondary {
margin-left: -1px;
margin-right: -1px;
Expand Down Expand Up @@ -669,11 +663,16 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
background: #FFF;
}

.imagify-bulk-table .imagify-row-progress {
display: none;
@media (max-width: 782px) {
.imagify-row-folder-type,
tr.imagify-row-working,
tr.imagify-row-waiting {
padding-top: 20px;
}
}

.imagify-bulk-table .imagify-row-progress {
display: none;
height: 8px;
padding: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/bulk.min.css

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions assets/css/files-list.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
/* Filter block */
.imagify-files-list .wp-filter {
padding: 15px 20px;
padding: 0 20px 15px;
}
.imagify-files-list .filter-items select {
height: auto;
padding: 6px;
margin-right: 12px;
padding: 2px 20px 3px 6px;
margin: 15px 12px 0 0;
max-width: 100%;
}
.imagify-files-list .filter-items .button {
height: auto;
padding: 2px 12px 3px;
margin-top: 15px;
}
@media screen and (max-width: 782px) {
.imagify-files-list .filter-items .button {
margin-bottom: 0;
line-height: 2.15384615;
padding: 0 12px;
}
}

/* Empty table */
Expand Down
2 changes: 1 addition & 1 deletion assets/css/files-list.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/pricing-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
$offer.find('.imagify-approx-nb').text(quo * 5);

if ('monthly' === type) {
// Additionnal price.
// Additional price.
$offer.find('.imagify-price-add-data').text('$' + add);
}

Expand Down
39 changes: 0 additions & 39 deletions classes/Context/AbstractContext.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php
namespace Imagify\Context;

defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
* Abstract used for contexts.
*
Expand All @@ -16,7 +14,6 @@ abstract class AbstractContext implements ContextInterface {
*
* @var string
* @since 1.9
* @access protected
* @author Grégory Viguier
*/
protected $context;
Expand All @@ -26,7 +23,6 @@ abstract class AbstractContext implements ContextInterface {
*
* @var bool
* @since 1.9
* @access protected
* @author Grégory Viguier
*/
protected $is_network_wide = false;
Expand All @@ -39,7 +35,6 @@ abstract class AbstractContext implements ContextInterface {
* - 'image' to allow only images.
* - 'not-image' to allow only pdf files.
* @since 1.9
* @access protected
* @see imagify_get_mime_types()
* @author Grégory Viguier
*/
Expand All @@ -58,7 +53,6 @@ abstract class AbstractContext implements ContextInterface {
* @type string $name The size name.
* }
* @since 1.9
* @access protected
* @author Grégory Viguier
*/
protected $thumbnail_sizes;
Expand All @@ -68,26 +62,14 @@ abstract class AbstractContext implements ContextInterface {
*
* @var bool
* @since 1.9
* @access protected
* @author Grégory Viguier
*/
protected $can_backup;

/**
* Tell if the optimization process is allowed to keep exif in this context.
*
* @var bool
* @since 1.9
* @access protected
* @author Grégory Viguier
*/
protected $can_keep_exif;

/**
* Get the context "short name".
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return string
Expand All @@ -100,7 +82,6 @@ public function get_name() {
* Tell if the context is network-wide.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
Expand All @@ -113,7 +94,6 @@ public function is_network_wide() {
* Get the type of files this context allows.
*
* @since 1.9
* @access protected
* @see imagify_get_mime_types()
* @author Grégory Viguier
*
Expand All @@ -130,7 +110,6 @@ public function get_allowed_mime_types() {
* Get the thumbnail sizes for this context, except the full size.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return array {
Expand All @@ -151,7 +130,6 @@ public function get_thumbnail_sizes() {
* Tell if the optimization process is allowed resize in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
Expand All @@ -164,7 +142,6 @@ public function can_resize() {
* Tell if the optimization process is allowed to backup in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
Expand All @@ -173,24 +150,10 @@ public function can_backup() {
return $this->can_backup;
}

/**
* Tell if the optimization process is allowed to keep exif in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function can_keep_exif() {
return $this->can_keep_exif;
}

/**
* Tell if the current user is allowed to operate Imagify in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @param string $describer Capacity describer. See $this->get_capacity() for possible values. Can also be a "real" user capacity.
Expand All @@ -205,7 +168,6 @@ public function current_user_can( $describer, $media_id = null ) {
* Tell if a user is allowed to operate Imagify in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @param int|\WP_User $user_id A user ID or \WP_User object. Fallback to the current user ID.
Expand Down Expand Up @@ -276,7 +238,6 @@ public function user_can( $user_id, $describer, $media_id = null ) {
* Filter a user capacity used to operate Imagify in this context.
*
* @since 1.9
* @access protected
* @author Grégory Viguier
*
* @param string $capacity The user capacity.
Expand Down
24 changes: 0 additions & 24 deletions classes/Context/ContextInterface.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php
namespace Imagify\Context;

defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
* Interface to use for contexts.
*
Expand All @@ -15,7 +13,6 @@ interface ContextInterface {
* Get the main Instance.
*
* @since 1.9
* @access protected
* @author Grégory Viguier
*
* @return object Main instance.
Expand All @@ -26,7 +23,6 @@ public static function get_instance();
* Get the context "short name".
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return string
Expand All @@ -37,7 +33,6 @@ public function get_name();
* Tell if the context is network-wide.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
Expand All @@ -48,7 +43,6 @@ public function is_network_wide();
* Get the type of files this context allows.
*
* @since 1.9
* @access protected
* @see imagify_get_mime_types()
* @author Grégory Viguier
*
Expand All @@ -63,7 +57,6 @@ public function get_allowed_mime_types();
* Get the thumbnail sizes for this context, except the full size.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return array {
Expand All @@ -83,7 +76,6 @@ public function get_thumbnail_sizes();
* 0 means to not resize.
*
* @since 1.9.8
* @access public
* @author Grégory Viguier
*
* @return int
Expand All @@ -94,7 +86,6 @@ public function get_resizing_threshold();
* Tell if the optimization process is allowed resize in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
Expand All @@ -105,29 +96,16 @@ public function can_resize();
* Tell if the optimization process is allowed to backup in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function can_backup();

/**
* Tell if the optimization process is allowed to keep exif in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function can_keep_exif();

/**
* Tell if the current user is allowed to operate Imagify in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @param string $describer Capacity describer. See $this->get_capacity() for possible values. Can also be a "real" user capacity.
Expand All @@ -140,7 +118,6 @@ public function current_user_can( $describer, $media_id = null );
* Tell if a user is allowed to operate Imagify in this context.
*
* @since 1.9
* @access public
* @author Grégory Viguier
*
* @param int $user_id A user ID.
Expand All @@ -155,7 +132,6 @@ public function user_can( $user_id, $describer, $media_id = null );
*
* @since 1.9
* @since 1.9 The describer 'auto-optimize' is not used anymore.
* @access public
* @author Grégory Viguier
*
* @param string $describer Capacity describer. Possible values are like 'manage', 'bulk-optimize', 'manual-optimize', 'auto-optimize'.
Expand Down
Loading

0 comments on commit ea81618

Please sign in to comment.