Skip to content

Instantly share code, notes, and snippets.

@jamesozzie
jamesozzie / index.php
Created November 22, 2020 22:55
AMP Badge
<?php
/*
Plugin Name: AMP Badge
Plugin URI: http://jamesozz.ie
Description: Showcase the performance of your AMP site with an AMP badge. Allow visitors to check your PageSpeedInsights score or direct them to amp.dev.
Author: James Osborne
Version: 1.0.0
Author URI: https://aztecdesign.ie
*/
@jamesozzie
jamesozzie / mypopup.css
Last active July 8, 2022 20:58
AMP Facebook Messenger - Popup Tutorial
.mypopup_button {
position: fixed;
bottom: 20px;
width: 40px;
height: 40px;
right: 20px;
border: 0px solid #d6d6d6;
z-index: 99;
background: linear-gradient(#CC3366, #0066ff);
border-radius: 40px;
37.228.233.226 - - [23/Oct/2020:13:31:50 +0200] "POST /wp-admin/admin-ajax.php HTTP/1.0" 200 545 "http://plastiskip.com/wp-admin/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36"
62.116.165.86 - - [23/Oct/2020:13:31:51 +0200] "POST /wp-cron.php?doing_wp_cron=1603452711.0752089023590087890625 HTTP/1.0" 200 176 "http://plastiskip.com/wp-cron.php?doing_wp_cron=1603452711.0752089023590087890625" "WordPress/5.5.1; http://plastiskip.com"
37.228.233.226 - - [23/Oct/2020:13:32:29 +0200] "POST /wp-admin/admin-ajax.php HTTP/1.0" 200 545 "http://plastiskip.com/wp-admin/plugins.php?plugin_status=all&paged=1&s" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36"
62.116.165.86 - - [23/Oct/2020:13:32:29 +0200] "POST /wp-cron.php?doing_wp_cron=1603452749.2742860317230224609375 HTTP/1.0" 200 176 "http://plastiskip.com/wp-cron.php?doing_wp_cron=1603452749.2742860317230224609375" "WordPr
@jamesozzie
jamesozzie / index.php
Last active October 14, 2020 20:05
AMP Badge
<?php
/*
Plugin Name: AMP Badge
Plugin URI: http://jamesozz.ie
Description: Showcase the performance of your AMP site with an AMP badge. Link it to PageSpeedInsights or an article of achievement.
Author: James Osborne
Version: 1.0.0
Author URI: https://aztecdesign.ie
*/
@jamesozzie
jamesozzie / amp-wp-sidebar.php
Created January 28, 2020 00:25
AMP-Sidebar: WordPress AMP sidebar plugin. To use simple add the [jz-sidebar] shortcode into a widget or template file. Apply any menu to the newly created "AMP sidebar menu" menu once activated. Appears in AMP URLs only.
<?php
/**
* Plugin Name: AMP - sidebar - jamesozz.ie
* Plugin URI: http://www.jamesozz.ie
* Description: AMP-sidebar component shortcode.
* Version: 1.0
* Author: James Osborne
* Author URI: http://www.jamesozz.ie
*/
@jamesozzie
jamesozzie / searchbox.php
Created January 28, 2020 00:15
Search box for AMP: To use simply add the [jz-search] shortcode in your theme files or within a widget or content.
<?php
/**
* Plugin Name: Search box for AMP - jamesozz.ie
* Plugin URI: http://www.jamesozz.ie
* Description: Search box for AMP, via shortcode. JavaScript free. To use simply add the shortcode [jz-search] in your theme files or within a widget or content.
* Version: 1.0
* Author: James Osborne
* Author URI: http://www.jamesozz.ie
*/
@jamesozzie
jamesozzie / backtotop.css
Last active April 4, 2020 01:13
Back to top WordPress AMP plugin
html {
scroll-behavior: smooth;
}
body {
position: relative;
}
.scrolltop-wrap {
box-sizing: border-box;
position: absolute;
@jamesozzie
jamesozzie / amp_reader_search_and_nav.php
Last active October 8, 2019 13:05
Reader mode: Navigation menu & search popup extension
<?php
/**
* Plugin Name: AMP Reader Mod Search Box and Navigation
*
* @package AMP_Reader_Search_and_Nav
* @author James Osborne, Google
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
* @wordpress-plugin
<!doctype html><html amp i-amphtml-layout lang=en-US prefix="og: http://ogp.me/ns#" transformed="google;v=2"><head><meta charset=UTF-8><style amp-runtime i-amphtml-version=011907152257550>html{overflow-x:hidden!important}html.i-amphtml-fie{height:100%!important;width:100%!important}html:not([amp4ads]),html:not([amp4ads]) body{height:auto!important}html:not([amp4ads]) body{margin:0!important}body{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}[hidden]{display:none!important}html.i-amphtml-singledoc.i-amphtml-embedded{-ms-touch-action:pan-y;touch-action:pan-y}html.i-amphtml-fie>body,html.i-amphtml-singledoc>body{overflow:visible!important}html.i-amphtml-fie:not(.i-amphtml-inabox)>body,html.i-amphtml-singledoc:not(.i-amphtml-inabox)>body{position:relative!important}html.i-amphtml-webview>body{overflow-x:hidden!important;overflow-y:visible!important;min-height:100vh!important}html.i-amphtml-ios-embed-legacy>body{overflow-x:hidden!important;overflow-y:auto
<!DOCTYPE html>
<html amp lang="en-US" prefix="og: http://ogp.me/ns#"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="amp-experiments-opt-in" content="amp-img-auto-sizes"><meta property="og:image" content="https://www.reviewcenter.in/wp-content/uploads/2019/05/LG-Dual-Inverter-AC-Review.jpg"><meta name="description" content="Check out LG Dual Inverter Air Conditioner SmartThinQ model Review with every feature explained, the specifications &amp; electricity consumption stats &amp; more."><meta property="og:locale" content="en_US"><meta property="og:type" content="article"><meta property="og:title" content="LG Dual Inverter Air Conditioner (AC) Review, Features &amp; Specifications"><meta property="og:description" content="Check out LG Dual Inverter Air Conditioner SmartThinQ model Review with every feature explained, the specifications &amp; electricity consumption stats &amp; more."><meta property="og:url" content="https://www.reviewcenter.in/8837