No longer kept up to date.
Please see Sridhar's fork.
( function( api ) { | |
'use strict'; | |
// Add callback for when the header_textcolor setting exists. | |
api( 'header_textcolor', function( setting ) { | |
var isHeaderTextDisplayed, linkSettingValueToControlActiveState; | |
/** | |
* Determine whether the site title and tagline should be displayed. | |
* |
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
{ | |
"disallowKeywordsOnNewLine": ["else"], | |
"disallowMixedSpacesAndTabs": "smart", | |
"disallowNewlineBeforeBlockStatements": true, | |
"disallowSpaceAfterObjectKeys": true, | |
"disallowSpacesInAnonymousFunctionExpression": { | |
"beforeOpeningRoundBrace": true | |
}, | |
"disallowTrailingWhitespace": true, | |
"requireBlocksOnNewline": true, |
<?xml version="1.0"?> | |
<ruleset name="phpmd.xml" | |
xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
<description>PHPMD Ruleset for a WordPress Theme</description> | |
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" /> | |
<rule ref="rulesets/cleancode.xml/ElseExpression" /> | |
<rule ref="rulesets/cleancode.xml/StaticAccess" /> |
function Selector_Cache() { | |
var elementCache = {}; | |
var get_from_cache = function( selector, $ctxt, reset ) { | |
if ( 'boolean' === typeof $ctxt ) { | |
reset = $ctxt; | |
$ctxt = false; | |
} | |
var cacheKey = $ctxt ? $ctxt.selector + ' ' + selector : selector; |
No longer kept up to date.
Please see Sridhar's fork.
<?php | |
add_filter( 'genesis_attr_content', 'yoast_schema_empty', 20 ); | |
add_filter( 'genesis_attr_entry', 'yoast_schema_event', 20 ); | |
add_filter( 'genesis_attr_entry-title', 'yoast_itemprop_name', 20 ); | |
add_filter( 'genesis_attr_entry-content', 'yoast_itemprop_description', 20 ); | |
add_filter( 'genesis_post_title_output', 'yoast_title_link_schema', 20 ); | |
/** | |
* We'll use the post info output to add more meta data about the event. |
The CSSTidy package for SublimeText 2 works great for toggling between different CSS formats, but none of the default options output CSS consistent with the Drupal CSS coding standards with selectors, braces and properties indented and formatted like so:
selector {
property: value;
}
CSSTidy allows you to add your own templates, but the documentation is sparse, then there's the matter of the Sublime Text 2 integration. If I hadn't been deeply procrastinating, I would not have had th patience to figure it all out. Here's what to do:
<?php # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: Plugin Class Demo | |
* Description: How I am using the base class in plugins. | |
* Plugin URI: | |
* Version: 2012.09.29 | |
* Author: Fuxia Scholz | |
* License: GPL | |
* Text Domain: plugin_unique_name | |
* Domain Path: /languages |