This commit is contained in:
2026-01-11 19:39:55 +01:00
commit c1042c9cde
98 changed files with 9086 additions and 0 deletions

13
doc/config/boxes.tex Normal file
View File

@@ -0,0 +1,13 @@
\tcbset{
warningstyle/.style={
colback=yellow!10!white,
colframe=red!50!black,
fonttitle=\bfseries,
}
}
\newtcolorbox{warnbox}[1][]{
warningstyle,
title=\faWarning{} Warning,
#1
}

34
doc/config/commands.tex Normal file
View File

@@ -0,0 +1,34 @@
% Print WordPress name.
\NewDocumentCommand{\WP}{ s }{%
\IfBooleanTF{#1}{\textsc{wp}\xspace}{WordPress\xspace}%
}
% Print ACF name.
\NewDocumentCommand{\acf}{ s }{%
\IfBooleanTF{#1}{\textsc{acf}\xspace}{Advanced Custom Fields\xspace}%
}
% Print RHPZ name.
\NewDocumentCommand{\rhpz}{ s }{%
\IfBooleanTF{#1}{\textsc{RHPZ}\xspace}{Romhack Plaza\xspace}%
}
% Show directory structure.
\NewDocumentCommand{\dir}{ s m }{%
\textcolor{violet}{\textsl{#2\IfBooleanF{#1}{.php}}}\xspace%
}
\NewDocumentCommand{\sourceargs}{ m }{
\textbf{Parameters}: \begin{itemize}%
#1%
\end{itemize}%
}
\NewDocumentCommand{\sourcereturn}{ m }{
\textbf{Return}: \begin{itemize}%
#1%
\end{itemize}%
}
\NewDocumentCommand{\sourceexample}{ m m m }{
\textbf{Example}: %
\lstinputlisting[firstnumber=1,linerange={#2-#3}]{#1}%
}

52
doc/config/listings.tex Normal file
View File

@@ -0,0 +1,52 @@
\lstset{
language=PHP,
alsoletter={\$},
basicstyle=\ttfamily,
numbers=left,
frame=single,
breaklines=true,
breakatwhitespace=true,
columns=flexible,
keywordstyle=\color{blue},
keywordstyle=[2]\color{teal}, % Var & Useful functions.
keywordstyle=[3]\color{purple},
commentstyle=\color{lightgray}\itshape,
stringstyle=\color{orange},
numberstyle=\color{lightgray},
showstringspaces=false,
morekeywords={
require_once,
public,
protected,
private,
final,
static,
function,
return,
function,
namespace,
global,
defined,
class,
abstract,
interface,
new,
string,
int,
}, % PHP Keywords.
morekeywords=[2]{
\$_romhackplaza,
\$_romhackplaza_theme,
\$post_id,
\$this,
\$post_types,
\$context,
}, % Plugin useful vars.
morekeywords=[3]{
do_action,
add_action,
add_filter,
apply_filters,
CPT
} % Plugin & WP useful functions.
}