Version Description
Download this release
Release Info
Developer | takanakui |
Plugin | Menu Image |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- freemius/includes/class-freemius.php +25 -2
- freemius/includes/managers/class-fs-admin-notice-manager.php +7 -2
- freemius/includes/sdk/Exceptions/ArgumentNotExistException.php +5 -1
- freemius/includes/sdk/Exceptions/EmptyArgumentException.php +5 -1
- freemius/includes/sdk/Exceptions/Exception.php +5 -1
- freemius/includes/sdk/Exceptions/InvalidArgumentException.php +5 -1
- freemius/includes/sdk/Exceptions/OAuthException.php +5 -1
- freemius/includes/sdk/FreemiusBase.php +4 -0
- freemius/includes/sdk/FreemiusWordPress.php +4 -1
- freemius/require.php +5 -1
- freemius/start.php +1 -1
- freemius/templates/account/partials/addon.php +6 -1
- freemius/templates/ajax-loader.php +6 -1
- freemius/templates/debug.php +8 -2
- freemius/templates/firewall-issues-js.php +10 -6
- freemius/templates/partials/network-activation.php +6 -1
- freemius/templates/sticky-admin-notice-js.php +4 -2
- menu-image.php +20 -15
- readme.txt +5 -2
freemius/includes/class-freemius.php
CHANGED
@@ -3550,6 +3550,8 @@
|
|
3550 |
* @since 1.1.7.3
|
3551 |
*/
|
3552 |
static function _toggle_debug_mode() {
|
|
|
|
|
3553 |
if ( ! is_super_admin() ) {
|
3554 |
return;
|
3555 |
}
|
@@ -3571,10 +3573,19 @@
|
|
3571 |
* @since 1.2.1.6
|
3572 |
*/
|
3573 |
static function _get_debug_log() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3574 |
$logs = FS_Logger::load_db_logs(
|
3575 |
fs_request_get( 'filters', false, 'post' ),
|
3576 |
-
|
3577 |
-
|
3578 |
);
|
3579 |
|
3580 |
self::shoot_ajax_success( $logs );
|
@@ -4447,6 +4458,12 @@
|
|
4447 |
* @since 1.0.9
|
4448 |
*/
|
4449 |
function _email_about_firewall_issue() {
|
|
|
|
|
|
|
|
|
|
|
|
|
4450 |
$this->_admin_notices->remove_sticky( 'failed_connect_api' );
|
4451 |
|
4452 |
$pong = $this->ping();
|
@@ -4521,6 +4538,12 @@
|
|
4521 |
* @since 1.1.7.4
|
4522 |
*/
|
4523 |
function _retry_connectivity_test() {
|
|
|
|
|
|
|
|
|
|
|
|
|
4524 |
$this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
|
4525 |
|
4526 |
$pong = $this->ping();
|
3550 |
* @since 1.1.7.3
|
3551 |
*/
|
3552 |
static function _toggle_debug_mode() {
|
3553 |
+
check_admin_referer( 'fs_toggle_debug_mode' );
|
3554 |
+
|
3555 |
if ( ! is_super_admin() ) {
|
3556 |
return;
|
3557 |
}
|
3573 |
* @since 1.2.1.6
|
3574 |
*/
|
3575 |
static function _get_debug_log() {
|
3576 |
+
check_admin_referer( 'fs_get_debug_log' );
|
3577 |
+
|
3578 |
+
if ( ! is_super_admin() ) {
|
3579 |
+
return;
|
3580 |
+
}
|
3581 |
+
|
3582 |
+
$limit = min( ! empty( $_POST['limit'] ) ? absint( $_POST['limit'] ) : 200, 200 );
|
3583 |
+
$offset = min( ! empty( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 200, 200 );
|
3584 |
+
|
3585 |
$logs = FS_Logger::load_db_logs(
|
3586 |
fs_request_get( 'filters', false, 'post' ),
|
3587 |
+
$limit,
|
3588 |
+
$offset
|
3589 |
);
|
3590 |
|
3591 |
self::shoot_ajax_success( $logs );
|
4458 |
* @since 1.0.9
|
4459 |
*/
|
4460 |
function _email_about_firewall_issue() {
|
4461 |
+
check_admin_referer( 'fs_resolve_firewall_issues' );
|
4462 |
+
|
4463 |
+
if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) {
|
4464 |
+
return;
|
4465 |
+
}
|
4466 |
+
|
4467 |
$this->_admin_notices->remove_sticky( 'failed_connect_api' );
|
4468 |
|
4469 |
$pong = $this->ping();
|
4538 |
* @since 1.1.7.4
|
4539 |
*/
|
4540 |
function _retry_connectivity_test() {
|
4541 |
+
check_admin_referer( 'fs_retry_connectivity_test' );
|
4542 |
+
|
4543 |
+
if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) {
|
4544 |
+
return;
|
4545 |
+
}
|
4546 |
+
|
4547 |
$this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
|
4548 |
|
4549 |
$pong = $this->ping();
|
freemius/includes/managers/class-fs-admin-notice-manager.php
CHANGED
@@ -175,7 +175,12 @@
|
|
175 |
*
|
176 |
*/
|
177 |
function dismiss_notice_ajax_callback() {
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
179 |
wp_die();
|
180 |
}
|
181 |
|
@@ -469,4 +474,4 @@
|
|
469 |
}
|
470 |
|
471 |
#endregion
|
472 |
-
}
|
175 |
*
|
176 |
*/
|
177 |
function dismiss_notice_ajax_callback() {
|
178 |
+
check_admin_referer( 'fs_dismiss_notice_action' );
|
179 |
+
|
180 |
+
if ( ! is_numeric( $_POST['message_id'] ) ) {
|
181 |
+
$this->_sticky_storage->remove( $_POST['message_id'] );
|
182 |
+
}
|
183 |
+
|
184 |
wp_die();
|
185 |
}
|
186 |
|
474 |
}
|
475 |
|
476 |
#endregion
|
477 |
+
}
|
freemius/includes/sdk/Exceptions/ArgumentNotExistException.php
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
|
3 |
exit;
|
4 |
}
|
@@ -6,4 +10,4 @@
|
|
6 |
if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) {
|
7 |
class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException {
|
8 |
}
|
9 |
-
}
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
|
7 |
exit;
|
8 |
}
|
10 |
if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) {
|
11 |
class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException {
|
12 |
}
|
13 |
+
}
|
freemius/includes/sdk/Exceptions/EmptyArgumentException.php
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
|
3 |
exit;
|
4 |
}
|
@@ -6,4 +10,4 @@
|
|
6 |
if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) {
|
7 |
class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException {
|
8 |
}
|
9 |
-
}
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
|
7 |
exit;
|
8 |
}
|
10 |
if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) {
|
11 |
class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException {
|
12 |
}
|
13 |
+
}
|
freemius/includes/sdk/Exceptions/Exception.php
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
if ( ! class_exists( 'Freemius_Exception' ) ) {
|
3 |
/**
|
4 |
* Thrown when an API call returns an exception.
|
@@ -71,4 +75,4 @@
|
|
71 |
return $str . $this->getMessage();
|
72 |
}
|
73 |
}
|
74 |
-
}
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
if ( ! class_exists( 'Freemius_Exception' ) ) {
|
7 |
/**
|
8 |
* Thrown when an API call returns an exception.
|
75 |
return $str . $this->getMessage();
|
76 |
}
|
77 |
}
|
78 |
+
}
|
freemius/includes/sdk/Exceptions/InvalidArgumentException.php
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
if ( ! class_exists( 'Freemius_Exception' ) ) {
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
|
7 |
class Freemius_InvalidArgumentException extends Freemius_Exception { }
|
8 |
-
}
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
if ( ! class_exists( 'Freemius_Exception' ) ) {
|
7 |
exit;
|
8 |
}
|
9 |
|
10 |
if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
|
11 |
class Freemius_InvalidArgumentException extends Freemius_Exception { }
|
12 |
+
}
|
freemius/includes/sdk/Exceptions/OAuthException.php
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
if ( ! class_exists( 'Freemius_Exception' ) ) {
|
3 |
exit;
|
4 |
}
|
@@ -9,4 +13,4 @@
|
|
9 |
parent::__construct( $pResult );
|
10 |
}
|
11 |
}
|
12 |
-
}
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
if ( ! class_exists( 'Freemius_Exception' ) ) {
|
7 |
exit;
|
8 |
}
|
13 |
parent::__construct( $pResult );
|
14 |
}
|
15 |
}
|
16 |
+
}
|
freemius/includes/sdk/FreemiusBase.php
CHANGED
@@ -15,6 +15,10 @@
|
|
15 |
* under the License.
|
16 |
*/
|
17 |
|
|
|
|
|
|
|
|
|
18 |
if ( ! defined( 'FS_API__VERSION' ) ) {
|
19 |
define( 'FS_API__VERSION', '1' );
|
20 |
}
|
15 |
* under the License.
|
16 |
*/
|
17 |
|
18 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
|
22 |
if ( ! defined( 'FS_API__VERSION' ) ) {
|
23 |
define( 'FS_API__VERSION', '1' );
|
24 |
}
|
freemius/includes/sdk/FreemiusWordPress.php
CHANGED
@@ -14,6 +14,9 @@
|
|
14 |
* License for the specific language governing permissions and limitations
|
15 |
* under the License.
|
16 |
*/
|
|
|
|
|
|
|
17 |
|
18 |
require_once dirname( __FILE__ ) . '/FreemiusBase.php';
|
19 |
|
@@ -709,4 +712,4 @@
|
|
709 |
}
|
710 |
|
711 |
#endregion
|
712 |
-
}
|
14 |
* License for the specific language governing permissions and limitations
|
15 |
* under the License.
|
16 |
*/
|
17 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
20 |
|
21 |
require_once dirname( __FILE__ ) . '/FreemiusBase.php';
|
22 |
|
712 |
}
|
713 |
|
714 |
#endregion
|
715 |
+
}
|
freemius/require.php
CHANGED
@@ -6,6 +6,10 @@
|
|
6 |
* @since 1.1.9
|
7 |
*/
|
8 |
|
|
|
|
|
|
|
|
|
9 |
// Configuration should be loaded first.
|
10 |
require_once dirname( __FILE__ ) . '/config.php';
|
11 |
require_once WP_FS__DIR_INCLUDES . '/fs-core-functions.php';
|
@@ -46,4 +50,4 @@
|
|
46 |
require_once WP_FS__DIR_INCLUDES . '/class-fs-admin-notices.php';
|
47 |
require_once WP_FS__DIR_INCLUDES . '/class-freemius-abstract.php';
|
48 |
require_once WP_FS__DIR_INCLUDES . '/sdk/Exceptions/Exception.php';
|
49 |
-
require_once WP_FS__DIR_INCLUDES . '/class-freemius.php';
|
6 |
* @since 1.1.9
|
7 |
*/
|
8 |
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
// Configuration should be loaded first.
|
14 |
require_once dirname( __FILE__ ) . '/config.php';
|
15 |
require_once WP_FS__DIR_INCLUDES . '/fs-core-functions.php';
|
50 |
require_once WP_FS__DIR_INCLUDES . '/class-fs-admin-notices.php';
|
51 |
require_once WP_FS__DIR_INCLUDES . '/class-freemius-abstract.php';
|
52 |
require_once WP_FS__DIR_INCLUDES . '/sdk/Exceptions/Exception.php';
|
53 |
+
require_once WP_FS__DIR_INCLUDES . '/class-freemius.php';
|
freemius/start.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
-
$this_sdk_version = '2.4.
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
+
$this_sdk_version = '2.4.3';
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
freemius/templates/account/partials/addon.php
CHANGED
@@ -1,4 +1,9 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* @var array $VARS
|
4 |
* @var Freemius $fs
|
@@ -443,4 +448,4 @@
|
|
443 |
</td>
|
444 |
<!--/ Optional Delete Action -->
|
445 |
<?php endif ?>
|
446 |
-
</tr>
|
1 |
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
/**
|
8 |
* @var array $VARS
|
9 |
* @var Freemius $fs
|
448 |
</td>
|
449 |
<!--/ Optional Delete Action -->
|
450 |
<?php endif ?>
|
451 |
+
</tr>
|
freemius/templates/ajax-loader.php
CHANGED
@@ -1 +1,6 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
?>
|
6 |
+
<div class="fs-ajax-loader" style="display: none"><?php for ( $i = 1; $i <= 8; $i ++ ) : ?><div class="fs-ajax-loader-bar fs-ajax-loader-bar-<?php echo $i ?>"></div><?php endfor ?></div>
|
freemius/templates/debug.php
CHANGED
@@ -37,6 +37,8 @@
|
|
37 |
|
38 |
$.post( ajaxurl, {
|
39 |
action: 'fs_toggle_debug_mode',
|
|
|
|
|
40 |
is_on : ($(this).hasClass( 'fs-on' ) ? 1 : 0)
|
41 |
}, function ( response ) {
|
42 |
if ( 1 == response ) {
|
@@ -111,7 +113,8 @@
|
|
111 |
if (optionName) {
|
112 |
$.post(ajaxurl, {
|
113 |
action : 'fs_get_db_option',
|
114 |
-
|
|
|
115 |
option_name: optionName
|
116 |
}, function (response) {
|
117 |
if (response.data.value)
|
@@ -131,7 +134,8 @@
|
|
131 |
if (optionValue) {
|
132 |
$.post(ajaxurl, {
|
133 |
action : 'fs_set_db_option',
|
134 |
-
|
|
|
135 |
option_name : optionName,
|
136 |
option_value: optionValue
|
137 |
}, function () {
|
@@ -724,6 +728,8 @@
|
|
724 |
|
725 |
$.post(ajaxurl, {
|
726 |
action : 'fs_get_debug_log',
|
|
|
|
|
727 |
filters: filters,
|
728 |
offset : offset,
|
729 |
limit : limit
|
37 |
|
38 |
$.post( ajaxurl, {
|
39 |
action: 'fs_toggle_debug_mode',
|
40 |
+
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
|
41 |
+
_wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_toggle_debug_mode' ) ); ?>,
|
42 |
is_on : ($(this).hasClass( 'fs-on' ) ? 1 : 0)
|
43 |
}, function ( response ) {
|
44 |
if ( 1 == response ) {
|
113 |
if (optionName) {
|
114 |
$.post(ajaxurl, {
|
115 |
action : 'fs_get_db_option',
|
116 |
+
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
|
117 |
+
_wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_db_option' ) ); ?>,
|
118 |
option_name: optionName
|
119 |
}, function (response) {
|
120 |
if (response.data.value)
|
134 |
if (optionValue) {
|
135 |
$.post(ajaxurl, {
|
136 |
action : 'fs_set_db_option',
|
137 |
+
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
|
138 |
+
_wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_set_db_option' ) ); ?>,
|
139 |
option_name : optionName,
|
140 |
option_value: optionValue
|
141 |
}, function () {
|
728 |
|
729 |
$.post(ajaxurl, {
|
730 |
action : 'fs_get_debug_log',
|
731 |
+
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
|
732 |
+
_wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_debug_log' ) ); ?>,
|
733 |
filters: filters,
|
734 |
offset : offset,
|
735 |
limit : limit
|
freemius/templates/firewall-issues-js.php
CHANGED
@@ -22,10 +22,12 @@
|
|
22 |
notice = $( this ).parents( '.fs-notice' ),
|
23 |
ajaxActionSuffix = notice.attr( 'data-manager-id' ).replace( ':', '-' );
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
|
30 |
if ( 'squid' === error_type ) {
|
31 |
data.hosting_company = prompt( 'What is the name or URL of your hosting company?' );
|
@@ -39,7 +41,9 @@
|
|
39 |
}
|
40 |
|
41 |
if ( 'retry_ping' === error_type ) {
|
42 |
-
|
|
|
|
|
43 |
}
|
44 |
|
45 |
$( this ).css({'cursor': 'wait'});
|
@@ -56,4 +60,4 @@
|
|
56 |
});
|
57 |
});
|
58 |
});
|
59 |
-
</script>
|
22 |
notice = $( this ).parents( '.fs-notice' ),
|
23 |
ajaxActionSuffix = notice.attr( 'data-manager-id' ).replace( ':', '-' );
|
24 |
|
25 |
+
var data = {
|
26 |
+
action : 'fs_resolve_firewall_issues_' + ajaxActionSuffix,
|
27 |
+
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
|
28 |
+
_wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_resolve_firewall_issues' ) ); ?>,
|
29 |
+
error_type: error_type
|
30 |
+
};
|
31 |
|
32 |
if ( 'squid' === error_type ) {
|
33 |
data.hosting_company = prompt( 'What is the name or URL of your hosting company?' );
|
41 |
}
|
42 |
|
43 |
if ( 'retry_ping' === error_type ) {
|
44 |
+
data.action = 'fs_retry_connectivity_test_' + ajaxActionSuffix;
|
45 |
+
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
|
46 |
+
data._wpnonce = <?php echo wp_json_encode( wp_create_nonce( 'fs_retry_connectivity_test' ) ); ?>;
|
47 |
}
|
48 |
|
49 |
$( this ).css({'cursor': 'wait'});
|
60 |
});
|
61 |
});
|
62 |
});
|
63 |
+
</script>
|
freemius/templates/partials/network-activation.php
CHANGED
@@ -1,4 +1,9 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* @var array $VARS
|
4 |
* @var Freemius $fs
|
@@ -86,4 +91,4 @@
|
|
86 |
</tbody>
|
87 |
</table>
|
88 |
</div>
|
89 |
-
</div>
|
1 |
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
/**
|
8 |
* @var array $VARS
|
9 |
* @var Freemius $fs
|
91 |
</tbody>
|
92 |
</table>
|
93 |
</div>
|
94 |
+
</div>
|
freemius/templates/sticky-admin-notice-js.php
CHANGED
@@ -23,7 +23,9 @@
|
|
23 |
|
24 |
notice.fadeOut( 'fast', function() {
|
25 |
var data = {
|
26 |
-
action
|
|
|
|
|
27 |
message_id: id
|
28 |
};
|
29 |
|
@@ -36,4 +38,4 @@
|
|
36 |
});
|
37 |
});
|
38 |
});
|
39 |
-
</script>
|
23 |
|
24 |
notice.fadeOut( 'fast', function() {
|
25 |
var data = {
|
26 |
+
action : 'fs_dismiss_notice_action_' + ajaxActionSuffix,
|
27 |
+
// As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
|
28 |
+
_wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_dismiss_notice_action' ) ); ?>,
|
29 |
message_id: id
|
30 |
};
|
31 |
|
38 |
});
|
39 |
});
|
40 |
});
|
41 |
+
</script>
|
menu-image.php
CHANGED
@@ -1,23 +1,21 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
-
*
|
6 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
*/
|
8 |
-
/*
|
9 |
-
Plugin Name: Menu Image
|
10 |
-
Plugin URI: https://www.freshlightlab.com/menu-image-wordpress-plugin/?utm_source=wprepo-menu-image&utm_medium=wprepo_readme&utm_campaign=Plugin+URI
|
11 |
-
Description: Improve your navigation menu items with images, logos, icons, buttons.
|
12 |
-
Author: Rui Guerreiro
|
13 |
-
Version: 3.0.5
|
14 |
-
Author URI: https://www.freshlightlab.com/?utm_source=wprepo-menu-image&utm_medium=wprepo_readme&utm_campaign=Author+URI
|
15 |
-
* License: GPLv2
|
16 |
-
*/
|
17 |
if ( !defined( 'ABSPATH' ) ) {
|
18 |
die;
|
19 |
}
|
20 |
-
define( 'MENU_IMAGE_VERSION', '3.0.
|
21 |
define( 'MENU_IMAGE_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
22 |
define( 'MENU_IMAGE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
23 |
/**
|
@@ -840,7 +838,10 @@ class WP_Menu_Image
|
|
840 |
$item->thumbnail_id,
|
841 |
$image_size,
|
842 |
false,
|
843 |
-
|
|
|
|
|
|
|
844 |
);
|
845 |
$image .= wp_get_attachment_image(
|
846 |
$item->thumbnail_hover_id,
|
@@ -849,6 +850,7 @@ class WP_Menu_Image
|
|
849 |
array(
|
850 |
'class' => "hovered-image {$class}",
|
851 |
'style' => "margin-left: -{$margin_size}px;",
|
|
|
852 |
)
|
853 |
);
|
854 |
$image .= '</span>';
|
@@ -857,7 +859,10 @@ class WP_Menu_Image
|
|
857 |
$item->thumbnail_id,
|
858 |
$image_size,
|
859 |
false,
|
860 |
-
|
|
|
|
|
|
|
861 |
);
|
862 |
}
|
863 |
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Plugin Name: Menu Image
|
5 |
+
* Description: Improve your navigation menu items with images, logos, icons, buttons.
|
6 |
+
* Version: 3.0.6
|
7 |
+
* Plugin URI: https://www.freshlightlab.com/menu-image-wordpress-plugin/?utm_source=wprepo-menu-image&utm_medium=wprepo_readme&utm_campaign=Plugin+URI
|
8 |
+
* Author: Freshlight Lab
|
9 |
+
* Author URI: https://www.freshlightlab.com/?utm_source=wprepo-menu-image&utm_medium=wprepo_readme&utm_campaign=Author+URI
|
10 |
+
* Tested up to: 5.9
|
11 |
+
* Text Domain: menu-image
|
12 |
+
* Domain Path: /languages/
|
13 |
+
* License: GPLv2
|
14 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
if ( !defined( 'ABSPATH' ) ) {
|
16 |
die;
|
17 |
}
|
18 |
+
define( 'MENU_IMAGE_VERSION', '3.0.6' );
|
19 |
define( 'MENU_IMAGE_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
20 |
define( 'MENU_IMAGE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
21 |
/**
|
838 |
$item->thumbnail_id,
|
839 |
$image_size,
|
840 |
false,
|
841 |
+
array(
|
842 |
+
'class' => "menu-image {$class}",
|
843 |
+
'alt' => get_post_meta( $item->thumbnail_id, '_wp_attachment_image_alt', true ),
|
844 |
+
)
|
845 |
);
|
846 |
$image .= wp_get_attachment_image(
|
847 |
$item->thumbnail_hover_id,
|
850 |
array(
|
851 |
'class' => "hovered-image {$class}",
|
852 |
'style' => "margin-left: -{$margin_size}px;",
|
853 |
+
'alt' => get_post_meta( $item->thumbnail_hover_id, '_wp_attachment_image_alt', true ),
|
854 |
)
|
855 |
);
|
856 |
$image .= '</span>';
|
859 |
$item->thumbnail_id,
|
860 |
$image_size,
|
861 |
false,
|
862 |
+
array(
|
863 |
+
'class' => "menu-image {$class}",
|
864 |
+
'alt' => get_post_meta( $item->thumbnail_id, '_wp_attachment_image_alt', true ),
|
865 |
+
)
|
866 |
);
|
867 |
}
|
868 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: takanakui, freshlightlab, freemius
|
|
3 |
Tags: menu, navigation, image, icons, nav menu
|
4 |
Donate link: https://www.freshlightlab.com/?utm_source=wprepo-menu-image&utm_medium=wprepo_readme&utm_campaign=Donate+Link
|
5 |
Requires at least: 4.4.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -117,6 +117,9 @@ Check this article in the following [link](https://www.freshlightlab.com/documen
|
|
117 |
|
118 |
|
119 |
|
|
|
|
|
|
|
120 |
### 3.0.5 ###
|
121 |
* Improvment – Update Freemius SDK to 2.4.2
|
122 |
* New – New button to Add image / icon in the menu items
|
3 |
Tags: menu, navigation, image, icons, nav menu
|
4 |
Donate link: https://www.freshlightlab.com/?utm_source=wprepo-menu-image&utm_medium=wprepo_readme&utm_campaign=Donate+Link
|
5 |
Requires at least: 4.4.0
|
6 |
+
Tested up to: 5.9
|
7 |
+
Stable tag: 3.0.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
117 |
|
118 |
|
119 |
|
120 |
+
### 3.0.6 ###
|
121 |
+
* Fix - Security Fix
|
122 |
+
|
123 |
### 3.0.5 ###
|
124 |
* Improvment – Update Freemius SDK to 2.4.2
|
125 |
* New – New button to Add image / icon in the menu items
|