<?php
/*
Theme Name: Usina #99 - Sitio principal
Theme URL: http://hostinger-tutorials.com
Description: Sitio principal
Author: John Doe
Author URL: http://hostinger-tutorials.com
Template: u99
Version: 1.0.0
Text Domain: u99-child
*/

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles', 12 );

function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}

function get_imagen_fondo(){
    $subsites = get_sites();
    //print_r($subsites);
    $siteID = array_rand($subsites);
    $site = $subsites[$siteID];
    /*print_r($site);
    echo "aaaaa".$site->blog_id;
    die();*/
    switch_to_blog( $site->blog_id );
    $img = get_option( 'u99_rs_fondo' , true );
    restore_current_blog();
	return $img;
}
