diff options
Diffstat (limited to 'plugins/jetpack/modules/sitemaps/sitemap-buffer.php')
-rw-r--r-- | plugins/jetpack/modules/sitemaps/sitemap-buffer.php | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/plugins/jetpack/modules/sitemaps/sitemap-buffer.php b/plugins/jetpack/modules/sitemaps/sitemap-buffer.php index 98751664..3596486d 100644 --- a/plugins/jetpack/modules/sitemaps/sitemap-buffer.php +++ b/plugins/jetpack/modules/sitemaps/sitemap-buffer.php @@ -6,7 +6,7 @@ * maintaining the constraints. * * @since 4.8.0 - * @package Jetpack + * @package automattic/jetpack */ /** @@ -113,8 +113,8 @@ abstract class Jetpack_Sitemap_Buffer { $this->finder = new Jetpack_Sitemap_Finder(); $this->doc = new DOMDocument( '1.0', 'UTF-8' ); - $this->item_capacity = max( 1, intval( $item_limit ) ); - $this->byte_capacity = max( 1, intval( $byte_limit ) ) - strlen( $this->doc->saveXML() ); + $this->item_capacity = max( 1, (int) $item_limit ); + $this->byte_capacity = max( 1, (int) $byte_limit ) - strlen( $this->doc->saveXML() ); } /** @@ -132,26 +132,6 @@ abstract class Jetpack_Sitemap_Buffer { * we set is_full_flag to true. If $item is null, * don't do anything and report success. * - * @since 4.8.0 - * @deprecated 5.3.0 Use Jetpack_Sitemap_Buffer::append. - * - * @param string $item The item to be added. - */ - public function try_to_add_item( $item ) { - _deprecated_function( - 'Jetpack_Sitemap_Buffer::try_to_add_item', - '5.3.0', - 'Jetpack_Sitemap_Buffer::append' - ); - $this->append( $item ); - } - - /** - * Append an item to the buffer, if there is room for it, - * and set is_empty_flag to false. If there is no room, - * we set is_full_flag to true. If $item is null, - * don't do anything and report success. - * * @since 5.3.0 * * @param array $array The item to be added. |