A helper to make the life of Wordpress developers easier.
This helper can be used to quickly register Custom Post Types, Taxonomies, Meta Boxes, Menu Pages and Sidebars within your Wordpress projects. Please comment, review, watch, fork and report bugs.
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
WordPress Cuztom Helper
1. WORDPRESS
CUZTOM
HELPER
- A helper to make the life of Wordpress developers easier.
_ Ante Primorac (@anteprimorac)
_ Web Developer @ Slicejack
_ 2nd WordPress Meetup Split
2. WHAT DO WE USE
CUZTOM FOR?
_ Post types
_ Taxonomies
_ Meta Boxes
_ Post meta
_ Term meta
_ User meta
3. HOW TO USE CUZTOM?
1 CLONE REPOSITORY TO INC/CUZTOM/
slicejack:inc ante$ git clone https://github.com/gizburdt/wp-cuztom.git cuztom
2 CREATE CUZTOM.PHP AND LET THE MAGIC BEGIN
<?php
define( 'CUZTOM_TEXTDOMAIN', 'slicejack' );
define( 'CUZTOM_URL', get_template_directory_uri() . '/inc/cuztom' );
require( 'cuztom/cuztom.php' );
4. BOOKS LIBRARY
1 CREATE CUSTOM POST TYPE - BOOK
$books = new Cuztom_Post_Type( 'book', array(
'has_archive' => true,
'rewrite' => array(
'slug' => 'books'
),
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' )
) );
5.
6. BOOKS LIBRARY
2 CREATE CUSTOM TAXONOMY - BOOK CATEGORY
$book_category = new Cuztom_Taxonomy( 'Book Category', 'book' );
9. FIELD TYPES
_ text - a simple text field
_ textarea - a large textarea for multiple lines of text
_ checkbox - a simple boolean entry
_ yesno - allows choice of yes/no (pre-made extension of radio)
_ select - combo box selection
_ multi_select - multi select selection
_ checkboxes - a checkbox group
_ radios - a radio group
_ wysiwyg - an editor with the same controls as the standard WordPress editor
_ image - image upload box
_ file - file upload box
_ date - date selection
_ datetime - date and time (hour+minutes) selection
_ time - time (hour+minutes) selection
_ color - color selection
_ post_select - allows inner-post references via a combo-box
_ post_checkboxes - allows inner-post references via a checkbox group
_ term_select - allows category references via a combo-box
_ term_checkboxes - allows category references via a checkbox group
_ hidden - a hidden field (oſten used to store information not visible to the user).
15. CUSTOM FIELD TYPE
1 CREATE YOURFIELD.CLASS.PHP AND SAVE IT TO
<?php
if( ! defined( 'ABSPATH' ) ) exit;
class Cuztom_Field_Ip extends Cuztom_Field
{
var $_supports_repeatable = true;
var $_supports_bundle = true;
var $_supports_ajax = true;
var $css_classes = array( 'cuztom-input', 'cuztom-ip' );
function _output( $value )
{
$output = '';
$output .= '<input type="text" ' . $this->output_name() . ' ' . $this->output_id() . ' ' .
$this->output_css_class() . ' value="' . ( ! empty( $value ) ? $value : '0.0.0.0' ) . '" />';
$output .= $this->output_explanation();
return $output;
}
INC/CUZTOM/CLASSES/FIELDS
16. CUSTOM FIELD TYPE
1 CREATE YOURFIELD.CLASS.PHP AND SAVE IT TO
function save_value( $value ) {
return filter_var( $value, FILTER_VALIDATE_IP ) ? $value : '0.0.0.0';
}
}
INC/CUZTOM/CLASSES/FIELDS
17. CUSTOM FIELD TYPE
2 INCLUDE FIELD TYPE CLASS
private function includes()
{
/*...*/
include( CUZTOM_DIR . 'classes/fields/ip.class.php' );
}