Skip to content

Instantly share code, notes, and snippets.

@aaemnnosttv
aaemnnosttv / as3cf-upload-missing-media-library-items-to-s3.php
Last active December 2, 2023 00:40
AS3CF - Upload all missing media library items to S3
<?php
/**
* For use with Amazon S3 and CloudFront by Delicious Brains
*
* Upload this file to your installation and trigger it with WP-CLI:
* wp eval-file as3cf-upload-missing-media-library-items-to-s3.php
*/
global $as3cf;
@vovafeldman
vovafeldman / functions.php
Last active January 25, 2022 04:23
Freemius - WP Markdown Editor, Exporting
<?php
/**
* When exporting using WP default export tool, use the
* markdown version when exist.
*
* @author Vova Feldman
*
* @param string $content
*
* @return string
/**
* A bookmarklet for viewing the largest contentful paint in a page.
* Will show each LCP after the bookmarklet is clicked.
*
* To install:
* 1. Copy the code starting from the line beginning `javascript:`
* 2. Add a new bookmark in Chrome, and paste the code in as the URL.
**/
javascript:(function(){
try {
@feastdesignco
feastdesignco / modern-homepage-blocks
Last active October 7, 2022 22:37
modern-homepage-blocks
<!-- wp:paragraph -->
<p>First, update your post title to match your site tagline. Then, edit this paragraph to match your homepage's meta description tag, which should tell potential readers what your site specializes in. Keep it to no more than 2-3 sentences.</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2>Trending Recipes</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Edit this paragraph to tell your readers why these recipes are so popular right now</p>
@swissspidy
swissspidy / web-stories-auto-analytics.php
Last active November 23, 2023 09:43
Mini-plugin to add an additional Google Analytics tracking code to web stories
<?php
/**
* Plugin Name: Web Stories Additional GA Tracking
* Description: Mini-plugin to add an additional Google Analytics tracking code to web stories
* Plugin URI: https://wp.stories.google/
* Author: Pascal Birchler, Google
* Author URI: https://opensource.google.com/
* Version: 0.0.1
* License: Apache License 2.0
* License URI: https://www.apache.org/licenses/LICENSE-2.0