Skip to content

Commit 0f7e1d9

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # .circleci/codesniffer.ruleset.xml
2 parents 4530189 + f0c8442 commit 0f7e1d9

17 files changed

+72
-65
lines changed

.circleci/codesniffer.ruleset.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset name="timeinc-wp-plugin">
2+
<ruleset name="wp-dev-toolkit-wp-plugin">
33
<description>Custom plugin codesniffer exceptions.</description>
44
<exclude-pattern>vendor/*</exclude-pattern>
55
<exclude-pattern>lib/composer/*</exclude-pattern>

app/admin/class-auth-assets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace PHX_WP_DEVKIT\V_3_0\Admin;
3+
namespace PHX_WP_DEVKIT\V_3_1\Admin;
44

55
/**
66
* Register and enqueue assets used in the WordPress Admin or only when a user is authenticated here.

app/admin/class-generators-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace PHX_WP_DEVKIT\V_3_0\Admin;
3+
namespace PHX_WP_DEVKIT\V_3_1\Admin;
44

55
class Generators_Page {
66
/**

app/admin/class-init.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?php
22

3-
namespace PHX_WP_DEVKIT\V_3_0\Admin;
3+
namespace PHX_WP_DEVKIT\V_3_1\Admin;
44

55
/**
66
* Class Init
7-
* @package Wordpress_development_toolkit
87
*/
98
class Init {
109

app/admin/class-plugin-generator-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace PHX_WP_DEVKIT\V_3_0\Admin;
3+
namespace PHX_WP_DEVKIT\V_3_1\Admin;
44

55
class Plugin_Generator_Form {
66

app/admin/class-product-machine.php

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace PHX_WP_DEVKIT\V_3_0\Admin;
3+
namespace PHX_WP_DEVKIT\V_3_1\Admin;
44

5-
use RecursiveDirectoryIterator;
6-
use RecursiveIteratorIterator;
7-
use ZipArchive;
5+
use \RecursiveDirectoryIterator;
6+
use \RecursiveIteratorIterator;
7+
use \ZipArchive;
88

99
/**
1010
* Class Product_Machine
@@ -117,15 +117,6 @@ static function make_zip_download( $filename, $origin_dir, $tmp_dir, $data, $con
117117
}
118118
}
119119

120-
121-
122-
// only run these operations for standard plugins
123-
// add empties to key directories
124-
$blank_file = '<?php ' . PHP_EOL . '// *gentle wave* not the code you\'re looking for..' . PHP_EOL;
125-
$idx = '/index.php';
126-
$zip->addFromString( 'app' . $idx, $blank_file );
127-
$zip->addFromString( 'app/admin' . $idx, $blank_file );
128-
129120
// close zip
130121
$zip->close();
131122

@@ -189,7 +180,8 @@ static function process_file_contents( $file ) {
189180
'main.php',
190181
'README.md',
191182
'composer.json',
192-
'app/class-plugin.php'
183+
'app/class-plugin.php',
184+
'.circleci/codesniffer.ruleset.xml',
193185
) );
194186

195187
if ( in_array( $filename, $important_files ) ) {
@@ -267,4 +259,5 @@ static function get_abstract_plugin_base_namespace( $file_contents ) {
267259

268260
return null;
269261
}
262+
270263
}

app/admin/class-toolkit-dashboard-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @subpackage wordpress-development-toolkit
77
*/
88

9-
namespace PHX_WP_DEVKIT\V_3_0\Admin;
9+
namespace PHX_WP_DEVKIT\V_3_1\Admin;
1010

1111
/**
1212
* Class Toolkit_Dashboard_Page

app/admin/templates/main.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<?php
2+
// start that php
3+
?>
14
<script id="tmpl-wp-phx-tools" type="text/html">
25
<table width="100%">
36
<tr>
@@ -111,4 +114,4 @@
111114
</div>
112115
</div>
113116
<br class="clear" />
114-
</script>
117+
</script>
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
<?xml version="1.0"?>
2-
<ruleset name="timeinc-wp-plugin">
2+
<ruleset name="<%= DASHES_SLUG %>-wp-plugin">
33
<description>Custom plugin codesniffer exceptions.</description>
44
<exclude-pattern>vendor/*</exclude-pattern>
55
<exclude-pattern>lib/composer/*</exclude-pattern>
66
<exclude-pattern>assets/*</exclude-pattern>
7-
<rule ref="WordPress-VIP"></rule>
7+
<rule ref="WordPress-VIP">
8+
<exclude name="WordPress.VIP.SuperGlobalInputUsage" />
9+
<exclude name="WordPress.VIP.RestrictedFunctions.switch_to_blog" />
10+
</rule>
11+
<rule ref="WordPress-Core"></rule>
12+
<rule ref="WordPress"></rule>
813
</ruleset>

app/boilerplates/simple/app/admin/class-app.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,47 @@
66
* @subpackage <%= PKG %>
77
*/
88

9-
namespace < %= PRIMARY_NAMESPACE %>\< %= SECONDARY_NAMESPACE %>\Admin;
9+
namespace <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Admin;
1010

1111
/**
1212
* Class App
1313
*/
1414
class App {
1515

1616
/**
17-
* Plugins class object installed directory on the server
17+
* Plugins class object installed directory on the server.
1818
*
19-
* @var string $installed_dir Installed server directory
19+
* @var string $installed_dir Installed server directory.
2020
*/
2121
public $installed_dir;
2222

2323
/**
24-
* Plugins URL for access to any static files or assets like css, js, or media
24+
* Plugins URL for access to any static files or assets like css, js, or media.
2525
*
26-
* @var string $installed_url Installed URL
26+
* @var string $installed_url Installed URL.
2727
*/
2828
public $installed_url;
2929

3030
/**
31-
* If plugin_data is built, this represents the version number defined the the main plugin file meta
31+
* If plugin_data is built, this represents the version number defined the the main plugin file meta.
3232
*
33-
* @var string $version Version
33+
* @var string $version Version.
3434
*/
3535
public $version;
3636

3737
/**
3838
* Add auth'd/admin functionality via new Class() instantiation, add_action() and add_filter() in this method.
3939
*
40-
* @param string $installed_dir Installed server directory
41-
* @param string $installed_url Installed URL
42-
* @param string $version Version
40+
* @param string $installed_dir Installed server directory.
41+
* @param string $installed_url Installed URL.
42+
* @param string $version Version.
4343
*/
4444
function __construct( $installed_dir, $installed_url, $version ) {
4545
$this->installed_dir = $installed_dir;
4646
$this->installed_url = $installed_url;
4747
$this->version = $version;
4848

49-
// Put your new Class() or add_action() here.
49+
// Put your new PHP Class or add_action method here.
5050
}
5151

5252
}

0 commit comments

Comments
 (0)