芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/fashionmodelquicktrack.com/wp-content/plugins/fixed-toc/frontend/data/class-data.php
.+?\<\/(' . $h . ')\>/is';*/ $preg = '/<(' . $h . ')[^>]*?>.*?<\/(' . $h . ')>/is'; $this->matches_num = preg_match_all( $preg, $content, $this->matches ); } } /** * Have matches include headings or not * * @since 3.0.0 * @access public * * @return bool. */ public function has_matches() { return (bool) $this->matches_num; } /** * Create a data * * @since 3.0.0 * @access public * * @param array $objs_datum An array of Fixedtoc_Datum instances * * @return void. */ public function create_data( $objs_datum ) { foreach ( $this->matches[0] as $match ) { $this->match = $match; foreach ( $objs_datum as $obj_datum ) { $this->add_datum( $obj_datum ); // delete the datum and continue current loop if the title is empty. if ( isset( $this->data[ $this->index ]['origin_title'] ) && empty( $this->data[ $this->index ]['origin_title'] ) ) { unset( $this->data[ $this->index ] ); continue 2; } } $this->index ++; } } /** * Add a datum. * * @since 3.0.0 * @access private * * @param Fixedtoc_Datum $datum an instance of Fixedtoc_Datum. * * @return void. */ private function add_datum( Fixedtoc_Datum $datum ) { $datum->set_name(); $datum->set_value( $this ); $key = $datum->get_name(); $value = $datum->get_value(); $this->datum[ $key ] = $value; $this->data[ $this->index ][ $key ] = $value; } /** * Get the current matched string. * * @since 3.0.0 * @access public * * @return string. */ public function get_match() { return $this->match; } /** * Get the current datum index. * * @since 3.0.0 * @access public * * @return int. */ public function get_index() { return $this->index; } /** * Get the current datum. * * @since 3.0.0 * @access public * * @return array. */ public function get_datum() { return $this->datum; } /** * Get the data. * * @since 3.0.0 * @access public * * @return array. */ public function get_data() { return $this->data; } }