Esempio n. 1
0
/**
 * setup pods 
 */
function sdm_pods_init_action()
{
    if (!function_exists('pods')) {
        return;
    }
    $settingsPod = pods('kc_settings');
    if ($settingsPod) {
        KC::$copyright = $settingsPod->field('copyright');
        KC::$author_slug = $settingsPod->field('authors_slug');
        KC::$default_header_image = PodUtils::getImgUrl($settingsPod, 'default_header_image', 'full');
    }
    // SCHEMA
    $schemaPod = pods('schema');
    if ($schemaPod) {
        KC::$schemaOrg = new SchemaOrg($schemaPod);
    }
}
Esempio n. 2
0
/**
 * setup pods 
 */
function init_action()
{
    if (!function_exists('pods')) {
        return;
    }
    $settingsPod = pods('kc_settings');
    if ($settingsPod) {
        KC::$copyright = $settingsPod->field('copyright');
        KC::$author_slug = $settingsPod->field('authors_slug');
        KC::$default_header_image = PodUtils::getImgUrl($settingsPod, 'default_header_image', 'full');
    } else {
        KC::debug('no kc_settings pod');
    }
    $schemaPod = pods('schema');
    if ($schemaPod) {
        $data = new SchemaData();
        $data->url = get_site_url();
        $data->type = $schemaPod->field('type');
        // get_bloginfo();
        $data->name = $schemaPod->field('name');
        // get_bloginfo();
        $data->logo = PodUtils::getImgUrl($schemaPod, 'logo', 'full');
        //get_site_url() . "/wp-content/themes/kauaicreative.com/site-assets/logo.png";
        $data->streetAddress = $schemaPod->field('street_address');
        $data->addressLocality = $schemaPod->field('address_locality');
        $data->addressRegion = $schemaPod->field('address_region');
        $data->postalCode = $schemaPod->field('postal_code');
        $data->contactType = $schemaPod->field('contact_type');
        // customer service
        $data->telephone = $schemaPod->field('telephone');
        $data->email = $schemaPod->field('email');
        $data->hours = $schemaPod->field('hours');
        $schemaOrg = new SchemaOrg($data);
        KC::$schemaOrg = $schemaOrg;
    } else {
        KC::debug('no schema pod');
    }
    //if (!KC::$default_header_image) KC::$default_header_image	 = get_site_url() . "/wp-content/themes/kauaicreative.com/site-assets/default-bg.jpg";
    //KC::debug($data); // $schemaOrg->schemaData
}