Example #1
0
 public static function have_widgets()
 {
     if (file_exists(DIR . DIRECTORY_SEPARATOR . THEMES_LOC . DIRECTORY_SEPARATOR . \query\main::get_option('theme') . DIRECTORY_SEPARATOR . 'functions.php')) {
         @(require_once DIR . DIRECTORY_SEPARATOR . THEMES_LOC . DIRECTORY_SEPARATOR . \query\main::get_option('theme') . DIRECTORY_SEPARATOR . 'functions.php');
         if (function_exists('register_widgets')) {
             return register_widgets();
         }
     }
     return false;
 }
Example #2
0
function show_widgets($id)
{
    global $LANG;
    if (function_exists('register_widgets')) {
        if (in_array($id, array_keys(register_widgets()))) {
            $data = \query\main::show_widgets($id);
            foreach ($data as $k => $v) {
                list($title, $limit, $type, $order, $content, $mobile_view) = array($v['title'], $v['limit'], $v['type'], $v['orderby'], $v['content'], $v['mobile_view']);
                @(include $v['file']);
            }
        }
    }
    return false;
}
Example #3
0
 /**
  * ready() includes user's theme.php if it exists, calls the framework_init action, includes all pluggable functions and registers widgets
  *
  * @since 0.2.3
  */
 function ready()
 {
     if (file_exists(THEMEMEDIA . '/custom-functions.php')) {
         include_once THEMEMEDIA . '/custom-functions.php';
     }
     // include custom-functions.php if that file exist
     require_once THEMECORE . '/pluggable.php';
     // load pluggable functions
     do_action('framework_init');
     // Available action: framework_init
     register_widgets();
 }