Skip to content

Commit f15c1f4

Browse files
committed
Release 1.0.0-RC2
2 parents 7cdcc2e + 6352f2b commit f15c1f4

19 files changed

+166
-122
lines changed

.jshintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.jshintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/*.min.js
2+
**/node_modules/**
3+
**/vendor/**

Gruntfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ module.exports = function( grunt ) {
180180
'!phpunit.xml.dist',
181181
'!readme.md',
182182
'!sass/**',
183-
'!tests/**'
183+
'!tests/**',
184+
'!vendor/**'
184185
],
185186
dest: 'dist/<%= pkg.name %>',
186187
expand: true,
@@ -285,7 +286,6 @@ module.exports = function( grunt ) {
285286
] );
286287

287288
grunt.registerTask( 'deploy', [
288-
'dev',
289289
'copy',
290290
'compress',
291291
'clean'

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"php": ">=5.2.7"
44
},
55
"require-dev": {
6-
"satooshi/php-coveralls": "~1.0"
6+
"satooshi/php-coveralls": "dev-master"
77
}
88
}

envato-market.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Envato Market
44
* Plugin URI: http://envato.github.io/wp-envato-market/
55
* Description: WordPress Theme & Plugin management for the Envato Market.
6-
* Version: 1.0.0-RC1
6+
* Version: 1.0.0-RC2
77
* Author: Derek Herman
88
* Author URI: https://valendesigns.com/
99
* Requires at least: 4.2
@@ -176,7 +176,7 @@ public function __wakeup() {
176176
*/
177177
private function init_globals() {
178178
$this->data = new stdClass();
179-
$this->version = '1.0.0-RC1';
179+
$this->version = '1.0.0-RC2';
180180
$this->slug = 'envato-market';
181181
$this->option_name = self::sanitize_key( $this->slug );
182182
$this->plugin_url = plugin_dir_url( __FILE__ );

inc/admin/admin.php

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class Envato_Market_Admin {
1818

1919
/**
2020
* Action nonce.
21+
*
2122
* @type string
2223
*/
2324
const AJAX_ACTION = 'envato_market';
@@ -358,8 +359,8 @@ public function admin_enqueue_script() {
358359
$version = envato_market()->get_version();
359360
$plugin_url = envato_market()->get_plugin_url();
360361

361-
wp_enqueue_script( $slug, $plugin_url . 'js/envato-market' . $min. '.js', array( 'jquery', 'jquery-ui-dialog', 'wp-util' ), $version, true );
362-
wp_enqueue_script( $slug . '-updates', $plugin_url . 'js/updates' . $min. '.js', array( 'jquery', 'updates', 'wp-a11y', 'wp-util' ), $version, true );
362+
wp_enqueue_script( $slug, $plugin_url . 'js/envato-market' . $min . '.js', array( 'jquery', 'jquery-ui-dialog', 'wp-util' ), $version, true );
363+
wp_enqueue_script( $slug . '-updates', $plugin_url . 'js/updates' . $min . '.js', array( 'jquery', 'updates', 'wp-a11y', 'wp-util' ), $version, true );
363364

364365
// Script data array.
365366
$exports = array(
@@ -629,7 +630,7 @@ public function authorization() {
629630
$themes_notice = $this->authorize_themes();
630631
if ( 'success-no-themes' === $themes_notice ) {
631632
$themes_empty = true;
632-
} else if ( 'error' === $themes_notice ) {
633+
} elseif ( 'error' === $themes_notice ) {
633634
$failed = true;
634635
}
635636
}
@@ -638,7 +639,7 @@ public function authorization() {
638639
$plugins_notice = $this->authorize_plugins();
639640
if ( 'success-no-plugins' === $plugins_notice ) {
640641
$plugins_empty = true;
641-
} else if ( 'error' === $plugins_notice ) {
642+
} elseif ( 'error' === $plugins_notice ) {
642643
$failed = true;
643644
}
644645
}
@@ -726,7 +727,7 @@ public function authorize_items( $type = 'themes' ) {
726727

727728
if ( is_wp_error( $response ) || empty( $response ) ) {
728729
$notice = 'error';
729-
} else if ( empty( $response['results'] ) ) {
730+
} elseif ( empty( $response['results'] ) ) {
730731
$notice = 'success-no-' . $type;
731732
} else {
732733
shuffle( $response['results'] );
@@ -943,11 +944,11 @@ public function ajax_upgrade_theme() {
943944
}
944945

945946
wp_send_json_success( $status );
946-
} else if ( is_wp_error( $result ) ) {
947+
} elseif ( is_wp_error( $result ) ) {
947948
$status['error'] = $result->get_error_message();
948949
wp_send_json_error( $status );
949950

950-
} else if ( is_bool( $result ) && ! $result ) {
951+
} elseif ( is_bool( $result ) && ! $result ) {
951952
$status['errorCode'] = 'unable_to_connect_to_filesystem';
952953
$status['error'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.', 'envato-market' );
953954

@@ -970,12 +971,12 @@ public function ajax_add_item() {
970971
if ( ! check_ajax_referer( self::AJAX_ACTION, 'nonce', false ) ) {
971972
status_header( 400 );
972973
wp_send_json_error( 'bad_nonce' );
973-
} else if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
974+
} elseif ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
974975
status_header( 405 );
975976
wp_send_json_error( 'bad_method' );
976-
} else if ( empty( $_POST['token'] ) ) {
977+
} elseif ( empty( $_POST['token'] ) ) {
977978
wp_send_json_error( array( 'message' => __( 'The Token is missing.', 'envato-market' ) ) );
978-
} else if ( empty( $_POST['id'] ) ) {
979+
} elseif ( empty( $_POST['id'] ) ) {
979980
wp_send_json_error( array( 'message' => __( 'The Item ID is missing.', 'envato-market' ) ) );
980981
}
981982

@@ -1067,10 +1068,10 @@ public function ajax_remove_item() {
10671068
if ( ! check_ajax_referer( self::AJAX_ACTION, 'nonce', false ) ) {
10681069
status_header( 400 );
10691070
wp_send_json_error( 'bad_nonce' );
1070-
} else if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
1071+
} elseif ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
10711072
status_header( 405 );
10721073
wp_send_json_error( 'bad_method' );
1073-
} else if ( empty( $_POST['id'] ) ) {
1074+
} elseif ( empty( $_POST['id'] ) ) {
10741075
wp_send_json_error( array( 'message' => __( 'The Item ID is missing.', 'envato-market' ) ) );
10751076
}
10761077

inc/admin/functions.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function envato_market_themes_column( $group = 'install' ) {
101101
$customize_url .= '?theme=' . urlencode( $slug );
102102
$customize_url .= '&return=' . urlencode( envato_market()->get_page_url() . '#themes' );
103103
$actions['customize'] = '<a href="' . esc_url( $customize_url ) . '" class="button button-primary load-customize hide-if-no-customize"><span aria-hidden="true">' . __( 'Customize', 'envato-market' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Customize &#8220;%s&#8221;', 'envato-market' ), $name ) . '</span></a>';
104-
} else if ( 'installed' === $group ) {
104+
} elseif ( 'installed' === $group ) {
105105
$can_activate = true;
106106

107107
// @codeCoverageIgnoreStart
@@ -114,7 +114,7 @@ function envato_market_themes_column( $group = 'install' ) {
114114
}
115115

116116
if ( current_user_can( 'manage_network_themes' ) ) {
117-
$actions['network_enable'] = '<a href="' . esc_url( network_admin_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . urlencode( $slug ) .'&amp;paged=1&amp;s', 'enable-theme_' . $slug ) ) ) . '" class="button"><span aria-hidden="true">' . __( 'Network Enable', 'envato-market' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Network Enable &#8220;%s&#8221;', 'envato-market' ), $name ) . '</span></a>';
117+
$actions['network_enable'] = '<a href="' . esc_url( network_admin_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . urlencode( $slug ) . '&amp;paged=1&amp;s', 'enable-theme_' . $slug ) ) ) . '" class="button"><span aria-hidden="true">' . __( 'Network Enable', 'envato-market' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Network Enable &#8220;%s&#8221;', 'envato-market' ), $name ) . '</span></a>';
118118
}
119119
}
120120
// @codeCoverageIgnoreEnd
@@ -137,7 +137,7 @@ function envato_market_themes_column( $group = 'install' ) {
137137
$actions['customize_preview'] = '<a href="' . esc_url( $preview_url ) . '" class="button button-primary load-customize hide-if-no-customize"><span aria-hidden="true">' . __( 'Live Preview', 'envato-market' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;', 'envato-market' ), $name ) . '</span></a>';
138138
}
139139
}
140-
} else if ( 'install' === $group && current_user_can( 'install_themes' ) ) {
140+
} elseif ( 'install' === $group && current_user_can( 'install_themes' ) ) {
141141
// Install link.
142142
$install_link = add_query_arg( array(
143143
'page' => envato_market()->get_slug(),
@@ -146,7 +146,7 @@ function envato_market_themes_column( $group = 'install' ) {
146146
), self_admin_url( 'admin.php' ) );
147147

148148
$actions['install'] = '
149-
<a href="' . wp_nonce_url( $install_link, 'install-theme_' . $theme['id'] ) . '" class="button button-primary">
149+
<a href="' . wp_nonce_url( $install_link, 'install-theme_' . $theme['id'] ) . '" class="button button-primary">
150150
<span aria-hidden="true">' . __( 'Install', 'envato-market' ) . '</span>
151151
<span class="screen-reader-text">' . sprintf( __( 'Install %s', 'envato-market' ), $name ) . '</span>
152152
</a>';
@@ -290,11 +290,11 @@ function envato_market_plugins_column( $group = 'install' ) {
290290
), self_admin_url( 'plugins.php' ) );
291291

292292
$actions['deactivate'] = '
293-
<a href="' . wp_nonce_url( $deactivate_link, 'deactivate-plugin_' . $slug ) . '" class="button">
293+
<a href="' . wp_nonce_url( $deactivate_link, 'deactivate-plugin_' . $slug ) . '" class="button">
294294
<span aria-hidden="true">' . __( 'Deactivate', 'envato-market' ) . '</span>
295295
<span class="screen-reader-text">' . sprintf( __( 'Deactivate %s', 'envato-market' ), $name ) . '</span>
296296
</a>';
297-
} else if ( 'installed' === $group ) {
297+
} elseif ( 'installed' === $group ) {
298298
if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
299299
// Delete link.
300300
$delete_link = add_query_arg( array(
@@ -303,7 +303,7 @@ function envato_market_plugins_column( $group = 'install' ) {
303303
), self_admin_url( 'plugins.php' ) );
304304

305305
$actions['delete'] = '
306-
<a href="' . wp_nonce_url( $delete_link, 'bulk-plugins' ) . '" class="button-delete">
306+
<a href="' . wp_nonce_url( $delete_link, 'bulk-plugins' ) . '" class="button-delete">
307307
<span aria-hidden="true">' . __( 'Delete', 'envato-market' ) . '</span>
308308
<span class="screen-reader-text">' . sprintf( __( 'Delete %s', 'envato-market' ), $name ) . '</span>
309309
</a>';
@@ -317,7 +317,7 @@ function envato_market_plugins_column( $group = 'install' ) {
317317
), self_admin_url( 'plugins.php' ) );
318318

319319
$actions['activate'] = '
320-
<a href="' . wp_nonce_url( $activate_link, 'activate-plugin_' . $slug ) . '" class="button">
320+
<a href="' . wp_nonce_url( $activate_link, 'activate-plugin_' . $slug ) . '" class="button">
321321
<span aria-hidden="true">' . __( 'Activate', 'envato-market' ) . '</span>
322322
<span class="screen-reader-text">' . sprintf( __( 'Activate %s', 'envato-market' ), $name ) . '</span>
323323
</a>';
@@ -343,7 +343,7 @@ function envato_market_plugins_column( $group = 'install' ) {
343343
}
344344
}
345345
// @codeCoverageIgnoreEnd
346-
} else if ( 'install' === $group && current_user_can( 'install_plugins' ) ) {
346+
} elseif ( 'install' === $group && current_user_can( 'install_plugins' ) ) {
347347
// Install link.
348348
$install_link = add_query_arg( array(
349349
'page' => envato_market()->get_slug(),
@@ -352,7 +352,7 @@ function envato_market_plugins_column( $group = 'install' ) {
352352
), self_admin_url( 'admin.php' ) );
353353

354354
$actions['install'] = '
355-
<a href="' . wp_nonce_url( $install_link, 'install-plugin_' . $plugin['id'] ) . '" class="button button-primary">
355+
<a href="' . wp_nonce_url( $install_link, 'install-plugin_' . $plugin['id'] ) . '" class="button button-primary">
356356
<span aria-hidden="true">' . __( 'Install', 'envato-market' ) . '</span>
357357
<span class="screen-reader-text">' . sprintf( __( 'Install %s', 'envato-market' ), $name ) . '</span>
358358
</a>';

inc/admin/upgrader-skins.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function after() {
5959
}
6060

6161
if ( current_user_can( 'manage_network_themes' ) ) {
62-
$install_actions['network_enable'] = '<a href="' . esc_url( network_admin_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . urlencode( $stylesheet ) .'&amp;paged=1&amp;s', 'enable-theme_' . $stylesheet ) ) ) . '" target="_parent">' . __( 'Network Enable', 'envato-market' ) . '</a>';
62+
$install_actions['network_enable'] = '<a href="' . esc_url( network_admin_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . urlencode( $stylesheet ) . '&amp;paged=1&amp;s', 'enable-theme_' . $stylesheet ) ) ) . '" target="_parent">' . __( 'Network Enable', 'envato-market' ) . '</a>';
6363
}
6464
}
6565

inc/admin/view/callback/admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
if ( 'install-plugin' === $_GET['action'] ) {
1313
Envato_Market_Admin::install_plugin( $id );
14-
} else if ( 'install-theme' === $_GET['action'] ) {
14+
} elseif ( 'install-theme' === $_GET['action'] ) {
1515
Envato_Market_Admin::install_theme( $id );
1616
}
1717
} else {

0 commit comments

Comments
 (0)