sudo cp /private/etc/php.ini.default /private/etc/php.ini;
sudo php /usr/lib/php/install-pear-nozlib.phar;
pear config-set php_ini /private/etc/php.ini;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Move the wp-admin bar to the bottom */ | |
#wpadminbar { | |
bottom: 0; | |
position: fixed; | |
top: initial; | |
} | |
body.logged-in.admin-bar { | |
margin-top: -32px; | |
} | |
@media(max-width:782px) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes markup for built-in scroll to top link | |
* | |
* Renders scroll to top button for wp_footer. | |
* | |
*/ | |
add_action( 'wp_head', 'dgs_remove_go_to_top' ); | |
add_action( 'wp_footer', 'dgs_remove_go_to_top' ); | |
function dgs_remove_go_to_top(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'fl_builder_render_module_content', function( $content, $module ) { | |
if ( 'html' === $module->settings->type && FLBuilderModel::is_builder_active() ) { | |
$content = 'HTML rendering disabled in the builder.'; | |
} | |
return $content; | |
}, 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The following code is designed to be added to your child theme functions.php | |
// It adds a new 'Animation Redux' setting under the advanced tab for any module. | |
add_filter( 'fl_builder_module_custom_class', 'fl_builder_module_custom_class_filter', 10, 2 ); | |
function fl_builder_module_custom_class_filter( $class, $module ) { | |
$animate = ''; | |
if ( ! empty( $module->settings->animation_redux ) ) { | |
$animate = ' animated ' . $module->settings->animation_redux; | |
wp_enqueue_style( 'animate-css', '//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'woo_add_to_cart_fixup' ); | |
function woo_add_to_cart_fixup() { | |
// Duplicate WooCommerce variation attributes from $_GET to $_POST because WC_Form_Handler->add_to_cart_handler_variable only looks in $_POST | |
if ( isset( $_GET, $_GET['add-to-cart'] ) ) { | |
foreach ( $_GET as $key => $value ) { | |
if ( false !== strpos( $key, 'attribute' ) ) { | |
$_POST[ $key ] = $value; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Original article explanation is here:
http://www.kirstencassidy.com/cleaning-up-formatting-shortcodes/
\[/vc(.*?)\]
\[vc(.*?)\]
\[custom_font(.*?)\]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Woocommerce Custom Variation Output | |
* | |
* The following function allow for the theme to display product variations in a grid format. | |
* This code could be moved to a plugin but is in the theme function file as it used the | |
* themes grid system. | |
* | |
* @package WooGrid | |
* @since WooGrid 1.2 |