if (isset($box['fields'])) {
                    foreach ($box['fields'] as $id_field => $field) {
                        if (isset($field['std'])) {
                            $default_option['all'][$id_box][$id_field] = $field['std'];
                        }
                    }
                }
            }
        }
        add_option($this->prefix . 'site_site', $default_option);
    }
}
/**
 * Main instance of plugin
 *
 * @return \YIT_Layout_Options
 * @since  1.0
 * @author Emanuela Castorina <*****@*****.**>
 */
function YIT_Layout_Options()
{
    return YIT_Layout_Options::instance();
}
/**
 * Instantiate Sidebar class
 *
 * @since  1.0
 * @author Emanuela Castorina <*****@*****.**>
 */
YIT_Layout_Options();
Beispiel #2
0
 /**
  * Activate
  *
  * Run when the plugin is activated, add a custom options in database
  *
  * @return void
  * @since    1.0
  * @author   Emanuela Castorina <*****@*****.**>
  */
 public function activate()
 {
     YIT_Layout_Options()->add_default_options();
 }