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 | |
| /* | |
| Plugin Name: WordCamp Philly 2011 Admin | |
| Plugin URI: http://localhost/whitelabel | |
| Description: Some swanky stuff to make your admin look GOOD | |
| Author: Andrew Norcross | |
| Version: 0.1 | |
| Requires at least: 3.0 | |
| Author URI: http://andrewnorcross.com |
If someone forks a gist and you'd like to merge their changes. Do this:
clone your repo, I use the name of the gist
git clone git://gist.github.com/1163142.git gist-1163142
add a remote for the forked gist, I'm using the name of my fellow developer
git remote add aaron git://gist.github.com/1164196.git
| <?php | |
| x_add_metadata_field('x_fieldCustomList2', array( 'post' ), array( | |
| 'label' => 'Post Action Items (With Links!)' | |
| , 'display_callback' => 'fieldCustomList2_display' | |
| , 'sanitize_callback' => 'fieldCustomList2_sanitize' | |
| )); | |
| function fieldCustomList2_display( $field_slug, $field, $object_type, $object_id, $value ) { | |
| $value = (array) $value; | |
| $field_class = sprintf( 'field-%s', $field_slug ); |