Moved to the offical website: https://processwire.com/docs/tutorials/troubleshooting-guide/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/User/Espresso Soda.tmTheme", | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
"._*" | |
], | |
"folder_exclude_patterns": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); // Outputs "fr", "en", "es", etc... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var fs = require('fs'); | |
module.exports = function (grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Thanks to netcarver > https://processwire.com/talk/topic/7803-implement-array-chunk/?p=75573 | |
$items = $pages->find('#whatever'); // Find your stuff | |
$parts = 3; // How many items should there be in 1 chunk? | |
$chunked = array_chunk($items->getArray(), $parts); | |
foreach ($chunked as $chunk) { | |
foreach ($chunk as $item) { |
- Perceivable
-
Text Alternatives
- Non-text Content
- WCAG 2.0 ID: text-equiv-all
- WCAG 2.1 ID: non-text-content
- Non-text Content
-
Time-based Media
- Audio-only and Video-only (Prerecorded)
- WCAG 2.0 ID: media-equiv-av-only-alt
- Audio-only and Video-only (Prerecorded)
-
- WCAG 2.1 ID: audio-only-and-video-only-prerecorded
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Contact | |
pages: false | |
fields: | |
title: | |
label: Page | |
type: text | |
width: 1/4 | |
subtitle: | |
label: Title | |
type: text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Elements with `data-observe` toggle `data-visible` | |
// between `true` and `false` | |
if ('IntersectionObserver' in window) { | |
const callback = (entries, observer) => { | |
entries.forEach(entry => { | |
entry.target.setAttribute('data-visible', entry.isIntersecting) | |
}) | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple demo on how the new Intersection Observer API can be used to lazy load images. | |
* https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API | |
* | |
* Intersection Observer is available in most modern browsers and there's a decent polyfill, too: | |
* https://github.com/WICG/IntersectionObserver/tree/gh-pages/polyfill | |
*/ | |
let imageNodes = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get browser language, optionally passing a list of available languages. | |
* | |
* @param [array] $available_languages Available languages for the site | |
* @param [string] $default Default language for the site | |
* @return [string] Language code | |
*/ | |
function get_browser_language_code( $available_languages = [], $default = 'en' ) : string | |
{ |
OlderNewer