Skip to content

Instantly share code, notes, and snippets.

@dobbyloo
dobbyloo / AssetRegister.php
Created March 4, 2014 21:56
Wordpress: wrapper class to register/enqueue styles and scripts in a theme.
<?php namespace PaintedCloud\WP\Classes;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class AssetRegister {
public $scripts_base_uri;
public $styles_base_uri;
protected $scripts;
protected $stylesheets;
@dobbyloo
dobbyloo / CustomTaxonomy.php
Last active August 6, 2020 15:36
Wordpress: custom taxonomy wrapper class for "register_taxonomy" function.
<?php namespace PaintedCloud\WP\Classes;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class CustomTaxonomy {
protected $textdomain;
protected $taxonomies;
public function __construct ( $textdomain )
@dobbyloo
dobbyloo / CustomPost.php
Last active September 28, 2021 13:53
Wordpress: custom post wrapper class for "register_post_type" function.
<?php namespace PaintedCloud\WP\Classes;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class CustomPost {
protected $textdomain;
protected $posts;
public function __construct( $textdomain )