git init
or
| <?php | |
| function smcm_pull_faculty_from_directory() { | |
| //Get the slug of the calling site... array element [3] | |
| $site_slug = explode ("/", get_site_url()); | |
| // blog id of the directory | |
| $blog_id = 7; |
| <?php | |
| // Display variations dropdowns on shop page for variable products | |
| add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
| function woo_display_variation_dropdown_on_shop_page() { | |
| global $product; | |
| if( $product->is_type( 'variable' )) { | |
| function hm_add_term_meta_table() { | |
| global $wpdb; | |
| if ( ! current_theme_supports( 'term-meta' ) ) | |
| return false; | |
| hm_create_term_meta_table(); | |
| $wpdb->tables[] = 'termmeta'; | |
| $wpdb->termmeta = $wpdb->prefix . 'termmeta'; | |
| } | |
| add_action( 'init', 'hm_add_term_meta_table' ); | |
| /** |
| <?php | |
| // Get all blog ids in network except main site (id 1) | |
| $blogs = $wpdb->get_results(" | |
| SELECT blog_id | |
| FROM {$wpdb->blogs} | |
| WHERE site_id = '{$wpdb->siteid}' | |
| AND spam = '0' | |
| AND deleted = '0' | |
| AND archived = '0' |
| <?php | |
| /** | |
| * Plugin Name: WooCommerce Installments Example | |
| * Plugin URI: http://claudiosmweb.com/ | |
| * Description: Added the price with 3 installments without interest. | |
| * Author: claudiosanches | |
| * Author URI: http://www.claudiosmweb.com/ | |
| * Version: 1.0 | |
| * License: GPLv2 or later | |
| */ |