My personal notes for an opinionated MODX setup.
MODX is an honest down to earth CMS with a whole lot of freedom.
MODX should run on most decent servers.
Important This is work in progress and FAR away from completed.
<?php | |
echo dirname(__FILE__)."<br>"; | |
$locales = ["af_NA", "af_ZA", "af", "ak_GH", "ak", "sq_AL", "sq", "am_ET", "am", "ar_DZ", "ar_BH", "ar_EG", "ar_IQ", "ar_JO", "ar_KW", "ar_LB", "ar_LY", "ar_MA", "ar_OM", "ar_QA", "ar_SA", "ar_SD", "ar_SY", "ar_TN", "ar_AE", "ar_YE", "ar", "hy_AM", "hy", "as_IN", "as", "asa_TZ", "asa", "az_Cyrl", "az_Cyrl_AZ", "az_Latn", "az_Latn_AZ", "az", "bm_ML", "bm", "eu_ES", "eu", "be_BY", "be", "bem_ZM", "bem", "bez_TZ", "bez", "bn_BD", "bn_IN", "bn", "bs_BA", "bs", "bg_BG", "bg", "my_MM", "my", "ca_ES", "ca", "tzm_Latn", "tzm_Latn_MA", "tzm", "chr_US", "chr", "cgg_UG", "cgg", "zh_Hans", "zh_Hans_CN", "zh_Hans_HK", "zh_Hans_MO", "zh_Hans_SG", "zh_Hant", "zh_Hant_HK", "zh_Hant_MO", "zh_Hant_TW", "zh", "kw_GB", "kw", "hr_HR", "hr", "cs_CZ", "cs", "da_DK", "da", "nl_BE", "nl_NL", "nl", "ebu_KE", "ebu", "en_AS", "en_AU", "en_BE", "en_BZ", "en_BW", "en_CA", "en_GU", "en_HK", "en_IN", "en_IE", "en_JM", "en_MT", "en_MH", "en_MU", "en_NA", "en_NZ", "en_MP", "en_PK", "en_PH", "en_SG", "en_Z |
/* exported from acf pro */ | |
[ | |
{ | |
"key": "group_642af70225c29", | |
"title": "Öffnungszeiten", | |
"fields": [ | |
{ | |
"show_column_filter": false, | |
"allow_bulkedit": 0, | |
"allow_quickedit": 0, |
[ | |
{ | |
"key": "group_61e968f1031de", | |
"title": "Allergene", | |
"fields": [ | |
{ | |
"show_column_filter": false, | |
"allow_bulkedit": false, | |
"allow_quickedit": false, | |
"show_column": false, |
<?php | |
/* | |
https://developer.wordpress.org/reference/functions/current_user_can/#comment-4083 | |
Contributed by Ahir Hemant(Woo-Expert) | |
*/ | |
$user = wp_get_current_user(); | |
$allowed_roles = array( 'editor', 'administrator', 'author' ); | |
if ( array_intersect( $allowed_roles, $user->roles ) ) { |
&where=`{ "template:IN" : [ 1,2,3 ] } | |
&where=`{ "template:NOT IN" : [ 1,2,3 ] } | |
&where=`[{"alias:LIKE":"foo%", "OR:alias:LIKE":"%bar"},{"OR:pagetitle:=":"foobar", "AND:description:=":"raboof"}]` |
<?php | |
/* | |
snippet: spamFilter | |
purpose: Check message of email for chinese/russian characters and badwords | |
usage: add snippet to validate rules and customValidator property | |
&validate=`message:email:spamFilter:required` | |
&customValidators=`spamFilter` | |
*/ | |
<?php | |
/* | |
Purpose: Redirect a child resource that is only used to structure content of its parent. | |
Usage: Add this snippet to your child template | |
[[!parentRedirect? | |
&parent=`[[*parent]]` | |
&alias=`[[*alias]]` |