This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Add custom post status | |
| */ | |
| /** | |
| * Register Custom Status | |
| * Add custom post status to Product custom post type | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| module.exports = function(grunt) { | |
| // load all grunt tasks matching the `grunt-*` pattern | |
| // Ref. https://npmjs.org/package/load-grunt-tasks | |
| require('load-grunt-tasks')(grunt); | |
| grunt.initConfig({ | |
| // Fontello Icons | |
| // Note: This is one time running task, so run grunt after update assets/fontello/config.json file | |
| // Ref. https://npmjs.org/package/grunt-fontello | |
| fontello: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Responsive Equal Height Element | |
| * | |
| * @param {type} container | |
| * @returns {undefined} | |
| */ | |
| equalheight = function ( container ) { | |
| var currentTallest = 0, | |
| currentRowStart = 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery( document ).ready( function() { | |
| var isMobile = { | |
| Android: function() { | |
| return navigator.userAgent.match( /Android/i ); | |
| }, | |
| BlackBerry: function() { | |
| return navigator.userAgent.match( /BlackBerry/i ); | |
| }, | |
| iOS: function() { | |
| return navigator.userAgent.match( /iPhone|iPad|iPod/i ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery( document ).ready( function() { | |
| /** | |
| * Show Short Content | |
| * Add Read More link after short text, | |
| * Show full content after click on Read More | |
| * | |
| * Usage: | |
| * jQuery( '.my-selector' ).rtpCharLength(); | |
| */ | |
| ( function( $ ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Remove HTML Filtering | |
| */ | |
| remove_filter( 'pre_term_description', 'wp_filter_kses' ); | |
| remove_filter( 'term_description', 'wp_kses_data' ); | |
| /** | |
| * Add WP_Editor to Category Description | |
| * | |
| * @param type $tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function create_page_taxonomy() { | |
| register_taxonomy( 'category', array( 'page', 'post' ), array( | |
| 'hierarchical' => true, | |
| 'label' => __( 'Categories' ), | |
| 'singular_label' => __( 'Category' ), | |
| 'show_ui' => true, | |
| 'query_var' => true, | |
| 'rewrite' => true | |
| ) ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Add Photographer Name and URL fields to media uploader | |
| * | |
| * @param $form_fields array, fields to include in attachment form | |
| * @param $post object, attachment record in database | |
| * | |
| * @return $form_fields, modified form fields | |
| */ | |
| function rtp_attachment_field_credit( $form_fields, $post ) { | |
| $form_fields['rtp-photographer-name'] = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Function Declaration for Equal Height */ | |
| function rtp_equalHeight( group ) { | |
| var tallest = 0; | |
| group.each( function() { | |
| var thisHeight = jQuery( this ).height(); | |
| if ( thisHeight > tallest ) { | |
| tallest = thisHeight; | |
| } | |
| } ); | |
| group.height( tallest ); |