Skip to content

Instantly share code, notes, and snippets.

View pagelab's full-sized avatar
🚀

Márcio Duarte pagelab

🚀
View GitHub Profile
<?php namespace PaintedCloud\WP\Classes;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class CustomPost {
protected $textdomain;
protected $posts;
public function __construct( $textdomain )
<?php namespace PaintedCloud\WP\Classes;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class CustomTaxonomy {
protected $textdomain;
protected $taxonomies;
public function __construct ( $textdomain )
<?php
/**
* Show Mad Mimi subscriber count w/cache.
*/
function jm_madmimi_subscribers() {
$email = '';
$api = '';
// check and get cached subscriber count
@-webkit-keyframes float-up {
0% { opacity: 0; top: 4rem; }
100% { opacity: 1; top: 0; }
}
.float-up {
opacity: 0;
position: relative;
-webkit-animation-name: float-up;
-webkit-animation-duration: .3s;
<?php
add_action( 'tgmpa_register', 'register_required_plugins' );
// This function is called from the above hook
function register_required_plugins()
{
// The plugins array allows us to define multiple plugins we want to include.
// The commented out example shows how we can include and activation a bundled
// plugin zip file in our theme.
@pagelab
pagelab / font-awesome.css.sass
Last active August 29, 2015 14:02 — forked from mbreit/font-awesome.css.sass
Font-awesome Sass mixin
$fontawesome_path: "." !default
@font-face
font-family: 'FontAwesome'
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot')
src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot?#iefix') format("embedded-opentype"), font-url('#{$fontawesome_path}/fontawesome-webfont.woff') format("woff"), font-url('#{$fontawesome_path}/fontawesome-webfont.ttf') format("truetype")
font-weight: normal
font-style: normal
@mixin icon($icon)
<?php
// Standard Size Thumbnail
if(false === get_option("thumbnail_crop")) {
add_option("thumbnail_crop", "1"); }
else {
update_option("thumbnail_crop", "1");
}
// Medium Size Thumbnail
if(false === get_option("medium_crop")) {
<?php
/**
* handle the calculation
* @param integer $seconds [description]
* @return [type] [description]
*/
function rkv_calc_read_time( $seconds = 0 ) {
// calc the minutes
<?php
/**
* Adds a simple WordPress pointer to Settings menu
*/
function thsp_enqueue_pointer_script_style( $hook_suffix ) {
// Assume pointer shouldn't be shown
$enqueue_pointer_script_style = false;
<?php
/**
* Theme Activation Tour
*
* This class handles the pointers used in the introduction tour.
* @package Popup Demo
*
*/
class WordImpress_Theme_Tour {