function wptouch_page_templates_find_all_in_dir($dir) { $templates = array(); require_once WPTOUCH_DIR . '/core/file-operations.php'; $files = wptouch_get_all_recursive_files($dir, '.php'); foreach ($files as $file) { $content = wptouch_load_file($dir . '/' . $file); if (preg_match('#Mobile Template: (.*)#', $content, $matches)) { $template = new stdClass(); $template->name = $matches[1]; $template_parts = explode(DIRECTORY_SEPARATOR, $file); $template->location = $template_parts[count($template_parts) - 1]; $templates[$file] = $template; } } return $templates; }
function load_file($file_name) { require_once WPTOUCH_DIR . '/core/file-operations.php'; return wptouch_load_file($file_name); }
function foundation_webapp_inline_style($style_data) { require_once WPTOUCH_DIR . '/core/file-operations.php'; return $style_data . wptouch_load_file(dirname(__FILE__) . '/add2home.css'); }
function foundation_menu_inline_style($style_data) { require_once WPTOUCH_DIR . '/core/file-operations.php'; $dir = foundation_get_base_module_dir(); return $style_data . wptouch_load_file($dir . '/menu/menu.css'); }