'WordPress', 'version' => get_bloginfo( 'version' ), 'author' => array( 'uri' => 'https://wordpress.org/', 'name' => 'WordPress', ), /* translators: The WordPress description, used when a core file is opened in the editor. */ 'description' => esc_html__( 'WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time.', 'string-locator' ), ); } elseif ( 'theme' === $_GET['file-type'] ) { $themedata = wp_get_theme( $_GET['file-reference'] ); $details = array( 'name' => $themedata->get( 'Name' ), 'version' => $themedata->get( 'Version' ), 'author' => array( 'uri' => $themedata->get( 'AuthorURI' ), 'name' => $themedata->get( 'Author' ), ), 'description' => $themedata->get( 'Description' ), 'parent' => $themedata->get( 'parent' ), ); } elseif ( 'sql' === $_GET['file-type'] ) { $details = array( 'name' => 'Name', 'version' => 'Version', 'author' => array( 'uri' => 'author URI', 'name' => 'author name', ), 'description' => 'description', 'parent' => 'parent', ); } else { $plugins = get_plugins(); foreach ( $plugins as $pluginname => $plugindata ) { $pluginref = explode( '/', $pluginname ); if ( $pluginref[0] === $_GET['file-reference'] ) { $details = array( 'name' => $plugindata['Name'], 'version' => $plugindata['Version'], 'author' => array( 'uri' => $plugindata['AuthorURI'], 'name' => $plugindata['Author'], ), 'description' => $plugindata['Description'], ); } } } if ( 'sql' !== $_GET['file-type'] ) { $readfile = fopen( $file, 'r' ); if ( $readfile ) { while ( ( $readline = fgets( $readfile ) ) !== false ) { // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition $editor_content .= $readline; } } } ?>