Skip to content

Instantly share code, notes, and snippets.

View yasircs4's full-sized avatar
🎯
Focusing

Yasir Najeeb yasircs4

🎯
Focusing
View GitHub Profile
@yasircs4
yasircs4 / wordpress-firebase.php
Created November 25, 2016 05:49 — forked from derekconjar/wordpress-firebase.php
An example of using Firebase and WordPress together. The idea is to use WP's custom post types and metaboxes to make content management easy, and sync with Firebase so that your websites have access to a real-time JSON feed of your custom data.
<?php
/**
* All custom functions should be defined in this class
* and tied to WP hooks/filters w/in the constructor method
*/
class Custom_Functions {
// Custom metaboxes and fields configuration
@yasircs4
yasircs4 / gist:47a33dc052a007d1922720f4a1b31a44
Created October 31, 2016 09:52 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@yasircs4
yasircs4 / functions.php
Created October 2, 2016 23:43
Enqueue Dashicons with the Genesis Framework.
<?php
//* Do NOT include the opening php tag
//* Enqueue Dashicons
add_action( 'wp_enqueue_scripts', 'enqueue_dashicons' );
function enqueue_dashicons() {
wp_enqueue_style( 'dashicons' );
}