This file contains 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 | |
/** | |
* @wordpress-plugin | |
* Plugin Name: RunCloud Hub | |
* Description: RunCloud server-side caching for WordPress, Nginx FastCGI/Proxy Cache and Redis Object Cache | |
* Author: RunCloud | |
* Author URI: https://runcloud.io/ | |
* Version: 1.2.1 | |
* Requires at least: 4.9 | |
* License: GPL-2.0 or later |
This file contains 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
// Thanks to this gist: [Sample HTML/JS to parse a Google Spreadsheet](https://gist.github.com/terrywbrady/a03b25fe42959b304b1e) | |
var htmlEndPoint = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vREXBtuL2uKofq9ufXsIlytbONUR0-q_tf1Ucm14JpeE5KAdry97CCwvivf3e5NkCAnZ1Xg4qYa0RCo/pubhtml'; | |
(function($){ | |
var parseHtmlTableToJson = function($table){ | |
var data = []; | |
var $headers = $("tr:first-child td", $table); | |
var headers = []; |
This file contains 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
// Thanks to this gist: [Sample HTML/JS to parse a Google Spreadsheet](https://gist.github.com/terrywbrady/a03b25fe42959b304b1e) | |
var id = '1g3471DBNQEg0v_ByMBx1gNDx5cmlN5Ikn3f1DgJtQY8'; | |
var jsonEndPoint = 'https://spreadsheets.google.com/feeds/cells/'+id+'/1/public/values?alt=json'; | |
var parseGoogleSpreadsheetJsonIntoArray = function (response){ | |
// Check the markup hasn't changed | |
if(response.feed && response.feed.entry && response.feed.entry[0] && response.feed.entry[0].gs$cell) { | |
var headings = []; | |
var data = []; |
This file contains 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 my_prefix_filter_ct_template_archive_among_taxonomies($metadata, $object_id, $meta_key, $single) | |
{ | |
$meta_needed = 'ct_template_archive_among_taxonomies'; | |
if (!is_admin() && isset($meta_key) && $meta_needed == $meta_key) { | |
remove_filter('get_post_metadata', 'my_prefix_filter_ct_template_archive_among_taxonomies', 100); | |
$current_meta = get_post_meta($object_id, $meta_needed, true); | |
add_filter('get_post_metadata', 'my_prefix_filter_ct_template_archive_among_taxonomies', 100, 4); |
This file contains 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
(function ($) { | |
var Webflow = window.Webflow || []; | |
Webflow.push(function () { | |
// === Custom Form Handling === | |
// unbind webflow form handling | |
$(document).off('submit'); | |
// new form handling |
This file contains 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 | |
if (!class_exists('myprefix_remove_noindex_category_posts_from_sitemap')) { | |
class myprefix_remove_noindex_category_posts_from_sitemap | |
{ | |
function __construct() | |
{ | |
add_action('wpseo_exclude_from_sitemap_by_post_ids', [$this, 'exclude']); |
This file contains 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 | |
// WP All Import strip host from single image url | |
function reboot_strip_host_from_url_single($featured_image_url){ | |
return str_replace('http://www.example.com/wp-content/', '', $featured_image_url); | |
} | |
// WP All Import strip host from image urls | |
function reboot_strip_host_from_url($featured_image_url, $content_image_urls){ | |
$result = []; |
This file contains 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 reboot_remove_image_dimensions($str){ | |
$re = '/-\d+x\d+\./m'; | |
return preg_replace($re, '.', $str); | |
} | |
function reboot_get_content_images($id){ | |
$p = get_post($id); | |
$doc = new DOMDocument(); |
This file contains 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
[ | |
{ | |
"country": "AD", | |
"en_name": "Andorra", | |
"native_name": "Andorra", | |
"locales": "ca" | |
}, | |
{ | |
"country": "AE", | |
"en_name": "United Arab Emirates", |
NewerOlder