Skip to content

Instantly share code, notes, and snippets.

module.exports = function( grunt ) {
'use strict';
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks );
grunt.initConfig({
makepot: {
plugin1: {
options: {
<?php
class Yoast_GlotPress_SEO {
function __construct() {
add_filter( 'gp_title', array( $this, 'modify_title' ) );
add_action( 'gp_head', array( $this, 'meta_desc' ), 9 );
add_filter( 'gp_redirect_status', array( $this, 'modify_redirect_status' ), 10, 2 );
}
@remkus
remkus / aauthorbox.php
Last active August 29, 2015 14:26 — forked from neilgee/aauthorbox.php
Genesis WordPress Customised Author Box
<?php
//do not copy the opening php tag above
/**
* Changing the AuthorBox in WordPress
*
* @package Changing the AuthorBox in WordPress
* @author Neil Gee
* @link http://wpbeaches.com/author-box-genesis/
<?php
add_filter('wpseo_sitemap_index', 'add_subdomains_to_sitemap' ); // add link to custom sitemap
/**
* Add the link to the main sitemap index
* @param string $content Existing sitemap content.
* @return string Sitemap with extra content.
*/
function add_subdomains_to_sitemap( $content = '' ) {
@remkus
remkus / Gridsystem
Last active August 29, 2015 14:28 — forked from lucprincen/Gridsystem
/*
* Mixins:
*/
//make flex rows a bit easier:
@mixin flex-row( $equalize:stretch ){
@include display(flex);
@include flex-direction(row);
@include align-items($equalize);
}
@remkus
remkus / gist:1234987
Created September 22, 2011 14:56
Poor Coding standards - or even, lack thereof
<?php
function custom_body_class($classes) {
if (!is_user_logged_in())
$classes[] = 'not-loggedin';
return $classes;
}
add_filter('body_class','custom_body_class');
@remkus
remkus / gist:1770438
Created February 8, 2012 15:26
Custom Post Type
<?php
/**
* Custom Post Type with matching Custom Taxonomy. Only thing missing is how to
* get the following permalink: /tips/taxonomy-name/postname
*
*/
register_post_type( 'Tips', array(
'label' => 'Tips',
@remkus
remkus / gist:1870417
Created February 20, 2012 18:13
Adding Custom Fields to Custom Post Type feed
<?php
add_filter( 'the_content_rss', 'iculture_add_custom_fields_to_apptopvijf_content' );
add_filter( 'the_content', 'iculture_add_custom_fields_to_apptopvijf_content' );
/**
* Alter the content output for the apptovijf custom post type.
*
* @global $post Post object
* @param string $content Existing content.
* @return string Filtered content.
@remkus
remkus / wp_editor_extra_wp-admin-bar-menu.php
Created February 23, 2012 14:03 — forked from jphorn/wp_editor_extra_wp-admin-bar-menu.php
Add menu to WordPress Admin Bar for Editor role (and higher) (WordPress Toolbar)
<?php
/**
* Adding a menu to your WordPress Toolbar
*
* @author: Jean-Paul Horn, iCulture.nl (@JeanPaulH)
* @param $wp_admin_bar used to add an extra dropdown menu
*
* Thanks to Remkus de Vries (@defries)
*/
@remkus
remkus / gist:2157116
Created March 22, 2012 08:23
Adding Widget Area in between Grid
<?php
add_action( 'genesis_after_post','ecowijs_add_widget_area_between_grid' );
/**
* The ecowijs_add_widget_area_between_grid function is all about
* dAdding Widget Area between Genesis Featured and Genesis Gri
*
* @access public
* @return void
*/