wordpress-scaffold 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf70792391f28e48e512ae427a8e602ac101bd1d
4
- data.tar.gz: 2127a0717331c2d66eee3d8976c6284d6962fe27
3
+ metadata.gz: c99c62c776ec36b04d3f153f51c714cddb561ee6
4
+ data.tar.gz: 712cbc07b1426ec59e356583501e796fb63950fa
5
5
  SHA512:
6
- metadata.gz: 62ce9d9a820fed3131caddc88fd9c48937c3fe7afcec89125ae63762a65db733dbeb01a4a568f2d695a78cf919585b7a43bb60e0e2efc821162373bef0f1c797
7
- data.tar.gz: 7c0dea79aded367bd0c9905c1c9d17f445ad88075e9e6cf6642490dcf46b900815c7a2abb37519ed34dc15a2e9833f5df9798cb09dc4da1170c459c546cc6934
6
+ metadata.gz: 0acb185b3c8661a61eb9b630f282ad96c78070df3f306070d730a5433fcacc88bd5dfe44ed7b5e1de80ddc66eb17a3ae61d6b2336c0dee1d8f227b33da40c23a
7
+ data.tar.gz: 2f90dbbcac6b3653731273b18504877ff340d59c90dfe62fda73dfc28e80df03cfa25c8ee1f043c0f1ac9ce2958c6e39ed5fb2ae7a125be590e6b7b9bd3ed606
@@ -0,0 +1,5 @@
1
+ # 0.0.1
2
+ - fix loadpaths & build script for actual scaffold structure
3
+ - fix issue using `::yeild` in PHP 5.5 by switching to `::template`
4
+
5
+ *alpha code is alpha*
@@ -1,5 +1,5 @@
1
1
  module Wordpress
2
2
  module Scaffold
3
- VERSION = "0.0.0"
3
+ VERSION = "0.0.1"
4
4
  end
5
5
  end
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
+ ?>
@@ -23,7 +23,7 @@
23
23
 
24
24
  $_load_paths = array(
25
25
  'views/helpers',
26
- 'lib'
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 => $view ) {
30
- if( call_user_func($conditional) ) {
31
- View::render( $view, $format );
32
- exit();
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
 
@@ -20,7 +20,7 @@
20
20
  ** @param $view [String] view to include
21
21
  ** @return [Void]
22
22
  */
23
- public static function yield( $view ) {
23
+ public static function template( $view ) {
24
24
  include ( 'views/' . $view . '.php' );
25
25
  }
26
26
 
@@ -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/**/*', 'lib/**/*', 'views/**/*' ]
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.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-06-02 00:00:00.000000000 Z
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