tag to make it * ignored by this class. * * @var string|null */ private $ignore_attribute; /** * HTML attribute value to be added to closing tag is encountered. return array( '', $joint_buffer ); } // No script tags detected, return both chunks unaltered. return array( $buffer_start, $buffer_end ); } // Makes sure all whole tags are in $buffer_start. list( $buffer_start, $buffer_end ) = $this->recalculate_buffer_split( $joint_buffer, $script_tags ); foreach ( $script_tags as $script_tag ) { $this->buffered_script_tags[] = $script_tag[0]; $buffer_start = str_replace( $script_tag[0], '', $buffer_start ); } // Detect a lingering opened script. $this->is_opened_script = $this->is_opened_script( $buffer_start . $buffer_end ); return array( $buffer_start, $buffer_end ); } /** * Matches tag to appear in the buffer. * * Open script tags are always kept in the buffer until their closing * tags eventually arrive as well. That means it's only possible to * encounter an unpaired opening --> comment? * @todo What happens when script tags are unclosed? */ return $opening_tags_count > $closing_tags_count; } public static function get_slug() { return 'render_blocking_js'; } }