#Mac OS X
<?php | |
/** | |
* Database connection test script for WordPress | |
* | |
* Parses the wp-config.php file for DB connection information and tests | |
* a mysql connection to the DB server and selection of the database. | |
* Errors will be reported. Attempts will be made to repair table errors. | |
* | |
* Place this file in the same directory as wp-config.php | |
* |
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
<snippet> | |
<content><![CDATA[ | |
register_post_type('${1:slug}', array( | |
${2:'labels' => array( | |
${3:'name' => _x( '${4:Plural Name}', '${5:translation context}', '${6:translation domain}' ),} | |
${8:'singular_name' => _x( '${9:Singular Name}', '${10:translation context}', '${6:translation domain}' ),} | |
${11:'add_new' => _x( '${12:Add new}', '$9', '${6:translation domain}' ),} | |
${13:'add_new_item' => __( '$12 $9', '${6:translation domain}' ),} | |
${14:'edit_item' => __( 'Edit ${15:$9}', '${6:translation domain}' ),} | |
${16:'new_item' => __( 'New ${17:$9}', '${6:translation domain}' ),} |
<?php | |
/** | |
* This is a version of | |
* http://www.viper007bond.com/2011/09/20/code-snippet-add-a-link-to-latest-post-to-wordpress-nav-menu/ | |
* that supports multiple placeholders. In this case, the placeholder fetches | |
* the latest post from a particular category. | |
*/ | |
// Front end only, don't hack on the settings page |
This is a list of the SublimeText 2 addons I use for my development environment.
Last week I attempted to use the CSS sprites feature of Compass for the second or third time. It's been a struggle each time, but the power and potential is there, so I keep coming back. This time was a bit different, though, because I finally decided to stop relying on the docs and dive into the code.
Before I go into the nitty-gritty, let's take a step back and talk about why I
When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.
Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008
…………………………
<?php | |
/** | |
* Get database connection string from a wp-config.php file. | |
* | |
* Usage: php db.php /var/www/wp-config.php | |
* | |
* Output: mysql -h DB_HOST -u DB_USER -pDB_PASSWORD DB_NAME | |
* | |
* @author Jonas Björk <jonas.bjork@me.com> | |
* @date 2012-12-04 |