Skip to content

Releases: TypeRocket/typerocket

TypeRocket 3.0 - Release Candidate 4

15 Sep 19:09
Compare
Choose a tag to compare
Pre-release
v3.0.0-RC4

update core

TypeRocket 3.0 - Release Candidate 3

12 Sep 19:26
Compare
Choose a tag to compare
Pre-release

Updates to:

  • Core
  • Assets

TypeRocket 3.0 - Release Candidate 2

04 Sep 01:55
Compare
Choose a tag to compare
Pre-release
  • Updated Design
  • Updated Icons
  • Updated Assets
  • Updated Core

TypeRocket 3.0 - Release Candidate 1

31 Aug 19:09
Compare
Choose a tag to compare
Pre-release

About Release

TypeRocket 3.0 is a complete rethinking of how you work with and build themes. We have considered the new PHP version landscape, component/modular based designs and so much more.

What is new in TypeRocket 3.0?

  • Moved plugins: Typerocket plugins now have their own repository.
  • Core Unit Tests: We have begun the process of unit testing!
  • New builder Typerocket plugin: Design component based pages without the hassle.
  • Search field: Search taxonomies and any post type with this field.
  • Improved stability: With the upgrade to PHP 5.5.9 and WordPress 4.5.
  • Improved structure: Configuring TypeRocket is even easier now.
  • Enhanced fields: Every field has been analyzed and improved with new method for common tasks like setting help text.
  • Taxonomy fields: Now add fields to taxonomies without making your own API.
  • EOL for field bracket sytax: Moved to dot notation for fields.
  • Format property for Models: Sanitize data before it is saved with extreme ease. Wildcards too!
  • Improved Autoloading: Making your own controllers, models, middleware, kernel and fields no longer requires the TypeRocket namespace.
  • Color field improved: Added color palettes.
  • XKernel and Middleware: Now use any namespace for middleware you like.
  • Refactored assets: We now use coffee script and SASS by taking advantage of gulp.
  • Front-end Mode: Added the ability to more easily enable TypeRocket on the front-end.
  • Pages: New pages API to make building custom views in the admin simple.
  • Admin Page Views: Create views for your custom admin pages.
  • Theme Views: Create views for your custom theme views.
  • Custom Routes: Create routes for the front-end and map them to your controllers.
  • Schema Model: Create custom tables and access them using the new schema model system.
  • Custom Middleware Routing: Use middleware based on what action is called. You longer need to apply middleware to every action a controller takes.
  • Tables: New layout option for tables. Create for custom admin pages that use the new schema models.
  • Auto Controller Dependancy Injection: Controllers automatically inject dependencies.
  • Validation: Added custom resource validation class.
  • Icons: You can now extend icons for post types and pages for a totally custom admin.
  • Composer: We now use composer.
  • CLI Added: We now have a CLI called galaxy.
  • Use as Root: You can now use TypeRocket as the root of your project over WordPress.
  • Theme Overriding: You can override WordPress themes and hide your template files from the public.
  • Bug fixes
  • And a lot more!

What is next?

We are working on the docs for 3.0 so stay tuned for more information on how to use the new features. We will also be updating our videos and tutorials. We plan to keep the 2.0 documentation for anyone who doesn't want to deal with the migration.

The final release will come in September! But you can play today!

TypeRocket 2.0.13

18 Sep 17:43
Compare
Choose a tag to compare

TypeRocket 2

Coding advanced WordPress themes became a blast. Be good looking and do cool stuff with less code.

http://typerocket.com

Requirements

  • WordPress 4.0+
  • PHP 5.3+

Language

  • English only

What can you do with TypeRocket?

  • You can make make post types, taxonomies and meta boxes with one line of code.
  • Add fields to post types, comments, meta boxes, option pages, user profiles and even on the front-end inside theme template files.
  • You can access a number of pre-made TypeRocket plugins for features like SEO and Theme Options installed directly into your theme.

Documentation

https://typerocket.com/docs/

Book Post Type Example

Gracefully configure WordPress without needing hooks.

  • Add a "Book" post type
  • Add a custom menu icon to "Book" (200+ icons)
  • Add an "Author" taxonomy to "Book" post type
// In your themes functions.php
include( 'typerocket/init.php' );

// Add taxonomy with custom "name" gracefully
$bookAuthor = tr_taxonomy('Author')->setId('book_author');

// Add post type with icon and taxonomy gracefully
$book = tr_post_type('Book')->setIcon('book')->apply($bookAuthor);
  • Add a MetaBox to "Book"
  • Set custom Title placeholder text
$bookDetails = tr_meta_box('Details');
$book->apply($bookDetails)->setTitlePlaceholder('Enter Book Title');
  • Use debug mode to get meta box content provider function
  • Add custom fields for ISBN and Book Cover
function add_meta_content_details() {
    $form = tr_form();
    echo $form->text('ISBN Number');
    echo $form->image('Book Cover');
}

GitHub Logo

Note: Flush the WordPress permalinks when you register a post type.

Fillable Fields Example

By default TypeRocket will save any and all fields. This is just fine in many cases and makes life easy. When you need to filter, validate or fill only specific fields we have you covered.

Set the fields for the "Book" post type the only fillable fields to make things a little more secure. You can do this by creating a book controller and model inside the app folder.

BooksModel.php is the main file we care about.

<?php // /typerocket/app/Models/BooksModel.php
namespace TypeRocket\Models;

class BooksModel extends PostTypesModel
{
    protected $fillable = array(
        'book_cover',
        'isbn_number'
    );

    protected $postType = 'book';
}

BooksController.php needs to be created to handle the actions. Blank works just fine.

<?php // /typerocket/app/Controllers/BooksController.php
namespace TypeRocket\Controllers;

class BooksController extends PostTypesController
{
}

Now only "ISBN Number" and "Book Cover" will be saved. However, because the resource controller/model has been specified, "books", only an administrator can manage the new fields.

XKernel

You will need to create a new Kernel class called XKernel to specify the middleware you want to use. Middleware can be used for all kinds of fun things. In this case we want "books" to authenticate like posts.

XKernel.php manages the middleware for the resource and request types.

<?php // /typerocket/app/Http/XKernel.php
namespace TypeRocket\Http;

class XKernel extends Kernel
{

    protected $middleware = array(
        'hookGlobal' =>
            array('AuthRead'),
        'restGlobal' =>
            array(
                'AuthRead',
                'ValidateCsrf'
            ),
        'noResource' => array(
            'AuthAdmin'
        ),
        'books' => // new resource middleware
            array('OwnsPostOrCanEditPosts'),
        'users' =>
            array('IsUserOrCanEditUsers'),
        'posts' =>
            array('OwnsPostOrCanEditPosts'),
        'pages' =>
            array('OwnsPostOrCanEditPosts'),
        'comments' =>
            array('OwnsCommentOrCanEditComments'),
        'options' =>
            array('CanManageOptions')
    );
}

Filter Fields Example

If we want to filter the fields we can do this as well. Lets use the controller filter to sanitize the data being saved.

  • Make sure the "ISBN Number" doesn't contain invalid characters
  • Cast the "Book Cover" to an integer since we reference it by the attachment ID.
add_filter('tr_model_secure_fields', function($fields, $model) {
    if($model instanceof \TypeRocket\Models\BooksModel) {

        if(isset($fields['isbn_number'])) {
            $isbn = strtoupper($fields['isbn_number']);
            $isbn = preg_replace('/((?![Xx0-9-]+).)*/i', '', $isbn);
            $fields['isbn_number'] = $isbn;
        }

        if(isset($fields['book_cover'])) {
            $fields['book_cover'] = (int) $fields['book_cover'];
        }

    }
    return $fields;
}, 10, 2);

Visit TypeRocket http://typerocket.com to get access to the tutorials and documentation.

Icons

http://icomoon.io/#preview-free licensed under the GPL.

2.0.12 – Patch

31 Aug 14:01
Compare
Choose a tag to compare
  • Make TypeRocket includible from a WordPress Plugin

Quick look: #8

2.0.11 – Patch

28 Aug 15:29
Compare
Choose a tag to compare
  • Fix many WP_DEBUG notices

2.0.10 – Patch

18 Aug 10:54
Compare
Choose a tag to compare
  • Fix undefined $post global

2.0.9 – Patch

14 Aug 02:30
Compare
Choose a tag to compare
  • Add SEO basic twitter cards

screen shot 2015-08-13 at 10 27 08 pm

screen shot 2015-08-13 at 10 32 56 pm

screen shot 2015-08-13 at 10 34 31 pm

2.0.8 – Patch

13 Aug 19:35
Compare
Choose a tag to compare
  • Fix SEO OG image url and make http if https
  • Add SEO OG URL
  • Add OG helpful links to SEO metabox