PhpStorm now bundles WordPress coding style natively, starting from version 8.
- Go to
Project Settings
>Code Style
>PHP
. - Select
Set From...
(top right of window) >Predefined Style
>WordPress
.
No longer need to muck with this import! :)
<?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 | |
* |
<?php | |
/** | |
* Simple excel writer class with no external dependencies, drop it in and have fun | |
* @author Matt Nowack | |
* @link https://gist.github.com/ihumanable/929039/edit | |
* @license Unlicensed | |
* @version 1.0 | |
*/ | |
class Excel { |
<?php | |
/** | |
* Define type of server | |
* | |
* Depending on the type other stuff can be configured | |
* Note: Define them all, don't skip one if other is already defined | |
*/ | |
define( 'DB_CREDENTIALS_PATH', dirname( ABSPATH ) ); // cache it for multiple use |
// 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 | |
*/ |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
/** | |
* Returns all unique meta key from user meta database | |
* | |
* @param no parameter right now | |
* @retun std Class | |
* @todo do what you do for each meta key. | |
*/ | |
function get_user_meta_key() { |
/** | |
* Subscribe User to MailChimp | |
*/ | |
function wooms_mailchimp_subscribe_user($order_id,$posted){ | |
if(!empty($_POST['wooms_susbscribe']) && $_POST['wooms_susbscribe'] == '1'){ | |
try{ | |
$email = $posted['billing_email']; | |
$merge_vars = array('FNAME' => $posted['billing_first_name'],'LNAME' => $posted['billing_last_name']); | |
$api = new MCAPI(mailchimp_api_key); |
# VirtualBox home directory. | |
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" setproperty machinefolder "C:\VMs" | |
# Vagrant home directory for downloadad boxes. | |
REG ADD HKCU\Environment /v VAGRANT_HOME /t REG_SZ /d "C:\VMs\vagrant.d" |
transmission-cli
for the torrent client, and nginx
to serve files.seedbox-setup.sh
present in the current directory.