[wp-trac] [WordPress Trac] #51016: Video and image schemas support
WordPress Trac
noreply at wordpress.org
Sat Aug 15 09:46:51 UTC 2020
#51016: Video and image schemas support
-------------------------------+-----------------------------
Reporter: constructivemedia | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Sitemaps | Version: 5.5
Severity: minor | Keywords:
Focuses: |
-------------------------------+-----------------------------
Proposal to allow for image and video schema types within class-wp-
sitemaps-renderer.php.
Allowing for more schemas to be added to urlset (
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1")
When $url_list contains a image/video child node:
{{{#!php
<?php
$parent = $url->addChild( $name, '', 'http://www.google.com/schemas
/sitemap-image/1.1' );
foreach ( $value as $child_name => $child_value ) {
$parent->addChild( $child_name, esc_xml( $child_value ) );
}
}}}
Proposed $sitemap_entry structure:
{{{#!php
<?php
$sitemap_entry = array(
'loc' => home_url('/') . $listing->slug,
'image' => array(
'loc' => 'http://example.com/image.jpg'
),
'video' => array(
'thumbnail_loc' => 'http://www.example.com/thumbs/123.jpg'
)
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51016>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list