You appear to be a bot. Output may be restricted
Description
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.
Usage
$bool = Jetpack_Sitemap_Buffer::append( $array );
Parameters
- $array
- ( array ) required – The item to be added.
Returns
bool True if the append succeeded, False if not.
Source
File name: jetpack/modules/sitemaps/sitemap-buffer.php
Lines:
1 to 21 of 21
public function append( $array ) { if ( is_null( $array ) ) { return true; } if ( $this->is_full_flag ) { return false; } if ( 0 >= $this->item_capacity || 0 >= $this->byte_capacity ) { $this->is_full_flag = true; return false; } else { $this->item_capacity -= 1; $added_element = $this->array_to_xml_string( $array, $this->get_root_element(), $this->doc ); $this->byte_capacity -= strlen( $this->doc->saveXML( $added_element ) ); return true; } }