pop( $this->stack ); if ( null === $item ) { return false; } if ( 'context-node' === $item->bookmark_name ) { $this->stack[] = $item; return false; } $this->after_element_pop( $item ); return true; } /** * Pops nodes off of the stack of open elements until one with the given tag name has been popped. * * @since 6.4.0 * * @see WP_HTML_Open_Elements::pop * * @param string $tag_name Name of tag that needs to be popped off of the stack of open elements. * @return bool Whether a tag of the given name was found and popped off of the stack of open elements. */ public function pop_until( $tag_name ) { foreach ( $this->walk_up() as $item ) { if ( 'context-node' === $item->bookmark_name ) { return true; } $this->pop(); if ( '(internal: H1 through H6 - do not use)' === $tag_name && in_array( $item->node_name, array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ), true ) ) { return true; } if ( $tag_name === $item->node_name ) { return true; } } return false; } /** * Pushes a node onto the stack of open elements. * * @since 6.4.0 * * @see https://html.spec.whatwg.org/#stack-of-open-elements * * @param WP_HTML_Token $stack_item Item to add onto stack. */ public function push( $stack_item ) { $this->stack[] = $stack_item; $this->after_element_push( $stack_item ); } /** * Removes a specific node from the stack of open elements. * * @since 6.4.0 * * @param WP_HTML_Token $token The node to remove from the stack of open elements. * @return bool Whether the node was found and removed from the stack of open elements. */ public function remove_node( $token ) { if ( 'context-node' === $token->bookmark_name ) { return false; } foreach ( $this->walk_up() as $position_from_end => $item ) { if ( $token->bookmark_name !== $item->bookmark_name ) { continue; } $position_from_start = $this->count() - $position_from_end - 1; array_splice( $this->stack, $position_from_start, 1 ); $this->after_element_pop( $item ); return true; } return false; } /** * Steps through the stack of open elements, starting with the top element * (added first) and walking downwards to the one added last. * * This generator function is designed to be used inside a "foreach" loop. * * Example: * * $html = 'We are here'; * foreach ( $stack->walk_down() as $node ) { * echo "{$node->node_name} -> "; * } * > EM -> STRONG -> A -> * * To start with the most-recently added element and walk towards the top, * see WP_HTML_Open_Elements::walk_up(). * * @since 6.4.0 */ public function walk_down() { $count = count( $this->stack ); for ( $i = 0; $i < $count; $i++ ) { yield $this->stack[ $i ]; } } /** * Steps through the stack of open elements, starting with the bottom element * (added last) and walking upwards to the one added first. * * This generator function is designed to be used inside a "foreach" loop. * * Example: * * $html = 'We are here'; * foreach ( $stack->walk_up() as $node ) { * echo "{$node->node_name} -> "; * } * > A -> STRONG -> EM -> * * To start with the first added element and walk towards the bottom, * see WP_HTML_Open_Elements::walk_down(). * * @since 6.4.0 * @since 6.5.0 Accepts $above_this_node to start traversal above a given node, if it exists. * * @param ?WP_HTML_Token $above_this_node Start traversing above this node, if provided and if the node exists. */ public function walk_up( $above_this_node = null ) { $has_found_node = null === $above_this_node; for ( $i = count( $this->stack ) - 1; $i >= 0; $i-- ) { $node = $this->stack[ $i ]; if ( ! $has_found_node ) { $has_found_node = $node === $above_this_node; continue; } yield $node; } } /* * Internal helpers. */ /** * Updates internal flags after adding an element. * * Certain conditions (such as "has_p_in_button_scope") are maintained here as * flags that are only modified when adding and removing elements. This allows * the HTML Processor to quickly check for these conditions instead of iterating * over the open stack elements upon each new tag it encounters. These flags, * however, need to be maintained as items are added and removed from the stack. * * @since 6.4.0 * * @param WP_HTML_Token $item Element that was added to the stack of open elements. */ public function after_element_push( $item ) { /* * When adding support for new elements, expand this switch to trap * cases where the precalculated value needs to change. */ switch ( $item->node_name ) { case 'BUTTON': $this->has_p_in_button_scope = false; break; case 'P': $this->has_p_in_button_scope = true; break; } if ( null !== $this->push_handler ) { ( $this->push_handler )( $item ); } } /** * Updates internal flags after removing an element. * * Certain conditions (such as "has_p_in_button_scope") are maintained here as * flags that are only modified when adding and removing elements. This allows * the HTML Processor to quickly check for these conditions instead of iterating * over the open stack elements upon each new tag it encounters. These flags, * however, need to be maintained as items are added and removed from the stack. * * @since 6.4.0 * * @param WP_HTML_Token $item Element that was removed from the stack of open elements. */ public function after_element_pop( $item ) { /* * When adding support for new elements, expand this switch to trap * cases where the precalculated value needs to change. */ switch ( $item->node_name ) { case 'BUTTON': $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' ); break; case 'P': $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' ); break; } if ( null !== $this->pop_handler ) { ( $this->pop_handler )( $item ); } } /** * Wakeup magic method. * * @since 6.6.0 */ public function __wakeup() { throw new \LogicException( __CLASS__ . ' should never be unserialized' ); } } بایگانی‌ها تپسی - اکوفاین | مدیریتی ، مالی ، اقتصادی

برچسب: تپسی

تپسی آماده عرضه اولیه می شود / ورود اولین استارتاپ ها به بازار بورس
بورس

تپسی با قیمت ۹۳۹ تومان در فرابورس عرضه شد 

امروز در تاریخ ۲۴ خرداد پس از کش و قوس های فراوان تپسی در فرابورس برای صندوق های سرمایه گذاری عرضه شده در همان ۵۰ دقیقه اول عرضه کل ۵۸.۶ میلیون سهم عرضه شده توسط صندوق های سرمایه گذاری خریداری شد . شرکت تپسی صورت...
رشد درآمد بیش از ۳۰۰ درصدی تپسی / استارتاپ های پر سود به بورس می آیند
استارت آپ, بورس

رشد درآمد بیش از ۳۰۰ درصدی تپسی / استارتاپ های پر سود به بورس می آیند 

تپسی یک سامانه هوشمند درخواست حمل‌ونقل آنلاین است که سفرهای درون شهری را راحت‌تر، امن‌تر و ارزان‌تر می‌کند.چشم‌انداز ما، ایجاد تاثیر چشمگیر و ماندگار در زندگی مردم کشورمان بر پایه‌ی تکنولوژی است. با این چشم‌انداز و با تمرکز بر حوزه حمل و نقل، برآنیم تا...
تپسی آماده عرضه اولیه می شود / ورود اولین استارتاپ ها به بازار بورس
استارت آپ, بورس

تپسی آماده عرضه اولیه می شود / ورود اولین استارتاپ ها به بازار بورس 

ارزشگذاری سهام تپسی محافظه‌کارانه انجام شده است/ لاین‌های جدید تپسی پس از عرضه سهام، افشای اطلاعات می‌شود گزارش‌های رسمی ارزش‌گذاری شرکت بسیار محافظه‌کارانه تدوین و تنها به بیزنس تپسی اکتفا شده است درحالی‌که ما چند لاین جدید را در دست اجرا داریم که پس از...