Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
<?php | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity and ajax. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
global $product; |
ob_start(); | |
$commenter = wp_get_current_commenter(); | |
$req = get_option( 'require_name_email' ); | |
$aria_req = ( $req ? " aria-required='true'" : '' ); | |
$html_req = ( $req ? " required='required'" : '' ); | |
$span_req = ( $req ? ' <span class="required">*</span>' : '' ); | |
comment_form( array( | |
'title_reply' => __( 'Leave your thoughts', 'issimple' ), | |
'comment_notes_after' => '', |
function add_opengraph_doctype($output) { | |
return $output . ' | |
xmlns="https://www.w3.org/1999/xhtml" | |
xmlns:og="https://ogp.me/ns#" | |
xmlns:fb="http://www.facebook.com/2008/fbml"'; | |
} | |
add_filter('language_attributes', 'add_opengraph_doctype'); |
//Add Open Graph Meta Info from the actual article data, or customize as necessary | |
function facebook_open_graph() { | |
global $post; | |
if ( !is_singular()) //if it is not a post or a page | |
return; | |
if($excerpt = $post->post_excerpt) | |
{ | |
$excerpt = strip_tags($post->post_excerpt); | |
$excerpt = str_replace("", "'", $excerpt); | |
} |
#!/bin/sh | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.tar.gz | |
tar xfvz mysql-5.6* | |
echo "stopping mamp" | |
sudo /Applications/MAMP/bin/stop.sh | |
sudo killall httpd mysqld | |
echo "creating backup" |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:
sudo lsof | grep LISTEN
If you do happen to have any process with something like this *:http (LISTEN)
, you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)
ps <pid of that process>
If you don't see MAMP, you are in good hands, I have just the thing for you:
This gist assumes:
/** | |
* hex2rgb - function for converting hex colors to rgb(a) | |
* | |
* Shout out to http://hex2rgba.devoth.com/ | |
* | |
* @hex (String) - The hex value. Can be prefixed with "#" or not. Can be | |
* long format (6 chars) or short format (3 chars) | |
* @opacity (number between 0 and 1) - This is an optional float value that | |
* will be used for the opacity | |
* |