Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
| <midi app="1.7.2.4139"> | |
| <control channel="1" event_type="Note On" control="0"> | |
| <userio event="click"> | |
| <auto_loop_specific_length deck_set="Default" deck_id="0" slot_id="5"> | |
| <translation action_on="any" behaviour="explicit"/> | |
| </auto_loop_specific_length> | |
| </userio> | |
| <userio event="output"> |
| # based on http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files | |
| # but modified for the MAMP path and to include default root/root as username and password | |
| for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I | gzip > "$I.sql.gz"; done |
| <?php | |
| $query1 = new WP_Query($arg1); | |
| $query2 = new WP_Query($arg2); | |
| $query = new WP_Query(); | |
| $query->posts = array_merge( $query1->posts, $query2->posts ); | |
| // we also need to set post count correctly so as to enable the looping |
| // Move Yoast to bottom | |
| function yoasttobottom() { | |
| return 'low'; | |
| } | |
| add_filter( 'wpseo_metabox_prio', 'yoasttobottom'); |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Bootstrap Masonry Template</title> | |
| <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
| <link rel="stylesheet" href="style.css"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700"> |
| /** | |
| * Filter out hard-coded width, height attributes on all images in WordPress. | |
| * https://gist.github.com/4557917 | |
| * | |
| * This version applies the function as a filter to the_content rather than send_to_editor. | |
| * Changes made by filtering send_to_editor will be lost if you update the image or associated post | |
| * and you will slowly lose your grip on sanity if you don't know to keep an eye out for it. | |
| * the_content applies to the content of a post after it is retrieved from the database and is "theme-safe". | |
| * (i.e., Your changes will not be stored permanently or impact the HTML output in other themes.) | |
| * |
| # Variables to replace in urls below | |
| username = 'your_username_here_without_at_symbol' | |
| key = 'public_key_from_dev' | |
| application_token = 'very_long_application_token' | |
| # This needs to be parsed as JSON for all of the 'id' fields. These are the board_hashes | |
| url_for_board_hashes = "https://api.trello.com/1/members/#{username}/boards?&key=#{key}&token=#{application_token}" | |
| # | |
| # Loop over each board_hash and call the following url |
| /* actions fired when listing/adding/editing posts or pages */ | |
| /* admin_head-(hookname) */ | |
| add_action( 'admin_head-post.php', 'admin_head_post_editing' ); | |
| add_action( 'admin_head-post-new.php', 'admin_head_post_new' ); | |
| add_action( 'admin_head-edit.php', 'admin_head_post_listing' ); | |
| function admin_head_post_editing() { | |
| echo 'you are editing a post'; | |
| } |