Application
Table of Contents
Classes
Constants
- _AUTOBR_IGNORER = \_AUTOBR ? '<!-- ig br -->' : ''
- _BALISES_BLOCS = 'address|applet|article|aside|blockquote|button|center|d[ltd]|div|fieldset|fig(ure|caption)|footer|form|h[1-6r]|hgroup|head|header|iframe|li|map|marquee|nav|noscript|object|ol|pre|section|t(able|[rdh]|body|foot|extarea)|ul|script|style'
- _EXTRAIRE_DOMAINE = '/^(?:(?:[^\W_]((?:[^\W_]|-){0,61}[^\W_,])?\.)+[a-z0-9]{2,6}|localhost)\b/Si'
- _EXTRAIRE_LIEN = ',^\s*(?:' . \_PROTOCOLES_STD . '):?/?/?\s*$,iS'
- _EXTRAIRE_LIENS = ',' . '\[[^\[\]]*(?:<-|->).*?\]' . '|<a\b.*?</a\b' . '|<\w.*?>' . '|((?:https?:/|www\.)[^"\'\s\[\]\}\)<>]*)' . ',imsS'
- _EXTRAIRE_RESSOURCES = ',' . '<"?(https?://|[^\s][\w -]+\.[\w -]+)[^<]*>' . ',UimsS'
- _NOTES_FERME_NOTE = '] </span>'
- _NOTES_FERME_REF = ']</span>'
- _NOTES_OUVRE_NOTE = '<span class="spip_note_ref">['
- _NOTES_OUVRE_REF = '<span class="spip_note_ref"> ['
- _NOTES_RACCOURCI = ',\[\[(\s*(<([^>\'"]*)>)?(.*?))\]\],msS'
- _RACCOURCI_ANCRE = '/\[#?([^][]*)<-\]/S'
- _RACCOURCI_ATTRIBUTS = '/^((?:[^[]*?(?:\[[^]]*\])?)*?)([|]([^<>]*?))?([{]([a-z_]*)[}])?$/'
- _RACCOURCI_BALISE = ',</?[a-z!][^<>]*[' . \preg_quote(\_RACCOURCI_PROTEGER) . '][^<>]*>,imsS'
- _RACCOURCI_CHAPO = '/^(\W*)(\W*)(\w*\d+([?#].*)?)$/'
- _RACCOURCI_GLOSES = '/^([^|#{]*\w[^|#{]*)([^#]*)(#([^|{}]*))?(.*)$/S'
- _RACCOURCI_GLOSSAIRE = '/\[\?+\s*([^][<>]+)\]/S'
- _RACCOURCI_PROTECTEUR = "\x01\x02\x03\x04"
- _RACCOURCI_PROTEGER = '{}_-'
- _RACCOURCI_TH_SPAN = '\s*(:?{{[^{}]+}}\s*)?|<'
- _RACCOURCI_URL = '/^\s*(\w*?)\s*(\d+)(\?(.*?))?(#([^\s]*))?\s*$/S'
- _TYPO_BALISE = ',</?[a-z!][^<>]*[' . \preg_quote(\_TYPO_PROTEGER) . '][^<>]*>,imsS'
- _TYPO_PROTECTEUR = "\x01\x02\x03\x04\x05\x06\x07\x08"
- _TYPO_PROTEGER = "!':;?~%-"
- _WHEELS_FORMAT_DEFAUT = 'json'
- _WHEELS_VERSION = 68672
Functions
- stripos() : mixed
- strpbrk() : mixed
- tw_autoliens() : string
- tw_traiter_autoliens() : mixed
- inc_lien_dist() : string
- Production de la balise a+href à partir des raccourcis `[xxx->url]` etc.
- lien_is_url_externe() : bool
- Detecter qu'une URL est externe pour poser une class en fonction
- balise_a() : string
- Générer le HTML d'un lien quelconque
- expanser_liens() : mixed
- nettoyer_raccourcis_typo() : string
- Nettoie un texte en enlevant les raccourcis typo, sans les traiter
- traiter_raccourci_lien_atts() : mixed
- virtuel_redirige() : string
- Retourne la valeur d'un champ de redirection (articles virtuels)
- calculer_url() : mixed
- traiter_lien_explicite() : mixed
- liens_implicite_glose_dist() : mixed
- traiter_lien_implicite() : array<string|int, mixed>|bool|string
- Transformer un lien raccourci art23 en son URL Par defaut la fonction produit une url prive si on est dans le prive ou publique si on est dans le public.
- typer_raccourci() : array<string|int, mixed>
- traiter_raccourci_titre() : array<string|int, mixed>
- Retourne le titre et la langue d'un objet éditorial
- traiter_raccourci_ancre() : string
- traiter_raccourci_glossaire() : string
- glossaire_std() : mixed
- inc_notes_dist() : null|string|array<string|int, mixed>
- Empile ou dépile des notes de bas de page
- traiter_raccourci_notes() : mixed
- traiter_les_notes() : mixed
- tw_post_typo() : mixed
- tw_pre_liens() : mixed
- tw_traiter_ressources() : mixed
- echappe_js() : string
- Échapper et affichier joliement les `<script` .
- paragrapher() : string
- Paragrapher seulement
- interdire_scripts() : string
- Empêcher l'exécution de code PHP et JS
- typo() : string
- Applique la typographie générale
- corriger_typo() : string
- Corrige la typographie
- traiter_tableau() : string
- Traitement des raccourcis de tableaux
- traiter_listes() : string
- Traitement des listes
- personnaliser_raccourcis() : string
- mais d'abord, une callback de reconfiguration des raccourcis a partir de globales (est-ce old-style ? on conserve quand meme par souci de compat ascendante)
- traiter_raccourcis() : string
- Nettoie un texte, traite les raccourcis autre qu'URL, la typo, etc.
- propre() : string
- Transforme les raccourcis SPIP, liens et modèles d'un texte en code HTML
- safe_ecrire_traiter_echap_html_dist() : mixed
- safe_public_traiter_echap_html_dist() : mixed
- safe_ecrire_traiter_echap_script_dist() : mixed
- safe_public_traiter_echap_script_dist() : mixed
- safe_ecrire_traiter_echap_code_dist() : mixed
- safe_public_traiter_echap_code_dist() : mixed
- tw_trig_purger() : mixed
- tw_cache_get() : mixed
- Lire une valeur en cache memoization minimale (utilise le plugin memoization si disponible)
- tw_cache_set() : bool
- Ecrire une valeur en cache memoization minimale (utilise le plugin memoization si disponible)
- typographie_en() : mixed
- typographie_fr() : mixed
- echappe_tags_sub_backticks() : string
- Echapper les tags html qui ont un ` dans un attribut
- replace_backticks() : mixed
- echappe_anti_xss() : mixed
- tw_def_wrap() : mixed
- tw_liste_init() : mixed
- tw_liste_close() : mixed
- tw_liste_item() : mixed
- tw_def_wrap() : mixed
- detecter_liens_blocs() : string
- Callback de detection des liens qui contiennent des blocks : dans ce cas il faut traiter le <a> comme un quasi block et fermer/ouvrir les <p> autour du <a>
- fermer_para_mano() : string
- Callback fermer-para-mano
- replace_tableaux() : string
- Callback de traitement de chaque tableau
- replace_puce() : string
- Callback pour la puce qui est définissable/surchargeable
- inserer_abbr() : string
- Callback pour les Abbr
Constants
_AUTOBR_IGNORER
public
mixed
_AUTOBR_IGNORER
= \_AUTOBR ? '<!-- ig br -->' : ''
_BALISES_BLOCS
public
mixed
_BALISES_BLOCS
= 'address|applet|article|aside|blockquote|button|center|d[ltd]|div|fieldset|fig(ure|caption)|footer|form|h[1-6r]|hgroup|head|header|iframe|li|map|marquee|nav|noscript|object|ol|pre|section|t(able|[rdh]|body|foot|extarea)|ul|script|style'
_EXTRAIRE_DOMAINE
public
mixed
_EXTRAIRE_DOMAINE
= '/^(?:(?:[^\W_]((?:[^\W_]|-){0,61}[^\W_,])?\.)+[a-z0-9]{2,6}|localhost)\b/Si'
_EXTRAIRE_LIEN
public
mixed
_EXTRAIRE_LIEN
= ',^\s*(?:' . \_PROTOCOLES_STD . '):?/?/?\s*$,iS'
_EXTRAIRE_LIENS
public
mixed
_EXTRAIRE_LIENS
= ',' . '\[[^\[\]]*(?:<-|->).*?\]' . '|<a\b.*?</a\b' . '|<\w.*?>' . '|((?:https?:/|www\.)[^"\'\s\[\]\}\)<>]*)' . ',imsS'
_EXTRAIRE_RESSOURCES
public
mixed
_EXTRAIRE_RESSOURCES
= ',' . '<"?(https?://|[^\s][\w -]+\.[\w -]+)[^<]*>' . ',UimsS'
_NOTES_FERME_NOTE
public
mixed
_NOTES_FERME_NOTE
= '] </span>'
_NOTES_FERME_REF
public
mixed
_NOTES_FERME_REF
= ']</span>'
_NOTES_OUVRE_NOTE
public
mixed
_NOTES_OUVRE_NOTE
= '<span class="spip_note_ref">['
_NOTES_OUVRE_REF
public
mixed
_NOTES_OUVRE_REF
= '<span class="spip_note_ref"> ['
_NOTES_RACCOURCI
public
mixed
_NOTES_RACCOURCI
= ',\[\[(\s*(<([^>\'"]*)>)?(.*?))\]\],msS'
_RACCOURCI_ANCRE
public
mixed
_RACCOURCI_ANCRE
= '/\[#?([^][]*)<-\]/S'
_RACCOURCI_ATTRIBUTS
public
mixed
_RACCOURCI_ATTRIBUTS
= '/^((?:[^[]*?(?:\[[^]]*\])?)*?)([|]([^<>]*?))?([{]([a-z_]*)[}])?$/'
_RACCOURCI_BALISE
public
mixed
_RACCOURCI_BALISE
= ',</?[a-z!][^<>]*[' . \preg_quote(\_RACCOURCI_PROTEGER) . '][^<>]*>,imsS'
_RACCOURCI_CHAPO
public
mixed
_RACCOURCI_CHAPO
= '/^(\W*)(\W*)(\w*\d+([?#].*)?)$/'
_RACCOURCI_GLOSES
public
mixed
_RACCOURCI_GLOSES
= '/^([^|#{]*\w[^|#{]*)([^#]*)(#([^|{}]*))?(.*)$/S'
_RACCOURCI_GLOSSAIRE
public
mixed
_RACCOURCI_GLOSSAIRE
= '/\[\?+\s*([^][<>]+)\]/S'
_RACCOURCI_PROTECTEUR
public
mixed
_RACCOURCI_PROTECTEUR
= "\x01\x02\x03\x04"
_RACCOURCI_PROTEGER
public
mixed
_RACCOURCI_PROTEGER
= '{}_-'
_RACCOURCI_TH_SPAN
public
mixed
_RACCOURCI_TH_SPAN
= '\s*(:?{{[^{}]+}}\s*)?|<'
_RACCOURCI_URL
public
mixed
_RACCOURCI_URL
= '/^\s*(\w*?)\s*(\d+)(\?(.*?))?(#([^\s]*))?\s*$/S'
_TYPO_BALISE
public
mixed
_TYPO_BALISE
= ',</?[a-z!][^<>]*[' . \preg_quote(\_TYPO_PROTEGER) . '][^<>]*>,imsS'
_TYPO_PROTECTEUR
public
mixed
_TYPO_PROTECTEUR
= "\x01\x02\x03\x04\x05\x06\x07\x08"
_TYPO_PROTEGER
public
mixed
_TYPO_PROTEGER
= "!':;?~%-"
_WHEELS_FORMAT_DEFAUT
public
mixed
_WHEELS_FORMAT_DEFAUT
= 'json'
_WHEELS_VERSION
public
mixed
_WHEELS_VERSION
= 68672
Functions
stripos()
stripos(mixed $haystack, mixed $needle) : mixed
Parameters
- $haystack : mixed
- $needle : mixed
strpbrk()
strpbrk(mixed $haystack, mixed $char_list) : mixed
Parameters
- $haystack : mixed
- $char_list : mixed
tw_autoliens()
tw_autoliens(string|null $t) : string
Parameters
- $t : string|null
Return values
stringtw_traiter_autoliens()
tw_traiter_autoliens(mixed $r) : mixed
Parameters
- $r : mixed
inc_lien_dist()
Production de la balise a+href à partir des raccourcis `[xxx->url]` etc.
inc_lien_dist(string $lien[, string $texte = '' ][, string $class = '' ][, string $title = '' ][, string $hlang = '' ][, string $rel = '' ][, string $connect = '' ][, array<string|int, mixed> $env = [] ]) : string
Parameters
- $lien : string
- $texte : string = ''
- $class : string = ''
- $title : string = ''
- $hlang : string = ''
- $rel : string = ''
- $connect : string = ''
- $env : array<string|int, mixed> = []
Tags
Return values
stringlien_is_url_externe()
Detecter qu'une URL est externe pour poser une class en fonction
lien_is_url_externe(string|null $url_lien) : bool
Parameters
- $url_lien : string|null
Return values
boolbalise_a()
Générer le HTML d'un lien quelconque
balise_a([array<string|int, mixed> $args = [] ]) : string
Cette fonction génère une balise <a>
suivant de multiples arguments.
Parameters
- $args : array<string|int, mixed> = []
-
Tableau des arguments disponibles pour générer le lien :
- texte : texte du lien, seul argument qui n'est pas un attribut
- href
- name
- etc, tout autre attribut supplémentaire…
Return values
string —Retourne une balise HTML de lien ou une chaîne vide.
expanser_liens()
expanser_liens(mixed $t[, mixed $connect = '' ][, mixed $env = [] ]) : mixed
Parameters
- $t : mixed
- $connect : mixed = ''
- $env : mixed = []
nettoyer_raccourcis_typo()
Nettoie un texte en enlevant les raccourcis typo, sans les traiter
nettoyer_raccourcis_typo(string $texte[, string $connect = '' ]) : string
On ne laisse que les titres des liens, en les explicitant si ce n’est pas fait.
Parameters
- $texte : string
- $connect : string = ''
Return values
stringtraiter_raccourci_lien_atts()
traiter_raccourci_lien_atts(mixed $texte) : mixed
Parameters
- $texte : mixed
virtuel_redirige()
Retourne la valeur d'un champ de redirection (articles virtuels)
virtuel_redirige(string $virtuel[, bool $url = false ]) : string
L'entrée accepte plusiers types d'écritures :
- une URL compète,
- un lien SPIP tel que
[Lien->article23]
, - ou un raccourcis SPIP comme
rub2
ourubrique2
Parameters
- $virtuel : string
-
Texte qui définit la redirection, à analyser. Plusieurs types peuvent être acceptés :
- un raccourci Spip habituel, tel que
[texte->TYPEnnn]
- un ultra raccourci Spip, tel que
TYPEnnn
- une URL standard
- un raccourci Spip habituel, tel que
- $url : bool = false
-
false : retourne uniquement le nom du lien (TYPEnnn) true : retourne l'URL calculée pour le lien
Return values
string —Nom du lien ou URL
calculer_url()
calculer_url(string|null $ref[, string|null $texte = '' ][, string $pour = 'url' ][, string $connect = '' ][, bool $echappe_typo = true ]) : mixed
Parameters
- $ref : string|null
- $texte : string|null = ''
- $pour : string = 'url'
- $connect : string = ''
- $echappe_typo : bool = true
traiter_lien_explicite()
traiter_lien_explicite(string|null $ref[, string|null $texte = '' ][, string $pour = 'url' ][, string $connect = '' ][, bool $echappe_typo = true ]) : mixed
Parameters
- $ref : string|null
- $texte : string|null = ''
- $pour : string = 'url'
- $connect : string = ''
- $echappe_typo : bool = true
liens_implicite_glose_dist()
liens_implicite_glose_dist(mixed $texte, mixed $id, mixed $type, mixed $args, mixed $ancre[, mixed $connect = '' ]) : mixed
Parameters
- $texte : mixed
- $id : mixed
- $type : mixed
- $args : mixed
- $ancre : mixed
- $connect : mixed = ''
traiter_lien_implicite()
Transformer un lien raccourci art23 en son URL Par defaut la fonction produit une url prive si on est dans le prive ou publique si on est dans le public.
traiter_lien_implicite(string|null $ref[, string|null $texte = '' ][, string $pour = 'url' ][, string $connect = '' ]) : array<string|int, mixed>|bool|string
La globale lien_implicite_cible_public permet de forcer un cas ou l'autre : $GLOBALS['lien_implicite_cible_public'] = true; => tous les liens raccourcis pointent vers le public $GLOBALS['lien_implicite_cible_public'] = false; => tous les liens raccourcis pointent vers le prive unset($GLOBALS['lien_implicite_cible_public']); => retablit le comportement automatique
Parameters
- $ref : string|null
- $texte : string|null = ''
- $pour : string = 'url'
- $connect : string = ''
Return values
array<string|int, mixed>|bool|stringtyper_raccourci()
typer_raccourci(string|null $lien) : array<string|int, mixed>
Parameters
- $lien : string|null
Return values
array<string|int, mixed>traiter_raccourci_titre()
Retourne le titre et la langue d'un objet éditorial
traiter_raccourci_titre(int $id, string $type[, string $connect = '' ]) : array<string|int, mixed>
Parameters
- $id : int
-
Identifiant de l'objet
- $type : string
-
Type d'objet
- $connect : string = ''
-
Connecteur SQL utilisé
Return values
array<string|int, mixed> —{
traiter_raccourci_ancre()
traiter_raccourci_ancre(string|null $texte) : string
Parameters
- $texte : string|null
Return values
stringtraiter_raccourci_glossaire()
traiter_raccourci_glossaire(string|null $texte) : string
Parameters
- $texte : string|null
Return values
stringglossaire_std()
glossaire_std(mixed $terme) : mixed
Parameters
- $terme : mixed
inc_notes_dist()
Empile ou dépile des notes de bas de page
inc_notes_dist(bool|string|array<string|int, mixed> $arg[, string $operation = 'traiter' ][, bool $ignorer_autobr = false ]) : null|string|array<string|int, mixed>
Point d'entrée pour la gestion des notes.
Parameters
- $arg : bool|string|array<string|int, mixed>
-
Argument :
- true : empiler l'etat courant, initialiser un nouvel état
- false : restaurer l'état précédent, dénonce un état courant perdu
- chaîne : on y recherche les notes et on les renvoie en tableau
- tableau : texte de notes à rajouter dans ce qu'on a déjà
Ce dernier cas retourne la composition totale, en particulier, envoyer un tableau vide permet de tout récupérer.
- $operation : string = 'traiter'
-
En complément du format attendu dans
$arg
, on indique ici le type d'oopétation à réaliser (traiter | empiler | depiler | sauver_etat | restaurer_etat | contexter_cache) - $ignorer_autobr : bool = false
-
True pour ne pas prendre en compte les retours à la ligne comme des tags br (mais 2 à la suite font un paragraphe tout de même).
Tags
Return values
null|string|array<string|int, mixed>traiter_raccourci_notes()
traiter_raccourci_notes(mixed $letexte, mixed $marqueur_notes) : mixed
Parameters
- $letexte : mixed
- $marqueur_notes : mixed
traiter_les_notes()
traiter_les_notes(mixed $notes, mixed $ignorer_autobr) : mixed
Parameters
- $notes : mixed
- $ignorer_autobr : mixed
tw_post_typo()
tw_post_typo(mixed $t) : mixed
Parameters
- $t : mixed
tw_pre_liens()
tw_pre_liens(mixed $t) : mixed
Parameters
- $t : mixed
tw_traiter_ressources()
tw_traiter_ressources(mixed $r) : mixed
Parameters
- $r : mixed
echappe_js()
Échapper et affichier joliement les `<script` .
echappe_js(string $t) : string
..
Parameters
- $t : string
Return values
stringparagrapher()
Paragrapher seulement
paragrapher(string $t[, null $toujours_paragrapher = null ]) : string
Fermer les paragraphes ; Essaie de préserver des paragraphes indiqués
à la main dans le texte (par ex: on ne modifie pas un <p align='center'>
)
Parameters
- $t : string
-
Le texte
- $toujours_paragrapher : null = null
-
true pour forcer les
<p>
même pour un seul paragraphe
Return values
string —Texte paragraphé
interdire_scripts()
Empêcher l'exécution de code PHP et JS
interdire_scripts(string $arg[, int $mode_filtre = null ]) : string
Sécurité : empêcher l'exécution de code PHP, en le transformant en joli code dans l'espace privé. Cette fonction est aussi appelée par propre et typo.
De la même manière, la fonction empêche l'exécution de JS mais selon le mode de protection passe en argument
Il ne faut pas désactiver globalement la fonction dans l'espace privé car elle protège aussi les balises des squelettes qui ne passent pas forcement par propre ou typo après si elles sont appelées en direct
Parameters
- $arg : string
-
Code à protéger
- $mode_filtre : int = null
-
Mode de protection -1 : protection dans l'espace privé et public 0 : protection dans l'espace public 1 : aucune protection utilise la valeur de la globale filtrer_javascript si non fourni
Return values
string —Code protégé
typo()
Applique la typographie générale
typo(string $letexte[, bool $echapper = true ][, string|null $connect = null ][, array<string|int, mixed> $env = [] ]) : string
Effectue un traitement pour que les textes affichés suivent les règles
de typographie. Fait une protection préalable des balises HTML et SPIP.
Transforme les balises <multi>
Parameters
- $letexte : string
-
Texte d'origine
- $echapper : bool = true
-
Échapper ?
- $connect : string|null = null
-
Nom du connecteur à la bdd
- $env : array<string|int, mixed> = []
-
Environnement (pour les calculs de modèles)
Tags
Return values
string —Texte transformé
corriger_typo()
Corrige la typographie
corriger_typo(string $t[, string $lang = '' ]) : string
Applique les corrections typographiques adaptées à la langue indiquée.
Parameters
- $t : string
-
Texte
- $lang : string = ''
-
Langue
Tags
Return values
string —Texte
traiter_tableau()
Traitement des raccourcis de tableaux
traiter_tableau(string $bloc) : string
Parameters
- $bloc : string
Return values
stringtraiter_listes()
Traitement des listes
traiter_listes(string $t) : string
On utilise la wheel correspondante
Parameters
- $t : string
Return values
stringpersonnaliser_raccourcis()
mais d'abord, une callback de reconfiguration des raccourcis a partir de globales (est-ce old-style ? on conserve quand meme par souci de compat ascendante)
personnaliser_raccourcis(mixed &$ruleset) : string
Parameters
- $ruleset : mixed
Return values
stringtraiter_raccourcis()
Nettoie un texte, traite les raccourcis autre qu'URL, la typo, etc.
traiter_raccourcis(string $t[, bool $show_autobr = false ]) : string
Parameters
- $t : string
- $show_autobr : bool = false
Tags
Return values
stringpropre()
Transforme les raccourcis SPIP, liens et modèles d'un texte en code HTML
propre(string $t[, string|null $connect = null ][, array<string|int, mixed> $env = [] ]) : string
Filtre à appliquer aux champs du type #TEXTE*
Parameters
- $t : string
-
Texte avec des raccourcis SPIP
- $connect : string|null = null
-
Nom du connecteur à la bdd
- $env : array<string|int, mixed> = []
-
Environnement (pour les calculs de modèles)
Tags
Return values
string —Texte transformé
safe_ecrire_traiter_echap_html_dist()
safe_ecrire_traiter_echap_html_dist(mixed $regs, mixed $options) : mixed
Parameters
- $regs : mixed
- $options : mixed
safe_public_traiter_echap_html_dist()
safe_public_traiter_echap_html_dist(mixed $regs, mixed $options) : mixed
Parameters
- $regs : mixed
- $options : mixed
safe_ecrire_traiter_echap_script_dist()
safe_ecrire_traiter_echap_script_dist(mixed $regs, mixed $options) : mixed
Parameters
- $regs : mixed
- $options : mixed
safe_public_traiter_echap_script_dist()
safe_public_traiter_echap_script_dist(mixed $regs, mixed $options) : mixed
Parameters
- $regs : mixed
- $options : mixed
safe_ecrire_traiter_echap_code_dist()
safe_ecrire_traiter_echap_code_dist(mixed $regs, mixed $options) : mixed
Parameters
- $regs : mixed
- $options : mixed
safe_public_traiter_echap_code_dist()
safe_public_traiter_echap_code_dist(mixed $regs, mixed $options) : mixed
Parameters
- $regs : mixed
- $options : mixed
tw_trig_purger()
tw_trig_purger(mixed $quoi) : mixed
Parameters
- $quoi : mixed
tw_cache_get()
Lire une valeur en cache memoization minimale (utilise le plugin memoization si disponible)
tw_cache_get(string $key) : mixed
Parameters
- $key : string
tw_cache_set()
Ecrire une valeur en cache memoization minimale (utilise le plugin memoization si disponible)
tw_cache_set(string $key, mixed $value[, int|null $ttl = null ]) : bool
Parameters
- $key : string
- $value : mixed
- $ttl : int|null = null
Return values
booltypographie_en()
typographie_en(mixed $t) : mixed
Parameters
- $t : mixed
typographie_fr()
typographie_fr(mixed $t) : mixed
Parameters
- $t : mixed
echappe_tags_sub_backticks()
Echapper les tags html qui ont un ` dans un attribut
echappe_tags_sub_backticks(array<string|int, mixed> $match) : string
Parameters
- $match : array<string|int, mixed>
Return values
stringreplace_backticks()
replace_backticks(mixed $texte) : mixed
Parameters
- $texte : mixed
echappe_anti_xss()
echappe_anti_xss(mixed $match) : mixed
Parameters
- $match : mixed
tw_def_wrap()
tw_def_wrap(mixed $t) : mixed
Parameters
- $t : mixed
tw_liste_init()
tw_liste_init(mixed $t) : mixed
Parameters
- $t : mixed
tw_liste_close()
tw_liste_close(mixed $t) : mixed
Parameters
- $t : mixed
tw_liste_item()
tw_liste_item(mixed $t[, mixed $quoi = 'item' ]) : mixed
Parameters
- $t : mixed
- $quoi : mixed = 'item'
tw_def_wrap()
tw_def_wrap(mixed $t) : mixed
Parameters
- $t : mixed
detecter_liens_blocs()
Callback de detection des liens qui contiennent des blocks : dans ce cas il faut traiter le <a> comme un quasi block et fermer/ouvrir les <p> autour du <a>
detecter_liens_blocs(string $t) : string
Parameters
- $t : string
Return values
stringfermer_para_mano()
Callback fermer-para-mano
fermer_para_mano(string $t) : string
On refait le preg, à la main
Parameters
- $t : string
Return values
stringreplace_tableaux()
Callback de traitement de chaque tableau
replace_tableaux(array<string|int, mixed> $m) : string
Parameters
- $m : array<string|int, mixed>
Return values
stringreplace_puce()
Callback pour la puce qui est définissable/surchargeable
replace_puce() : string
Return values
string —Code HTML d'une puce
inserer_abbr()
Callback pour les Abbr
inserer_abbr(array<string|int, mixed> $m) : string
Parameters
- $m : array<string|int, mixed>
Tags
Return values
string —Code HTML d'une abréviation