screenshots | WordPress.org

Hi, I showed some examples to ChatGPT it gave me the following code? Seems to be working? I wanted to share it both to get your approval and to reach those who need it.

add_filter(
	'web_app_manifest',
	function( $manifest ) {
		if ( ! isset( $manifest['screenshots'] ) ) {
			$manifest['screenshots'] = array();
		}
		$manifest['screenshots'] = array_merge(
			$manifest['screenshots'],
			array(
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-1.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				),
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-2.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				),
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-3.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				),
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-4.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				),
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-5.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				),
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-6.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				),
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-7.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				),
				array(
					"src"         => "https://xxx.com/wp-content/uploads/ekrangoruntuleri-8.png",
					"type"        => "image/png",
					"sizes"       => "750x1334",
					"form_factor" => "narrow"
				)
			)
		);
		return $manifest;
	}
);

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer