/** * Callback for displaying the Readme admin page. * * Checks if the file contents are readable, and echoes out HTML. * * @since 1.3.0 */ public function admin() { /** Assume we cannot find the file */ $readme_file = false; /** Get the file contents */ $readme_file = @file_get_contents(is_readable(ddw_gtbe_filter_url_child_readme())); /** If we can't find file contents, show a message */ if (!$readme_file || empty($readme_file)) { $readme_file = '<div class="error"><p>' . sprintf(__('The %s file was not found in the child theme, or it was empty.', 'genesis-toolbar-extras'), '<code>README.txt</code>') . '</p></div>'; } ?> <div id="genesis-readme-file" class="wrap"> <?php screen_icon('edit-pages'); ?> <h2><?php echo esc_html(get_admin_page_title()); ?> </h2> <pre><?php echo wpautop($readme_file); ?> </pre> </div> <?php }
$gtbe_edit_themedy_functions = network_admin_url('theme-editor.php?file=' . get_stylesheet_directory() . '/custom/custom_functions.php&theme=' . urlencode($gtbe_stylesheet_name)); } // end-if WP 3.4+ check /** Edit child theme's custom stylesheet (custom/custom.css) */ if (function_exists('themedy_get_option') && themedy_get_option('custom')) { $menu_items['themedy-editcustomcss'] = array('parent' => $themedysettings, 'title' => __('Edit custom.css', 'genesis-toolbar-extras'), 'href' => $gtbe_edit_themedy_style, 'meta' => array('target' => '', 'title' => _x('Edit current child theme custom stylesheet: custom.css', 'Translators: For the tooltip', 'genesis-toolbar-extras'))); } // end-if themedy options check /** Edit child theme's custom functions (custom/custom_functions.php) */ $menu_items['themedy-editcustomfunctions'] = array('parent' => $themedysettings, 'title' => __('Edit custom_functions.php', 'genesis-toolbar-extras'), 'href' => $gtbe_edit_themedy_functions, 'meta' => array('target' => '', 'title' => _x('Edit current child theme custom functions: custom_functions.php', 'Translators: For the tooltip', 'genesis-toolbar-extras'))); } // end-if Themedy theme editor check /** Display Readme.txt Child Theme Info */ if (class_exists('Genesis_Admin_Readme') && file_exists(ddw_gtbe_filter_url_child_readme())) { $menu_items['themedy-readme'] = array('parent' => $themedysettings, 'title' => __('README Info', 'genesis-toolbar-extras'), 'href' => admin_url('admin.php?page=genesis-readme'), 'meta' => array('target' => '', 'title' => __('README Info', 'genesis-toolbar-extras'))); } elseif (class_exists('DDW_GTBE_Admin_Readme') && file_exists(ddw_gtbe_filter_url_child_readme())) { $menu_items['themedy-readme'] = array('parent' => $themedysettings, 'title' => __('README Info', 'genesis-toolbar-extras'), 'href' => admin_url('admin.php?page=gtbe-readme'), 'meta' => array('target' => '', 'title' => __('README Info', 'genesis-toolbar-extras'))); } // end-if readme check /** Child Theme Support Forum */ $menu_items['themedy-support'] = array('parent' => $themedysettings, 'title' => __('Support Forum', 'genesis-toolbar-extras'), 'href' => $themedy_child_forum, 'meta' => array('title' => __('Support Forum for Child Theme', 'genesis-toolbar-extras'))); /** Check for custom background support */ if (current_theme_supports('custom-background')) { $menu_items['themedy-background'] = array('parent' => $themedysettings, 'title' => __('Custom Background', 'genesis-toolbar-extras'), 'href' => admin_url('themes.php?page=custom-background'), 'meta' => array('target' => '', 'title' => __('Custom Background', 'genesis-toolbar-extras'))); } // end-if custom background /** Check for custom header support */ if (current_theme_supports('custom-header')) { $menu_items['themedy-header'] = array('parent' => $themedysettings, 'title' => __('Custom Header', 'genesis-toolbar-extras'), 'href' => admin_url('themes.php?page=custom-header'), 'meta' => array('target' => '', 'title' => __('Custom Header', 'genesis-toolbar-extras'))); } // end-if custom header