Ejemplo n.º 1
0
/**
 * Registering sidebars by yaml
 */
function gp_register_sidebars()
{
    $sidebars = gp_load_yaml('/etc/sidebars.yaml');
    foreach ($sidebars as $sidebar) {
        register_sidebar($sidebar);
    }
}
Ejemplo n.º 2
0
function ph_theme_options()
{
    $saved_settings = get_option(ot_settings_id(), array());
    $settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => 'Help', 'content' => '')), 'sidebar' => ''), 'sections' => gp_load_yaml('/etc/sections.yaml'), 'settings' => gp_load_yaml('/etc/settings.yaml'));
    //end of $settings
    $settings = apply_filters(ot_settings_id() . '_args', $settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $settings) {
        update_option(ot_settings_id(), $settings);
    }
}
Ejemplo n.º 3
0
<?php

/**
 * Registering nav menus by yaml
 */
register_nav_menus(gp_load_yaml('/etc/nav-menus.yaml'));
Ejemplo n.º 4
0
 /**
  * Private constructor (nobody else can instance it)
  *
  */
 private function __construct()
 {
     $this->config = gp_load_yaml('/etc/config.yaml');
 }
Ejemplo n.º 5
0
<?php

$img_sizes = gp_load_yaml('/etc/image-sizes.yaml');
foreach ($img_sizes as $name => $data) {
    add_image_size($name, $data['width'], $data['height'], $data['crop']);
}