- llms-full.txt - All docs files except migrations docs
- llms-small.txt - Excludes examples
- llms-tiny.txt - Includes only the main docs
This file contains hidden or 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 | |
| /* | |
| Plugin Name: Disable REST API for anonymous users | |
| */ | |
| /** | |
| * Remove all endpoints except SAML / oEmbed for unauthenticated users | |
| */ | |
| add_filter( 'rest_authentication_errors', function($result) { | |
| if ( ! empty( $result ) ) { |
This file contains hidden or 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
| /// <reference types="@sveltejs/kit" /> | |
| /// <reference no-default-lib="true"/> | |
| /// <reference lib="esnext" /> | |
| /// <reference lib="webworker" /> | |
| // https://kit.svelte.dev/docs/service-workers#type-safety | |
| const sw = self as unknown as ServiceWorkerGlobalScope; | |
| import { build, files, version } from '$service-worker'; |
This file contains hidden or 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
| name: 'Bundle Size Comparison' | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest |
This file contains hidden or 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 | |
| add_action('save_post', array($this, 'mark_parent_categories'), 11); | |
| /** | |
| * Marks parent categories automatically. Works with the ACF taxonomy selector as well. | |
| * | |
| * @return mixed | |
| */ | |
| function mark_parent_categories($post_id) { | |
| global $post; |
This file contains hidden or 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 | |
| /** | |
| * Function that gets recent posts | |
| */ | |
| function get_recent_posts() { | |
| //No cache | |
| if(!wp_cache_get('my_complex_query_result')) { | |
| //This is the super slow query. |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: Simple Popular Posts Lite | |
| Plugin URI: - | |
| Description: - | |
| Version: 2015.03.01 | |
| Author: khromov | |
| Author URI: http://snippets.khromov.se | |
| License: GPL2 | |
| */ |
This file contains hidden or 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
| // Example: <div use:focused={(e) => console.log('Focused, event:', e)}> | |
| export default function focused(node: HTMLElement, callback: Function) { | |
| const handleFocusEvents = (event: Event) => { | |
| callback(event) | |
| }; | |
| window.addEventListener('online', handleFocusEvents); | |
| window.addEventListener('focus', handleFocusEvents); |
This file contains hidden or 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
| node_modules | |
| README.md | |
| .svelte-kit | |
| npm-debug.log* | |
| yarn-debug.log* | |
| yarn-error.log* | |
| .pnpm-debug.log* | |
| .env*.local | |
| .env.local | |
| .env |
This is an example implementation of DiceBear Avatars for WordPress comments.
You can see a demo for this plugin at the bottom of this post:
https://unwanted.cloud/2022/09/24/nanoleaf-privacy-review/
Screenshot:
https://snippets.khromov.se/wp-content/uploads/2022/09/dicebear-avatars.png
NewerOlder