Skip to content

Instantly share code, notes, and snippets.

View GaryJones's full-sized avatar

Gary Jones GaryJones

View GitHub Profile
@GaryJones
GaryJones / functions.php
Created January 31, 2012 00:12
Edit Prose default options
<?php
add_filter( 'prose_settings_defaults', 'custom_prose_settings_defaults' );
/**
* Edit default Prose design settings values.
*
* These values are used when options are reset, or an invalid value is submitted.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/set-prose-defaults/
@GaryJones
GaryJones / functions.php
Created January 31, 2012 00:15
Add default Prose design settings values.
<?php
add_filter( 'prose_settings_defaults', 'custom_prose_settings_defaults' );
/**
* Add default Prose design settings values.
*
* These values are used when options are reset, or an invalid value is submitted.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/set-prose-defaults/
@GaryJones
GaryJones / style-kept.css
Created January 31, 2012 00:23
Prose CSS comments
/*! My CSS comment here */
@GaryJones
GaryJones / functions-basic.php
Created January 31, 2012 00:29
Remove Prose Design Settings menu link
<?php
remove_theme_support( 'prose-design-settings' );
@GaryJones
GaryJones / functions.php
Created January 31, 2012 00:33
How to add additional post classes
<?php
add_filter( 'post_class', 'custom_post_classes' );
/**
* Add a class of "top" to the first post, and "odd"/"even" classes as appropriate.
*
* @global int $loop_counter Counts the number of times we do the loop.
*
* @param array $classes Existing array of post classes.
*
@GaryJones
GaryJones / functions.php
Created January 31, 2012 00:42
Remove aria-required attributes from Genesis comment form
<?php
add_filter( 'genesis_comment_form_args', 'child_remove_aria_required' );
/**
* Remove aria-required attributes from comment form.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/remove-aria-required-attribute/
*
* @param array $args Comment form arguments.
@GaryJones
GaryJones / functions.php
Created January 31, 2012 00:47
Include Facebook Open Social namespaces.
<?php
remove_action( 'genesis_doctype', 'genesis_do_doctype' );
add_action( 'genesis_doctype', 'child_do_doctype' );
/**
* Include Facebook Open Social namespaces.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/modify-doctype/
*/
@GaryJones
GaryJones / functions.php
Created January 31, 2012 00:49
Switch Genesis to XHTML 1.0 Strict doctype
<?php
remove_action( 'genesis_doctype', 'genesis_do_doctype' );
add_action( 'genesis_doctype', 'child_do_doctype' );
/**
* Switch to XHTML 1.0 Strict doctype.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/modify-doctype/
*/
@GaryJones
GaryJones / functions.php
Last active April 19, 2021 23:12
Apply superfish enhancement to usual Genesis menus with different settings.
<?php
// For Genesis 2.0.0 and later:
add_filter( 'genesis_superfish_args_url', 'prefix_superfish_args_url' );
/**
* Filter in URL for custom Superfish arguments.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/change-superfish-arguments
@GaryJones
GaryJones / functions.php
Created January 31, 2012 01:23
Change Genesis default trackback format
<?php
add_filter( 'genesis_ping_list_args', 'child_ping_list_args' );
/**
* Take the existing arguments, and amend one that specifies a custom callback.
*
* Tap into the list of arguments applied at genesis/lib/functions/comments.php.
*
* @see child_list_pings() Callback for displaying trackbacks.
*