foreach ($scanned_files as $plugin_name => $files) { foreach ($files as $file) { // skip if no php file if (!strpos($file, '.php')) { continue; } $child_path = get_stylesheet_directory() . '/' . $file; // Exclude functions.php if (file_exists($child_path) && basename($file) !== 'functions.php') { $theme_file = $child_path; } else { $theme_file = false; } if ($theme_file) { $parent_content = TPLC_Admin_Status::get_file_content(get_template_directory() . '/' . $file); $child_content = TPLC_Admin_Status::get_file_content($theme_file); $parent_version = TPLC_Admin_Status::get_file_version(get_template_directory() . '/' . $file); $child_version = TPLC_Admin_Status::get_file_version($theme_file); /* Broken table if used: @link https://core.trac.wordpress.org/ticket/25473 $args = array( 'title' => 'Differences', 'title_left' => 'Parent Theme', 'title_right' => 'Child Theme' ); */ // This is important and is missing in codex :( $args = array('show_split_view' => true); $diff_table = wp_text_diff($parent_content, $child_content, $args); $theme = wp_get_theme(); $template = wp_get_theme($theme->template); if ($diff_table) {