wordpress-scaffold 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/changelog.md +5 -0
- data/lib/wordpress-scaffold/version.rb +1 -1
- data/readme.md +1 -0
- data/scaffold/functions.php +23 -0
- data/scaffold/index.php +4 -1
- data/scaffold/php/router.class.php +15 -4
- data/scaffold/php/view.class.php +1 -1
- data/scaffold/tasks/build.rake +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c99c62c776ec36b04d3f153f51c714cddb561ee6
|
4
|
+
data.tar.gz: 712cbc07b1426ec59e356583501e796fb63950fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0acb185b3c8661a61eb9b630f282ad96c78070df3f306070d730a5433fcacc88bd5dfe44ed7b5e1de80ddc66eb17a3ae61d6b2336c0dee1d8f227b33da40c23a
|
7
|
+
data.tar.gz: 2f90dbbcac6b3653731273b18504877ff340d59c90dfe62fda73dfc28e80df03cfa25c8ee1f043c0f1ac9ce2958c6e39ed5fb2ae7a125be590e6b7b9bd3ed606
|
data/changelog.md
CHANGED
data/readme.md
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
*alpha code is alpha*
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/* Strip Errant WP-Head Items
|
4
|
+
------------------------------------------------- */
|
5
|
+
|
6
|
+
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
|
7
|
+
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
|
8
|
+
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
|
9
|
+
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
|
10
|
+
remove_action( 'wp_head', 'index_rel_link' ); // index link
|
11
|
+
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
|
12
|
+
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
|
13
|
+
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post.
|
14
|
+
remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version
|
15
|
+
|
16
|
+
|
17
|
+
/*
|
18
|
+
** Turn Off XML-RPC
|
19
|
+
** http://www.avsecurity.in/2013/04/wordpress-xml-rpc-pingback-vulnerability.html
|
20
|
+
*/
|
21
|
+
add_filter( 'xmlrpc_enabled', '__return_false' );
|
22
|
+
|
23
|
+
?>
|
data/scaffold/index.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
$_load_paths = array(
|
25
25
|
'views/helpers',
|
26
|
-
'
|
26
|
+
'php'
|
27
27
|
);
|
28
28
|
|
29
29
|
spl_autoload_register( function ( $class_name ) {
|
@@ -32,6 +32,9 @@
|
|
32
32
|
if ( file_exists( THEME_DIR . '/' . $load_path.'/'.$class_name.'.php' ) ) {
|
33
33
|
require_once $load_path.'/'.$class_name.'.php';
|
34
34
|
return;
|
35
|
+
} else if ( file_exists( THEME_DIR.'/'$load_path.'/'.strtolower($class_name).'.php') ) {
|
36
|
+
require_once $load_path.'/'.strtolower($class_name).'.php';
|
37
|
+
return;
|
35
38
|
}
|
36
39
|
}
|
37
40
|
});
|
@@ -11,6 +11,8 @@
|
|
11
11
|
**
|
12
12
|
** Router::map( array(
|
13
13
|
** 'is_single' => 'single',
|
14
|
+
** 'is_page' => array( '123' => 'page',
|
15
|
+
** '345' => 'archive' ),
|
14
16
|
** 'default' => 'index'
|
15
17
|
** ));
|
16
18
|
**
|
@@ -26,10 +28,19 @@
|
|
26
28
|
$default = $routes_array['default'];
|
27
29
|
unset( $routes_array['default'] );
|
28
30
|
|
29
|
-
foreach( $routes_array as $conditional => $
|
30
|
-
if(
|
31
|
-
|
32
|
-
|
31
|
+
foreach( $routes_array as $conditional => $args ) {
|
32
|
+
if( is_array($args) ) {
|
33
|
+
foreach( $args as $id => $view ) {
|
34
|
+
if( call_user_func_array( $conditional, $id ) ) {
|
35
|
+
View::render( $view, $format );
|
36
|
+
exit();
|
37
|
+
}
|
38
|
+
}
|
39
|
+
} else {
|
40
|
+
if( call_user_func($conditional) ) {
|
41
|
+
View::render( $args, $format );
|
42
|
+
exit();
|
43
|
+
}
|
33
44
|
}
|
34
45
|
}
|
35
46
|
|
data/scaffold/php/view.class.php
CHANGED
data/scaffold/tasks/build.rake
CHANGED
@@ -9,7 +9,7 @@ task :build do
|
|
9
9
|
file_list.push *['.htaccess', 'index.php', 'functions.php', 'screenshot.png', 'style.css', 'favicon.ico' ]
|
10
10
|
|
11
11
|
# add dir files
|
12
|
-
file_list.push *Dir[ 'assets/**/*', 'layouts/**/*', 'config/**/*', '
|
12
|
+
file_list.push *Dir[ 'assets/**/*', 'layouts/**/*', 'config/**/*', 'php/**/*', 'views/**/*' ]
|
13
13
|
|
14
14
|
# move files to release
|
15
15
|
file_list.each do |file|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordpress-scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Sloan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- scaffold/Guardfile
|
57
57
|
- scaffold/Rakefile
|
58
58
|
- scaffold/config/env.php
|
59
|
+
- scaffold/functions.php
|
59
60
|
- scaffold/index.php
|
60
61
|
- scaffold/php/asset.class.php
|
61
62
|
- scaffold/php/router.class.php
|