Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* This small PHP class provides you some functions to build the frontend CSS from the WP Customizer Options.
*
* == Fight the PHP Noodles in your CSS! ==
* As the resulting dynamic CSS of themes can look ugly,
* we thought about a sweet and short solution for this.
*
* == Better Readabilty ==
<?php
// Some Examples
// The following examples show how you can use the CC_Customizer class to generate the CSS for the frontend.
// First create a new Customizer_Frontend_CSS object.
$cc_customizer = new Customizer_Frontend_CSS();
// Now we can start defining the styles we need for the frontend,
// based on the saved option values in the WP Customizer.
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';
/**
@svenl77
svenl77 / functions.php
Last active October 20, 2016 13:45 — forked from bamadesigner/functions.php
WordPress Multsite - wp_get_post_featured_image_src() - Get wp_get_attachment_image_src() data for any post's featured image on your network
<?php
/**
* This function allows you to retrieve the wp_get_attachment_image_src()
* data for any post's featured image on your network. If you are running
* a multisite network, you can supply another blog's ID to retrieve a post's
* featured image data from another site on your WordPress multisite network.
*
* Does not take care of icon business (at this time).
*