List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
| <?php | |
| /** | |
| * Create a metabox with multiple fields. | |
| * Replace `_namespace` with some namespace for your project to avoid conflicts with other items | |
| */ | |
| // | |
| // Create Metabox | |
| // |
| function filter_admin_menues() { | |
| // If administrator then do nothing | |
| if (current_user_can('activate_plugins')) return; | |
| // Remove main menus | |
| $main_menus_to_stay = array( | |
| // Dashboard | |
| 'index.php', |
| <?php | |
| /* | |
| * Plugin Name: Paulund WP List Table Example | |
| * Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area | |
| * Plugin URI: http://www.paulund.co.uk | |
| * Author: Paul Underwood | |
| * Author URI: http://www.paulund.co.uk | |
| * Version: 1.0 | |
| * License: GPL2 | |
| */ |
| 1) Create a branch with the tag | |
| git branch {tagname}-branch {tagname} | |
| git checkout {tagname}-branch | |
| 2) Include the fix manually if it's just a change .... | |
| git add . | |
| git ci -m "Fix included" | |
| or cherry-pick the commit, whatever is easier | |
| git cherry-pick {num_commit} | |