Skip to content

Commit 0e3de40

Browse files
committed
first commit
0 parents  commit 0e3de40

50 files changed

Lines changed: 610 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Vendor ###
2+
/vendor
3+
node_modules
4+
package-lock.json
5+
6+
### Project Files ###
7+
*.sublime-project
8+
*.sublime-workspace
9+
.settings
10+
.project
11+
.build
12+
.idea
13+
.DS_Store*
14+
ehthumbs.db
15+
Icon?
16+
Thumbs.db
17+

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
TypeRocket 4 Skeleton Theme
2+
===
3+
4+
Super simple. No junk code applied. Skeleton starter theme.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace App\Controllers;
3+
4+
use \App\Models\Category;
5+
use \TypeRocket\Controllers\WPTermController;
6+
7+
class CategoryController extends WPTermController
8+
{
9+
protected $modelClass = Category::class;
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App\Controllers;
4+
5+
use App\Models\Comment;
6+
use TypeRocket\Controllers\WPCommentController;
7+
8+
class CommentController extends WPCommentController
9+
{
10+
protected $modelClass = Comment::class;
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App\Controllers;
4+
5+
use App\Models\Option;
6+
use TypeRocket\Controllers\WPOptionController;
7+
8+
class OptionController extends WPOptionController
9+
{
10+
protected $modelClass = Option::class;
11+
}

app/Controllers/PageController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace App\Controllers;
3+
4+
use App\Models\Page;
5+
use TypeRocket\Controllers\WPPostController;
6+
7+
class PageController extends WPPostController
8+
{
9+
protected $modelClass = Page::class;
10+
}

app/Controllers/PostController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace App\Controllers;
3+
4+
use App\Models\Post;
5+
use TypeRocket\Controllers\WPPostController;
6+
7+
class PostController extends WPPostController
8+
{
9+
protected $modelClass = Post::class;
10+
}

app/Controllers/TagController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace App\Controllers;
3+
4+
use App\Models\Tag;
5+
use TypeRocket\Controllers\WPTermController;
6+
7+
class TagController extends WPTermController
8+
{
9+
protected $modelClass = Tag::class;
10+
}

app/Controllers/UserController.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App\Controllers;
4+
5+
use App\Models\User;
6+
use TypeRocket\Controllers\WPUserController;
7+
8+
class UserController extends WPUserController
9+
{
10+
protected $modelClass = User::class;
11+
}

app/Http/Kernel.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
namespace App\Http;
3+
4+
use App\Http\Middleware\VerifyNonce;
5+
use TypeRocket\Http\Middleware\AuthAdmin;
6+
use TypeRocket\Http\Middleware\AuthRead;
7+
use TypeRocket\Http\Middleware\CanManageCategories;
8+
use TypeRocket\Http\Middleware\CanManageOptions;
9+
use TypeRocket\Http\Middleware\IsUserOrCanEditUsers;
10+
use TypeRocket\Http\Middleware\OwnsCommentOrCanEditComments;
11+
use TypeRocket\Http\Middleware\OwnsPostOrCanEditPosts;
12+
13+
class Kernel extends \TypeRocket\Http\Kernel
14+
{
15+
public $middleware = [
16+
'hookGlobal' => [],
17+
'restApiFallback' =>
18+
[ AuthAdmin::class ],
19+
'resourceGlobal' =>
20+
[ VerifyNonce::class ],
21+
'user' =>
22+
[ IsUserOrCanEditUsers::class ],
23+
'post' =>
24+
[ OwnsPostOrCanEditPosts::class ],
25+
'comment' =>
26+
[ OwnsCommentOrCanEditComments::class ],
27+
'option' =>
28+
[ CanManageOptions::class ],
29+
'term' =>
30+
[ CanManageCategories::class ],
31+
];
32+
}

0 commit comments

Comments
 (0)