docs: update readme and PHPDoc settings (#120)
* update readme.txt * Test * Test * docs: update documentation * docs: add package tag * docs: add PHPDoc config, alter Composer script Co-authored-by: Rumperuu <me+footnotes@bengoldsworthy.net>
This commit is contained in:
parent
226df694a2
commit
4dd3345685
44 changed files with 10272 additions and 12004 deletions
|
@ -70,7 +70,7 @@
|
|||
|
||||
<div class="phpdocumentor-column -eight phpdocumentor-content">
|
||||
<ul class="phpdocumentor-breadcrumbs">
|
||||
<li class="phpdocumentor-breadcrumb"><a href="packages/Default.html">Default</a></li>
|
||||
<li class="phpdocumentor-breadcrumb"><a href="packages/footnotes.html">footnotes</a></li>
|
||||
</ul>
|
||||
|
||||
<article class="phpdocumentor-element -class">
|
||||
|
@ -85,7 +85,7 @@
|
|||
<aside class="phpdocumentor-element-found-in">
|
||||
<abbr class="phpdocumentor-element-found-in__file" title="class/language.php"><a href="files/class-language.html"><abbr title="class/language.php">language.php</abbr></a></abbr>
|
||||
:
|
||||
<span class="phpdocumentor-element-found-in__line">22</span>
|
||||
<span class="phpdocumentor-element-found-in__line">18</span>
|
||||
</aside>
|
||||
|
||||
<p class="phpdocumentor-summary">Loads text domain of current or default language for localization.</p>
|
||||
|
@ -99,15 +99,6 @@
|
|||
</h5>
|
||||
<dl class="phpdocumentor-tag-list">
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">author</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
||||
<section class="phpdocumentor-description"><p>Stefan Herndler</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">since</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
@ -130,14 +121,14 @@
|
|||
|
||||
<dl class="phpdocumentor-table-of-contents">
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_loadTextDomain">loadTextDomain()</a>
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_load_text_domain">load_text_domain()</a>
|
||||
<span>
|
||||
: mixed </span>
|
||||
</dt>
|
||||
<dd>Loads the text domain for current WordPress language if exists.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_registerHooks">registerHooks()</a>
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_register_hooks">register_hooks()</a>
|
||||
<span>
|
||||
: mixed </span>
|
||||
</dt>
|
||||
|
@ -169,21 +160,21 @@
|
|||
-public
|
||||
-static "
|
||||
>
|
||||
<h4 class="phpdocumentor-element__name" id="method_loadTextDomain">
|
||||
loadTextDomain()
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_loadTextDomain" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
<h4 class="phpdocumentor-element__name" id="method_load_text_domain">
|
||||
load_text_domain()
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_load_text_domain" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
</h4>
|
||||
<aside class="phpdocumentor-element-found-in">
|
||||
<abbr class="phpdocumentor-element-found-in__file" title="class/language.php"><a href="files/class-language.html"><abbr title="class/language.php">language.php</abbr></a></abbr>
|
||||
:
|
||||
<span class="phpdocumentor-element-found-in__line">68</span>
|
||||
<span class="phpdocumentor-element-found-in__line">61</span>
|
||||
</aside>
|
||||
|
||||
<p class="phpdocumentor-summary">Loads the text domain for current WordPress language if exists.</p>
|
||||
|
||||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||||
<span class="phpdocumentor-signature__visibility">public</span>
|
||||
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">loadTextDomain</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
||||
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">load_text_domain</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
||||
|
||||
<section class="phpdocumentor-description"><p>Otherwise fallback "en_GB" will be loaded.</p>
|
||||
</section>
|
||||
|
@ -196,15 +187,6 @@
|
|||
</h5>
|
||||
<dl class="phpdocumentor-tag-list">
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">author</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
||||
<section class="phpdocumentor-description"><p>Stefan Herndler</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">since</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
@ -224,15 +206,6 @@
|
|||
|
||||
<section class="phpdocumentor-description"></section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">date</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
||||
<section class="phpdocumentor-description"><p>2020-10-26T1609+0100</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">contributor</span>
|
||||
|
@ -247,7 +220,7 @@
|
|||
<span class="phpdocumentor-tag__name">link</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
<a class="phpdocumentor-tag-link" href="https://wordpress.org/support/topic/error-missing-parameter-if-using-php-7-1-or-later/"> <p>Add 3rd (empty) argument in apply_filters() to prevent PHP from throwing an error:
|
||||
<a class="phpdocumentor-tag-link" href="https://wordpress.org/support/topic/error-missing-parameter-if-using-php-7-1-or-later/"> <p>Add 3rd (empty) argument in apply_filters() to prevent PHP from throwing an error.
|
||||
“Fatal error: Uncaught ArgumentCountError: Too few arguments to function apply_filters()”</p>
|
||||
<p>Yet get_locale() is defined w/o parameters in wp-includes/l10n.php:30, and
|
||||
apply_filters() is defined as apply_filters( $tag, $value ) in wp-includes/plugin.php:181.</p>
|
||||
|
@ -260,7 +233,7 @@ apply_filters() is defined as apply_filters( $tag, $value ) in wp-includes/plugi
|
|||
<dd class="phpdocumentor-tag-list__definition">
|
||||
<a class="phpdocumentor-tag-link" href="https://developer.wordpress.org/reference/functions/apply_filters/"> <p>But apply_filters() is defined with a 3rd parameter (and w/o the first one) in
|
||||
wp-includes/class-wp-hook.php:264, as public function apply_filters( $value, $args ).</p>
|
||||
<p>Taking it all together, probably the full function definition would be:
|
||||
<p>Taking it all together, probably the full function definition would be
|
||||
public function apply_filters( $tag, $value, $args ).
|
||||
In the case of get_locale(), $args is empty.</p>
|
||||
<p>The bug was lurking in WP. PHP 7.1 promoted the warning to an error.</p>
|
||||
|
@ -296,21 +269,21 @@ In the case of get_locale(), $args is empty.</p>
|
|||
-public
|
||||
-static "
|
||||
>
|
||||
<h4 class="phpdocumentor-element__name" id="method_registerHooks">
|
||||
registerHooks()
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_registerHooks" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
<h4 class="phpdocumentor-element__name" id="method_register_hooks">
|
||||
register_hooks()
|
||||
<a href="classes/MCI-Footnotes-Language.html#method_register_hooks" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
</h4>
|
||||
<aside class="phpdocumentor-element-found-in">
|
||||
<abbr class="phpdocumentor-element-found-in__file" title="class/language.php"><a href="files/class-language.html"><abbr title="class/language.php">language.php</abbr></a></abbr>
|
||||
:
|
||||
<span class="phpdocumentor-element-found-in__line">30</span>
|
||||
<span class="phpdocumentor-element-found-in__line">25</span>
|
||||
</aside>
|
||||
|
||||
<p class="phpdocumentor-summary">Register WordPress Hook.</p>
|
||||
|
||||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||||
<span class="phpdocumentor-signature__visibility">public</span>
|
||||
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">registerHooks</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
||||
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">register_hooks</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
||||
|
||||
<section class="phpdocumentor-description"></section>
|
||||
|
||||
|
@ -322,15 +295,6 @@ In the case of get_locale(), $args is empty.</p>
|
|||
</h5>
|
||||
<dl class="phpdocumentor-tag-list">
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">author</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
||||
<section class="phpdocumentor-description"><p>Stefan Herndler</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">since</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
@ -361,21 +325,21 @@ In the case of get_locale(), $args is empty.</p>
|
|||
<aside class="phpdocumentor-element-found-in">
|
||||
<abbr class="phpdocumentor-element-found-in__file" title="class/language.php"><a href="files/class-language.html"><abbr title="class/language.php">language.php</abbr></a></abbr>
|
||||
:
|
||||
<span class="phpdocumentor-element-found-in__line">99</span>
|
||||
<span class="phpdocumentor-element-found-in__line">90</span>
|
||||
</aside>
|
||||
|
||||
<p class="phpdocumentor-summary">Loads a specific text domain.</p>
|
||||
|
||||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||||
<span class="phpdocumentor-signature__visibility">private</span>
|
||||
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">load</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$p_str_LanguageCode</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
||||
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">load</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$p_str_language_code</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
||||
|
||||
<section class="phpdocumentor-description"></section>
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
<span class="phpdocumentor-signature__argument__name">$p_str_LanguageCode</span>
|
||||
<span class="phpdocumentor-signature__argument__name">$p_str_language_code</span>
|
||||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-argument-list__definition">
|
||||
|
@ -392,15 +356,6 @@ In the case of get_locale(), $args is empty.</p>
|
|||
</h5>
|
||||
<dl class="phpdocumentor-tag-list">
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">author</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
||||
<section class="phpdocumentor-description"><p>Stefan Herndler</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">since</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
@ -417,15 +372,6 @@ In the case of get_locale(), $args is empty.</p>
|
|||
|
||||
<section class="phpdocumentor-description"></section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">date</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
|
||||
<section class="phpdocumentor-description"><p>2020-12-08T1931+0100</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">reporter</span>
|
||||
|
@ -440,7 +386,7 @@ In the case of get_locale(), $args is empty.</p>
|
|||
<span class="phpdocumentor-tag__name">link</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
<a class="phpdocumentor-tag-link" href="https://wordpress.org/support/topic/more-feature-ideas/"> <p>That is done by using load_plugin_textdomain():
|
||||
<a class="phpdocumentor-tag-link" href="https://wordpress.org/support/topic/more-feature-ideas/"> <p>That is done by using load_plugin_textdomain().
|
||||
“The .mo file should be named based on the text domain with a dash, and then the locale exactly.”</p>
|
||||
</a>
|
||||
|
||||
|
|
Reference in a new issue