Skip to content

Instantly share code, notes, and snippets.

View swissspidy's full-sized avatar
🌴
On vacation

Pascal Birchler swissspidy

🌴
On vacation
View GitHub Profile
@swissspidy
swissspidy / web-stories-link-sanitizer-custom-attribute.php
Created April 5, 2023 16:22
Example sanitizer to add a custom attribute to links in a story
@swissspidy
swissspidy / web-stories-disable-feed-link.php
Created February 21, 2023 17:00
Mini-plugin to disable the Web Stories plugin's default feed link output
@swissspidy
swissspidy / web-stories-disable-meta-description.php
Created November 8, 2022 12:36
Mini-plugin to workaround potential duplicate meta description issues
<?php
/**
* Plugin Name: Web Stories Disable meta description
* Description: If for some reason you're seeing duplicate meta descriptions for 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
@swissspidy
swissspidy / web-stories-enable-title-tag.php
Created November 2, 2022 08:42
Mini-plugin to workaround potential missing document title issues
<?php
/**
* Plugin Name: Web Stories Enable title tag
* Description: If for some reason you're not seeing `<title>` tags for 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
@swissspidy
swissspidy / web-stories-debug-capabilities.php
Created October 28, 2022 08:09
Mini-plugin to debug the Web Stories plugin's custom capabilities
<?php
/**
* Plugin Name: Web Stories Debug Capabilities
* Description: Debugging plugin if you experience issues with capabilities and custom user roles.
* 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
@swissspidy
swissspidy / web-stories-disable-title-tag.php
Created September 30, 2022 07:56
Mini-plugin to workaround potential duplicate document title issues
<?php
/**
* Plugin Name: Web Stories Disable title tag
* Description: If for some reason you're seeing duplicate `<title>` tags for 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
@swissspidy
swissspidy / web-stories-comscore-analytics.php
Created April 21, 2022 16:48
Sample integration of Comscore analytics code with the Web Stories WordPress plugin.
<?php
/**
* Plugin Name: Web Stories Comscore Analytics
* Description: Sample integration of Comscore analytics code with the Web Stories WordPress plugin.
* 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
@swissspidy
swissspidy / web-stories-additional-gtag.php
Last active September 26, 2023 14:23
Mini-plugin to add an additional Google Analytics tracking code to web stories.
<?php
/**
* Plugin Name: Web Stories Custom Google Analytics
* 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
@swissspidy
swissspidy / web-stories-unhide-media-items.php
Created March 15, 2022 15:03
Mini-plugin to stop hiding generated attachments from the WordPress media library
<?php
/**
* Plugin Name: Web Stories Unhide Generated Media
* Description: Mini-plugin to stop hiding generated attachments from the WordPress media library.
* 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
@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