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: 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 |
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
<!-- 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> |
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
/** | |
* 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 { |
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 | |
/** | |
* When exporting using WP default export tool, use the | |
* markdown version when exist. | |
* | |
* @author Vova Feldman | |
* | |
* @param string $content | |
* | |
* @return string |
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 | |
/** | |
* 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; |
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_filter( 'optin_monster_data', 'tgm_om_turn_off_tracking' ); | |
function tgm_om_turn_off_tracking( $data ) { | |
$data['tracked'] = true; | |
return $data; | |
} |
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: Soft disable all WP plugins | |
* Author: Evan Mattson (@aaemnnosttv) | |
* Description: Allows all plugins to be softly disabled and re-enabled using a single constant. | |
* Version: 1.0 | |
* | |
* Usage: Install this under mu-plugins/, and define('SOFT_DISABLE_PLUGINS', true) to soft disable all plugins. | |
* Delete/comment-out the constant definition or set to false to restore all plugins to their previous active states. | |
* |
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 remove_post_thumbnail($metadata, $object_id, $meta_key, $single){ | |
if( isset($meta_key) && '_thumbnail_id' === $meta_key && is_single() ) | |
return false; | |
else | |
return $metadata; | |
} | |
add_filter('get_post_metadata', 'remove_post_thumbnail', true, 4); |
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
/*** TypeKit Fonts ***/ | |
function theme_typekit() { | |
wp_enqueue_script( 'theme_typekit', '//use.typekit.net/hoo8stk.js'); | |
} | |
add_action( 'wp_enqueue_scripts', 'theme_typekit' ); | |
function theme_typekit_inline() { | |
if ( wp_script_is( 'theme_typekit', 'done' ) ) { ?> | |
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> |
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
//* Enqueue Dashicons | |
add_action( 'wp_enqueue_scripts', 'enqueue_dashicons' ); | |
function enqueue_dashicons() { | |
wp_enqueue_style( 'dashicons' ); | |
} | |
//* Customize search form input button text | |
add_filter( 'genesis_search_button_text', 'sk_search_button_text' ); |
NewerOlder