<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[11365] sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub: Support: HelpHub: Attempt to replace the TOC plugin within the HelpHub site with the original WordPress.org-supported TOC plugin it was based on.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/11365">11365</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/11365","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>dd32</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-12-14 01:26:20 +0000 (Tue, 14 Dec 2021)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Support: HelpHub: Attempt to replace the TOC plugin within the HelpHub site with the original WordPress.org-supported TOC plugin it was based on.

The HelpHub plugin was based on the Handbooks plugin, but customised and further plugin-ised, resulting in two different plugins on WordPress.org doing the same thing, in different ways.

This is an attempt to make it easier to sync the Handbook plugin changes to Support pages.

See <a href="http://meta.trac.wordpress.org/ticket/5979">#5979</a>, <a href="http://meta.trac.wordpress.org/ticket/5963">#5963</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubsupporthelphubphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/support-helphub.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubinchandbooktocindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/index.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubinchandbooktocstylecss">sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/style.css</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubinchandbooktoctableofcontentsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/table-of-contents.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubinchandbooktocindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/index.php                               (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/index.php 2021-12-14 01:26:20 UTC (rev 11365)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,29 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Plugin Name: WordPress.org Handbooks Table of Contents
+ * Description: This is the WordPress.org Handbooks TOC plugin, inside the HelpHub repo.
+ * 
+ * @package HelpHub
+ */
+
+namespace WordPressdotorg\HelpHub;
+
+add_action( 'init', function() {
+       require __DIR__ . '/table-of-contents.php';
+
+       $post_types = array_keys( helphub_post_types()->post_types );
+
+       new \WPorg_Handbook_TOC( $post_types );
+} );
+
+// Add our custom styling for the TOC.
+add_filter( 'the_content', function( $contents ) {
+       if (
+               ! wp_style_is( 'table-of-contents', 'enqueued' ) &&
+               false !== strpos( $contents, '<div class="table-of-contents">' )
+       ) {
+               wp_enqueue_style( 'table-of-contents', plugins_url( 'inc/handbook-toc/style.css', PLUGIN ), array(), filemtime( __DIR__ . '/style.css' ) );
+       }
+
+       return $contents;
+}, 20 );
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubinchandbooktocstylecssfromrev11364sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubinctableofcontentsliteassetscssstylecss"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/style.css (from rev 11364, sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/table-of-contents-lite/assets/css/style.css)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/style.css                               (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/style.css 2021-12-14 01:26:20 UTC (rev 11365)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,152 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.content-area h1,
+.content-area h2,
+.content-area h3,
+.content-area h4 {
+       margin: 0.4em 0 1.1em 0;
+       font-weight: 400;
+       border-bottom: 0 none;
+       padding: 0;
+}
+
+.entry-content .toc-heading,
+.entry-content h2.toc-heading,
+.entry-content h3.toc-heading,
+.entry-content h4.toc-heading,
+.entry-content h5.toc-heading,
+.entry-content h6.toc-heading {
+       clear: left;
+       float: none !important;
+       text-transform: none;
+       font-weight: 400;
+}
+
+.entry-content h2.toc-heading {
+       font-size: 1.45rem; /* 26px */
+       line-height: 1.5em; /* 39px */
+}
+
+.entry-content h3.toc-heading {
+       font-size: 1.15rem; /* 21px */
+       line-height: 1.475em; /* 31px */
+}
+
+.entry-content h4.toc-heading {
+       font-size: 1rem; /* 18px */
+}
+
+.table-of-contents {
+       float: right;
+       width: 250px;
+       background-color: #fff;
+       box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
+       border: 1px solid #eee;
+       border-radius: 3px;
+       margin: 0 0 15px 15px;
+       z-index: 1;
+       position: relative;
+       color: #555d66;
+       line-height: 1.278rem;
+}
+
+@media (min-width: 971px) {
+
+       div.table-of-contents {
+               margin: 0 -30px 15px 15px;
+       }
+}
+
+@media (max-width: 480px) {
+
+       div.table-of-contents {
+               display: none;
+       }
+}
+
+.helphub-page .table-of-contents > h1,
+.helphub-page .table-of-contents > h2,
+.helphub-page .table-of-contents > h3,
+.helphub-page .table-of-contents > h4,
+.helphub-page .table-of-contents > h5,
+.helphub-page .table-of-contents > h6 {
+       /**
+        * originally font-size is 1.3em defined in wporg-breathe theme,
+        * which is correctly 17px but in HelpHub style this inheritance is wrong
+        * and 1.3em becomes 21px so we'll define font-size and line-height here
+        * until issue is fixed in theme itself.
+        *
+        * Recently edited to use rem values instead of pixels.
+        */
+       font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
+       margin: 0;
+       font-size: 0.94rem;
+       padding: 0.39rem 0.67rem;
+       border-bottom: 1px solid #eee;
+       text-transform: uppercase;
+}
+
+/**
+ * Same thing with font-size and line-height as above
+ */
+.table-of-contents .items {
+       font-size: 0.754rem;
+       margin: 0;
+       list-style-type: none;
+       padding: 0.67rem;
+}
+
+.table-of-contents .items li {
+       padding: 0.2222rem;
+}
+
+.table-of-contents .items li ul li,
+.table-of-contents .items li ul li ul li {
+       padding-bottom: 0;
+}
+
+/**
+ * This should be inherited from p2-breathe
+ */
+.table-of-contents .items li a,
+.table-of-contents .items li a:visited {
+       text-decoration: none;
+}
+
+.table-of-contents .items li a:hover {
+       color: #0073aa;
+       text-decoration: underline;
+}
+
+/**
+ * This should be inherited from p2-breathe
+ */
+.table-of-contents .items li ul {
+       list-style: circle;
+       margin-left: 1.1944rem;
+}
+
+/* Highlight current heading and adjust scroll position for fixed toolbar */
+.toc-heading:target {
+       border-left: 5px solid #0073aa;
+       padding-left: 0.278rem;
+       margin-left: -0.556rem;
+}
+
+p.toc-jump {
+       position: relative;
+       height: 50px;
+       text-align: right;
+       font-size: 0.67rem;
+}
+
+p.toc-jump::after {
+       content: "";
+       display: table;
+       clear: both;
+}
+
+p.toc-jump {
+       z-index: 1;
+}
+.table-of-contents {
+       z-index: 2;
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubinchandbooktoctableofcontentsphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/table-of-contents.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/table-of-contents.php                           (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/table-of-contents.php     2021-12-14 01:26:20 UTC (rev 11365)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,251 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Adds a table of contents to your pages based on h1, h2, h3 and h4 tags. Useful for documention-centric sites.
+ *
+ * @author Automattic, modifed by Nacin
+ */
+class WPorg_Handbook_TOC {
+       protected $post_types = array();
+
+       protected $styles = '<style> .toc-jump { text-align: right; font-size: 12px; } .page .toc-heading { margin-top: -50px; padding-top: 50px !important; }</style>';
+
+       /**
+        * Array of HTML ids known to exist on the page or that have been auto-generated.
+        *
+        * @var array
+        */
+       private $used_ids = [];
+
+       /**
+        * Arguments.
+        *
+        * @access protected
+        * @var array
+        */
+       protected $args = array();
+
+       /**
+        * Constructor.
+        *
+        * @access public
+        *
+        * @param array $post_types Post types.
+        * @param array $args {
+        *     Optional. Table of Contents arguments. Defualt emtpy array.
+        *
+        *     @type string $header_text Header text for the table. HTML-escaped on output.
+        * }
+        */
+       public function __construct( $post_types, $args = array() ) {
+               $this->post_types = (array) $post_types;
+               add_action( 'template_redirect', array( $this, 'load_filters' ) );
+
+               $this->args = (object) wp_parse_args( $args, array(
+                       'header_text' => __( 'Topics', 'wporg' ),
+               ) );
+       }
+
+       public function load_filters() {
+               if ( is_singular( $this->post_types ) && ! is_embed() ) {
+                       add_filter( 'the_content', array( $this, 'add_toc' ) );
+               }
+       }
+
+       /**
+        * Returns reserved markup IDs likely to conflict with ToC-generated heading IDs.
+        *
+        * This list isn't meant to be exhaustive, just IDs that are likely to conflict
+        * with ToC-generated section heading IDs.
+        *
+        * If a reserved ID is encountered when a ToC section heading ID is being
+        * generated, the generated ID is incremented to avoid a conflict.
+        *
+        * @return array
+        */
+       public function get_reserved_ids() {
+               /**
+                * Filters the array of reserved IDs considered when auto-generating IDs for
+                * ToC sections.
+                *
+                * This is mostly for specifying markup IDs that may appear on the same page
+                * as the ToC for which any ToC-generated IDs would conflict. In such
+                * cases, the first instance of the ID on the page would be the target of
+                * the ToC section permalink which is likely not the ToC section itself.
+                *
+                * By specifying these reserved IDs, any potential use of the IDs by the theme
+                * can be accounted for by incrementing the auto-generated ID to avoid conflict.
+                *
+                * E.g. if the theme has `<div id="main">`, a ToC with a section titled "Main"
+                * would have a permalink that links to the div and not the ToC section.
+                *
+                * @param array $ids Array of IDs.
+                */
+               return (array) apply_filters(
+                       'handbooks_reserved_ids',
+                       [
+                               'main', 'masthead', 'menu-header', 'page', 'primary', 'secondary', 'secondary-content', 'site-navigation',
+                               'wordpress-org', 'wp-toolbar', 'wpadminbar', 'wporg-footer', 'wporg-header'
+                       ]
+               );
+       }
+
+       /**
+        * Converts given content to dynamically add the ToC.
+        *
+        * @access public
+        *
+        * @param string $content Content.
+        * @return string Modified content.
+        */
+       public function add_toc( $content ) {
+               if ( ! in_the_loop() ) {
+                       return $content;
+               }
+
+               $toc   = '';
+               $items = $this->get_tags( 'h(?P<level>[1-4])', $content );
+
+               if ( count( $items ) < 2 ) {
+                       return $content;
+               }
+
+               // Remove any links we don't need.
+               foreach ( $items as $i => $item ) {
+                       // If an element is all HTML, don't link to it.
+                       if ( empty( trim( strip_tags( $item['title'] ) ) ) ) {
+                               unset( $items[ $i ] );
+                       }
+               }
+
+               // Generate a list of the IDs in the document (generating them as needed).
+               $this->used_ids = $this->get_reserved_ids();
+               foreach ( $items as $i => $item ) {
+                       $items[ $i ]['id'] = $this->get_id_for_item( $item );
+               }
+
+               // Replace each level of the headings.
+               $content = $this->add_ids_and_jumpto_links( $items, $content );
+
+               if ( ! apply_filters( 'handbook_display_toc', true ) ) {
+                       return $content;
+               }
+
+               $contents_header = 'h' . $items[0]['level']; // Duplicate the first <h#> tag in the document for the TOC header
+               $toc            .= $this->styles;
+               $toc            .= '<div class="table-of-contents">';
+               $toc            .= "<$contents_header>" . esc_html( $this->args->header_text ) . "</$contents_header><ul class=\"items\">";
+               $last_item       = false;
+
+               foreach ( $items as $item ) {
+                       if ( $last_item ) {
+                               if ( $last_item < $item['level'] ) {
+                                       $toc .= "\n<ul>\n";
+                               } elseif ( $last_item > $item['level'] ) {
+                                       $toc .= "\n</ul></li>\n";
+                               } else {
+                                       $toc .= "</li>\n";
+                               }
+                       }
+
+                       $last_item = $item['level'];
+
+                       $toc .= '<li><a href="#' . esc_attr( $item['id']  ) . '">' . $item['title']  . '</a>';
+               }
+
+               $toc .= "</ul>\n</div>\n";
+
+               return $toc . $content;
+       }
+
+       /**
+        * Add the HTML markup for the in-content header elements.
+        */
+       protected function add_ids_and_jumpto_links( $items, $content ) {
+               $first = true;
+               $matches = array();
+               $replacements = array();
+
+               foreach ( $items as $item ) {
+                       $replacement = '';
+                       $matches[]   = $item[0];
+                       $tag         = 'h' . $item['level']; // 'h2'
+                       $id          = $item['id'];
+                       $title       = $item['title'];
+                       $extra_attrs = $item['attrs']; // 'class="" style=""'
+                       $class       = 'toc-heading';
+
+                       if ( $extra_attrs ) {
+                               // Strip all IDs from the heading attributes (including empty), we'll replace it with one below.
+                               $extra_attrs = trim( preg_replace( '/id=(["\'])[^"\']*\\1/i', '', $extra_attrs ) );
+
+                               // Extract any classes present, we're adding our own attribute.
+                               if ( preg_match( '/class=(["\'])(?P<class>[^"\']+)\\1/i', $extra_attrs, $m ) ) {
+                                       $extra_attrs = str_replace( $m[0], '', $extra_attrs );
+                                       $class      .= ' ' . $m['class'];
+                               }
+                       }
+
+                       if ( ! $first ) {
+                               $replacement .= '<p class="toc-jump"><a href="#top">' . __( 'Top &uarr;', 'wporg' ) . '</a></p>';
+                       } else {
+                               $first = false;
+                       }
+
+                       $a11y_text      = sprintf( '<span class="screen-reader-text">%s</span>', $title );
+                       $anchor         = sprintf( '<a href="#%1$s" class="anchor"><span aria-hidden="true">#</span>%2$s</a>', $id, $a11y_text );
+                       $replacement   .= sprintf( '<%1$s id="%2$s" class="%3$s" tabindex="-1" %4$s>%5$s %6$s</%1$s>', $tag, $id, $class, $extra_attrs, $title, $anchor );
+                       $replacements[] = $replacement;
+               }
+
+               if ( $replacements ) {
+                       if ( count( array_unique( $matches ) ) !== count( $matches ) ) {
+                               foreach ( $matches as $i => $match ) {
+                                       $content = preg_replace( '/' . preg_quote( $match, '/' ) . '/', $replacements[ $i ], $content, 1 );
+                               }
+                       } else {
+                               $content = str_replace( $matches, $replacements, $content );
+                       }
+               }
+
+               return $content;
+       }
+
+       /**
+        * Generate an ID for a given HTML element, use the tags `id` attribute if set.
+        */
+       protected function get_id_for_item( $item ) {
+               if ( ! empty( $item['id'] ) ) {
+                       return $item['id'];
+               }
+
+               // Check to see if the item already had a non-empty ID, else generate one from the title.
+               if ( preg_match( '/id=(["\'])(?P<id>[^"\']+)\\1/', $item['attrs'], $m ) ) {
+                       $id = $m['id'];
+               } else {
+                       $id = sanitize_title( $item['title'] );
+               }
+
+               // Append unique suffix if anchor ID isn't unique in the document.
+               $count   = 2;
+               $orig_id = $id;
+               while ( in_array( $id, $this->used_ids ) && $count < 50 ) {
+                       $id = $orig_id . '-' . $count;
+                       $count++;
+               }
+
+               $this->used_ids[] = $id;
+
+               return $id;
+       }
+
+       protected function get_tags( $tag, $content = '' ) {
+               if ( empty( $content ) ) {
+                       $content = get_the_content();
+               }
+
+               preg_match_all( "/(?P<tag><{$tag}(?P<attrs>[^>]*)>)(?P<title>.*?)(<\/{$tag}>)/iJ", $content, $matches, PREG_SET_ORDER );
+
+               return $matches;
+       }
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/table-of-contents.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginssupporthelphubsupporthelphubphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/support-helphub.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/support-helphub.php      2021-12-13 08:34:37 UTC (rev 11364)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/support-helphub.php        2021-12-14 01:26:20 UTC (rev 11365)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,11 +15,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> namespace WordPressdotorg\HelpHub;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-require_once( dirname( __FILE__ ) . '/inc/helphub-codex-languages/class-helphub-codex-languages.php' );
-require_once( dirname( __FILE__ ) . '/inc/helphub-contributors/helphub-contributors.php' );
-require_once( dirname( __FILE__ ) . '/inc/helphub-post-types/helphub-post-types.php' );
-require_once( dirname( __FILE__ ) . '/inc/helphub-read-time/helphub-read-time.php' );
-require_once( dirname( __FILE__ ) . '/inc/table-of-contents-lite/table-of-contents-lite.php' );
-require_once( dirname( __FILE__ ) . '/inc/helphub-front-page-blocks/helphub-front-page-blocks.php' );
-require_once( dirname( __FILE__ ) . '/inc/helphub-customroles/class-helphub-custom-roles.php' );
-require_once( dirname( __FILE__ ) . '/inc/helphub-manager/class-helphub-manager.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+define( 'PLUGIN', __FILE__ );
+
+require __DIR__ . '/inc/helphub-codex-languages/class-helphub-codex-languages.php';
+require __DIR__ . '/inc/helphub-contributors/helphub-contributors.php';
+require __DIR__ . '/inc/helphub-post-types/helphub-post-types.php';
+require __DIR__ . '/inc/helphub-read-time/helphub-read-time.php';
+require __DIR__ . '/inc/helphub-front-page-blocks/helphub-front-page-blocks.php';
+require __DIR__ . '/inc/helphub-customroles/class-helphub-custom-roles.php';
+require __DIR__ . '/inc/helphub-manager/class-helphub-manager.php';
+require __DIR__ . '/inc/handbook-toc/index.php';
</ins></span></pre>
</div>
</div>

</body>
</html>