function rcl_daily_addon_update() { $paths = array(RCL_TAKEPATH . 'add-on'); $rcl_addons = new Rcl_Addons(); foreach ($paths as $path) { if (file_exists($path)) { $addons = scandir($path, 1); $a = 0; foreach ((array) $addons as $namedir) { $addon_dir = $path . '/' . $namedir; $index_src = $addon_dir . '/index.php'; if (!file_exists($index_src)) { continue; } $info_src = $addon_dir . '/info.txt'; if (file_exists($info_src)) { $info = file($info_src); $addons_data[$namedir] = $rcl_addons->get_parse_addon_info($info); $addons_data[$namedir]['src'] = $index_src; $a++; flush(); } } } } //print_r($addons_data);exit; $need_update = array(); foreach ((array) $addons_data as $key => $addon) { $ver = $rcl_addons->get_actual_version($key, $addon['version']); if ($ver) { $addon['new-version'] = $ver; $need_update[$key] = $addon; } } update_option('rcl_addons_need_update', $need_update); }
function rcl_update_dinamic_files() { include_once 'functions/rcl_addons.php'; $rcl_addons = new Rcl_Addons(); $rcl_addons->get_update_scripts_file_rcl(); $rcl_addons->get_update_scripts_footer_rcl(); rcl_minify_style(); }