This file contains 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 | |
function ms_filter_posts_columns( $columns ) { | |
$columns['gutenberg_markup'] = __( 'Gutenberg Markup?', 'text-domain' ); | |
return $columns; | |
} | |
function ms_page_column( $column, $post_id ) { |
This file contains 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
document.addEventListener( 'DOMContentLoaded', function() { | |
var getPost = async function() { | |
var response = await fetch( 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/metadata/icons.json' ); | |
var icons = await response.json(); | |
let fontAwesomeObj = {}; | |
let currentObject = fontAwesomeObj; | |
Object.entries( icons ).forEach( ( [ key, icon ] ) => { | |
const styles = icon.styles; |
This file contains 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 | |
/** | |
* Register post meta for featured image display. | |
*/ | |
function register_block_post_meta() { | |
register_post_meta( | |
'post', | |
'featuredImageDisplay', | |
[ |
This file contains 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
// All block lists. | |
wp.blocks.getBlockTypes(); | |
// All Core blocks only. | |
wp.blocks.getBlockTypes().filter((block) => { return block.name.indexOf('core') !== -1}); | |
// All block list name only. | |
wp.blocks.getBlockTypes().filter((block) => { console.log( block.name ) }); | |
// All block list name only EXCLUDING child block. |
This file contains 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 | |
/** | |
* Rename Aside post format to Look post format | |
*/ | |
function rtp_rename_post_formats( $safe_text ) { | |
if ( $safe_text == __( 'Aside' , 'fab' ) ) { | |
return __( 'Look' , 'fab' ); | |
} | |
return $safe_text; |
This file contains 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 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 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 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 ); |
NewerOlder