I hereby claim:
- I am misfist on github.
- I am misfist (https://keybase.io/misfist) on keybase.
- I have a public key whose fingerprint is 82AD 62AA C3E0 BFF2 834E FA24 DD95 7339 BB45 EBF0
To claim this, I am signing this object:
function boukman_enqueue_scripts() { | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', trailingslashit( get_template_directory_uri() ) . 'js/jquery-1.8.0.min.js', null, null, false ); | |
wp_enqueue_style( 'style-11-23-16', trailingslashit( get_template_directory_uri() ) . 'style-11-23-16.css', null, null, false ); | |
wp_enqueue_style( 'overrides', trailingslashit( get_template_directory_uri() ) . 'overrides.css', null, null, false ); | |
wp_enqueue_style( 'lifetime', trailingslashit( get_template_directory_uri() ) . 'lifetime.css', null, null, false ); | |
wp_enqueue_style( 'fundraiser', trailingslashit( get_template_directory_uri() ) . 'fundraiser.css', null, null, false ); | |
wp_enqueue_style( 'abcs', trailingslashit( get_template_directory_uri() ) . 'abcs.css', null, null, false ); |
I hereby claim:
To claim this, I am signing this object:
# Ignore everything # | |
** | |
!wp-content/ | |
wp-content/** | |
!wp-content/themes/ | |
!wp-content/plugins/ | |
wp-content/themes/** | |
wp-content/plugins/** | |
# Add two rules for each Theme or Plugin you want to include: |
/** | |
* Add the field "spaceship" to REST API responses for posts read and write | |
*/ | |
add_action( 'rest_api_init', 'slug_register_spaceship' ); | |
function slug_register_spaceship() { | |
register_rest_field( 'post', | |
'starship', | |
array( | |
'get_callback' => 'slug_get_spaceship', | |
'update_callback' => 'slug_update_spaceship', |
function bidirectional_acf_update_value( $value, $post_id, $field ) { | |
// vars | |
$field_name = $field['name']; | |
$global_name = 'is_updating_' . $field_name; | |
// bail early if this filter was triggered from the update_field() function called within the loop below | |
// - this prevents an inifinte loop | |
if( !empty($GLOBALS[ $global_name ]) ) return $value; |
<?php | |
/** | |
* Plugin Name: Shortcake UI Pullquote Demo | |
* Plugin URI: | |
* Description: Try Shortcake with pull-quite shortcode | |
* Version: 1.0.0 | |
* Author: Mte90 | |
* License: GPL2 | |
*/ |
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20150227 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
register_post_type('service', | |
array( | |
'labels' => array( | |
'name' => __('Services'), | |
'singular_name' => __('service') | |
), | |
'public' => true, | |
'has_archive' => true, | |
'show_in_rest' => true, //Adds the custom post type to the rest api | |
) |
<?php | |
function my_rest_prepare_post( $data, $post, $request ) { | |
$_data = $data->data; | |
$thumbnail_id = get_post_thumbnail_id( $post->ID ); | |
$thumbnail = wp_get_attachment_image_src( $thumbnail_id ); | |
$_data['featured_image_thumbnail_url'] = $thumbnail[0]; | |
$data->data = $_data; |