Skip to content

Commit ce19fe8

Browse files
author
David Ryan
committed
scope enqueues
1 parent b419ae2 commit ce19fe8

File tree

10 files changed

+41
-162
lines changed

10 files changed

+41
-162
lines changed

app/admin/class-auth-assets.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ function __construct( $dir, $url, $version ) {
5858
* Enqueue Assets for Authenticated Users
5959
* @package Wordpress_development_toolkit
6060
*/
61-
function enqueue_auth_assets() {
61+
function enqueue_auth_assets( $hook ) {
62+
if ( false === strpos( $hook, 'wp-phx-dev-kit' ) ) {
63+
return;
64+
}
6265
wp_enqueue_style( 'wordpress-development-toolkit-admin' );
6366
wp_enqueue_script( 'wordpress-development-toolkit-admin' );
6467
}

app/admin/class-product-machine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static function make_zip_download( $filename, $origin_dir, $tmp_dir, $data, $con
5757
$zip->addFromString( 'plugin-data.json', json_encode( $plugin_data ) );
5858
// maybe include license
5959
if ( 'gpl' === $data['plugin_license'] ) {
60-
$zip->addFromString( 'LICENSE', file_get_contents( dirname( __FILE__ ) . '/templates/gpl.txt' ) );
60+
$zip->addFromString( 'LICENSE', file_get_contents( dirname( __FILE__ ) . '../boilerplates/GPL.txt' ) );
6161
}
6262
// find every file within origin directory including nested files
6363
$iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $origin_dir ) );

app/admin/dashboard-cards.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
{
44
"title": "Tools",
55
"slug": "tools",
6-
"description": "",
6+
"description": "Create a new WordPress Plugin using the <a href='https://github.com/wordpress-phoenix/abstract-plugin-base/' target='_blank'>Abstract Plugin Base</a>.",
77
"dashicon": "vault",
88
"contentTmpl": "wp-phx-tools"
99
},
1010
{
1111
"title": "Enterprise Standards & Best Practices",
1212
"slug": "wp-phx-standards-best-practices",
13-
"description": "Coming soon",
13+
"description": "",
1414
"dashicon": "wordpress-alt",
15-
"contentTmpl": ""
15+
"contentTmpl": "wp-phx-standards-best-practices"
1616
},
1717
{
1818
"title": "Guides & Glossaries",
1919
"slug": "guides-glossaries",
20-
"description": "Coming Soon: Hwelpful resources for WordPress Development",
20+
"description": "",
2121
"dashicon": "book-alt",
2222
"contentTmpl": "wp-phx-guides-glossaries"
2323
}

app/admin/plugin-generator-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"app": {
33
"generator_version": "2.1.0",
44
"generator_version_release_dates": {
5+
"2.1.0": "3/6/2018",
56
"1.0.0": "11/13/2017"
67
},
78
"key": "val",

app/admin/templates/main.php

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,51 @@
1010
</table>
1111
</script>
1212
<script id="tmpl-wp-phx-standards-best-practices" type="text/html">
13+
<small><strong>These guides are fresh and incomplete</strong> and not the best they can be yet! Help contribute!</small>
1314
<table width="100%">
1415
<tr>
1516
<td width="100px">
16-
<span class="dashicons dashicons-info"></span>
17-
<strong>Intro</strong></td>
18-
<td>Tools, Environments, Goals</td>
17+
<span class="dashicons dashicons-media-code"></span>
18+
<a href="https://github.com/WordPress-Phoenix/wordpress-development-toolkit/blob/master/docs/best
19+
-practices-asset-management.md" target="_blank">Asset Management</a>
20+
</td>
1921
</tr>
2022
<tr>
2123
<td width="100px">
22-
<span class="dashicons dashicons-media-code"></span> Code</td>
23-
<td>Best Practices, PHP, JS, Dependencies</td>
24+
<span class="dashicons dashicons-networking"></span>
25+
<a href="https://github.com/WordPress-Phoenix/wordpress-development-toolkit/blob/master/docs/best
26+
-practices-asset-management.md" target="_blank">Action & Filter Hooks</a>
27+
</td>
2428
</tr>
2529
<tr>
2630
<td width="100px">
27-
<span class="dashicons dashicons-welcome-widgets-menus"></span>
28-
<code style="word-wrap: initial;overflow-wrap: initial;">/wp-admin</code></td>
29-
<td>Best Practices, Design, Experience, Flows</td>
30-
</tr>
31-
<tr>
32-
<td width="100px"><span class="dashicons dashicons-welcome-write-blog"></span>
33-
Docs</td>
34-
<td>Inline, Repo, Confluence</td>
31+
<span class="dashicons dashicons-hammer"></span>
32+
<a href="https://github.com/WordPress-Phoenix/wordpress-development-toolkit/blob/master/docs/code.md" target="_blank">
33+
PHP, CSS & JavaScript Coding Standards
34+
</a>
35+
</td>
3536
</tr>
3637
<tr>
37-
<td width="100px"><span class="dashicons dashicons-randomize"></span> Git</td>
38-
<td>Flow, PRs, Reviews, Releases</td>
38+
<td width="100px">
39+
<span class="dashicons dashicons-lock"></span>
40+
<a href="https://github.com/WordPress-Phoenix/wordpress-development-toolkit/blob/master/docs/security.md" target="_blank">
41+
Security
42+
</a>
43+
</td>
3944
</tr>
4045
</table>
4146
</script>
4247
<script id="tmpl-wp-phx-guides-glossaries" type="text/html">
43-
48+
<small><strong>These guides are fresh and incomplete</strong> and not the best they can be yet! Help contribute!</small>
49+
<table width="100%">
50+
<tr>
51+
<td width="100px">
52+
<span class="dashicons dashicons-media-code"></span>
53+
<a href="https://github.com/WordPress-Phoenix/wordpress-development-toolkit/blob/master/docs
54+
/resources.md" target="_blank">Resources</a>
55+
</td>
56+
</tr>
57+
</table>
4458
</script>
4559
<script id="tmpl-wp-phx-help-resources" type="text/html">
4660
<div
File renamed without changes.

app/class-plugin.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ public function onload( $instance ) {
4343
*/
4444
public function init() {
4545
do_action( get_called_class() . '_before_init' );
46-
new Includes\Init(
47-
trailingslashit( $this->installed_dir ),
48-
trailingslashit( $this->installed_url ),
49-
$this->version
50-
);
46+
// silence is golden :)
5147
do_action( get_called_class() . '_after_init' );
5248
}
5349

app/includes/class-assets.php

Lines changed: 0 additions & 86 deletions
This file was deleted.

app/includes/class-init.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

app/includes/index.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)