Skip to content

Instantly share code, notes, and snippets.

View eugenealegiojo's full-sized avatar

Eugene Alegiojo eugenealegiojo

  • Cebu, Philippines
View GitHub Profile
<?php
function bb_add_project_management_role() {
add_role('bb_project_manager',
'Project Manager',
array(
'read' => true,
'edit_posts' => true,
'delete_posts' => false,
'publish_posts' => false,
'upload_files' => true,
@eugenealegiojo
eugenealegiojo / functions.php
Last active October 13, 2022 17:46
Combine all enqueued google fonts into one HTTP request in your Wordpress site. Add this to your theme's functions.php
/**
* WP hook that combines all google font HTTP calls into one URL from theme and plugins.
*/
add_action('wp_enqueue_scripts', 'combine_google_fonts', 99);
function combine_google_fonts(){
global $wp_styles;
// Check for any enqueued `fonts.googleapis.com` from themes or plugins
if( isset( $wp_styles->queue ) ){
// http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
module.exports = function(grunt) {
/**
* Saves having to declare each dependency
*/
require( "matchdep" ).filterDev( "grunt-*" ).forEach( grunt.loadNpmTasks );
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(