Skip to content

Instantly share code, notes, and snippets.

Chris Van Patten chrisvanpatten

Block or report user

Report or block chrisvanpatten

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:7aa9fb17501bc154b71f8aa6ce15d089
{"skywordId":281474979915458,"type":"gallery","title":"Brendan Test 9\/17","author":"Author Byline Field","trackingTag":"true","publishAsDraft":false,"fields":[{"name":"seo_title","value":"Testing Revised Gallery - Feb 25th - Title Field","type":"META"},{"name":"toutImage","value":"84982","type":"IMAGE"},{"name":"toutImageCropOrientation","value":"Horizontal","type":"TAXONOMY"},{"name":"toutImageTitle","value":"Tout Image Title Field","type":"TEXT"},{"name":"toutImageCaption","value":"Tout Caption Field","type":"TEXT"},{"name":"toutImageAlt","value":"Tout Alternative Text Field","type":"TEXT"},{"name":"toutImageCredit","value":"Tout Credit Field","type":"TEXT"},{"name":"toutImageFocalPoint","value":"Tout Focal Point Field","type":"TEXT"},{"name":"toutImageRights","value":"restricted","type":"TAXONOMY"},{"name":"toutImageUsage","value":"Tout Image Rights Usage Field","type":"TEXT"},{"name":"socialTitle","value":"Social Title Field","type":"TEXT"},{"name":"socialDescription","value":"Social Description Field","
View 47684.php
<?php
// Filter search endpoint responses.
add_filter( 'rest_post_dispatch', 'wp_47684_filter_response', 10, 3 );
/**
* Resolves the behavior reported in WP Core Trac 47684.
*
* @see https://core.trac.wordpress.org/ticket/47684
*
View gist:200d1e2bb6649249ca2c429117207fb8
### Changed
+ Updated `onecms-shape` to version 1.1.6 ([view changes](https://github.com/TimeInc/onecms-shape/compare/1.1.5...1.1.6))
+ Updated `onecms-plankton-companion` to version 0.9.19 ([view changes](https://github.com/TimeInc/onecms-plankton-companion/compare/0.9.10...0.9.19))
+ Updated `tempo-wordpress-logger` to version 1.5.2 ([view changes](https://github.com/TimeInc/tempo-wordpress-logger/compare/1.5.1...1.5.2))
View gist:0e0546a43a17665b7df8738a2620d70f
### Removed
+ build.download.wp.url
+ onecms
+ onecms-eatingwell
+ onecms-health
+ onecms-msl
+ onecms-realsimple
+ onecms-shape
+ onecms-life
View redirects.sh
#!/bin/bash
# Usage:
#
# ./redirects.sh dev marthastewart < sample.csv
while IFS=, read -r from to
do
wpcli @$1 onecms-srm add $from $to 301 --url=$2.$1.onecms.io
done
View gist:ec4c7362864aa16430891751f6a21ca5
>>> 07/03/2019 08:06pm Content Graph put failed for cms/onecms_posts_bhg_559070.
statusCode: 500
message: statusCode: 500
code: 500
message: There was an error processing your request. It has been logged (ID 96773dc3b91f020b).
details: com.google.common.util.concurrent.UncheckedExecutionException: com.google.gson.JsonSyntaxException: Cat response did not contain a JSON Array
com.google.common.util.concurrent.UncheckedExecutionException: com.google.gson.JsonSyntaxException: Cat response did not contain a JSON Array
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2048)
at com.google.common.cache.LocalCache.get(LocalCache.java:3850)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3874)
View gist:9d2bf8b76c565112690d3b2846626360
{
_type: "category-page-list",
variant: "three-featured",
headline: "Garden Gadgets",
items: [
{
block_content: {
$id: "cms/onecms_posts_bhg_555437"
},
slot: 0
View gist:c1e638378dbfe36a0f44399ad6563da6
### Added
+ onecms-saga
### Changed
+ Updated `onecms-galleries` to version 2.6.11 ([view changes](https://github.com/TimeInc/onecms-galleries/compare/2.6.8...2.6.11))
+ Updated `onecms-category-page` to version 1.4.7 ([view changes](https://github.com/TimeInc/onecms-category-page/compare/1.4.6...1.4.7))
+ Updated `onecms-permalinks` to version 1.6.8 ([view changes](https://github.com/TimeInc/onecms-permalinks/compare/1.6.7...1.6.8))
+ Updated `onecms-menus` to version 1.2.3 ([view changes](https://github.com/TimeInc/onecms-menus/compare/1.2.0...1.2.3))
View gist:e96a06fc3ddacb2c8a4c1a495ac00d10
<?php
add_action( 'rest_api_init', [ $this, 'register_udf_field' ] );
function register_udf_field() {
register_rest_field(
'post',
'onecms_udf',
[
'get_callback' => [ $this, 'get_udf' ],
View gist:da7e3c72e2a008ed8a1a4ddc2f0a8c4a
/**
* Save term meta data.
*
* @param int $cat_id Category ID.
* @return void
*/
public static function create_category_page_data( $cat_id ) {
// Setup the values for the category page.
$author_id = get_current_user_id();
$post_type = 'category-page';
You can’t perform that action at this time.