Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WordPress Real Time

WordPress Real Time

What is Real Time and how to use it inside WordPress.
Version with gifs can be found here:
https://docs.google.com/presentation/d/1ec-JpzrGDAfm6VM7RG8VZqTk-J34ZIEo70ZkLN2gYIg/present?slide=id.g324d53eb4_0_14

Fernando Daciuk

June 13, 2015
Tweet

More Decks by Fernando Daciuk

Other Decks in Programming

Transcript

  1. var config = require('./config.json'); var app = require('express')(); var serveStatic

    = require('serve-static'); var server = require('http').Server(app); var io = require('socket.io')(server); var tw = require('node-tweet-stream')(config); app.js add dependencies
  2. var config = require('./config.json'); var app = require('express')(); var serveStatic

    = require('serve-static'); var server = require('http').Server(app); var io = require('socket.io')(server); var tw = require('node-tweet-stream')(config); app.js add dependencies
  3. var config = require('./config.json'); var app = require('express')(); var serveStatic

    = require('serve-static'); var server = require('http').Server(app); var io = require('socket.io')(server); var tw = require('node-tweet-stream')(config); app.js add dependencies
  4. var config = require('./config.json'); var app = require('express')(); var serveStatic

    = require('serve-static'); var server = require('http').Server(app); var io = require('socket.io')(server); var tw = require('node-tweet-stream')(config); app.js add dependencies
  5. ?

  6. require_once '../vendor/autoload.php'; $id = get_the_ID(); $views = (int) get_post_meta( $id,

    'views', true ); $views++; update_post_meta( $id, 'views', $views ); $emitter = new SocketIO\Emitter(); $emitter->emit( 'post views', $id, $views ); echo $views; single.php
  7. require_once '../vendor/autoload.php'; $id = get_the_ID(); $views = (int) get_post_meta( $id,

    'views', true ); $views++; update_post_meta( $id, 'views', $views ); $emitter = new SocketIO\Emitter(); $emitter->emit( 'post views', $id, $views ); echo $views; single.php
  8. require_once '../vendor/autoload.php'; $id = get_the_ID(); $views = (int) get_post_meta( $id,

    'views', true ); $views++; update_post_meta( $id, 'views', $views ); $emitter = new SocketIO\Emitter(); $emitter->emit( 'post views', $id, $views ); echo $views; single.php
  9. require_once '../vendor/autoload.php'; $id = get_the_ID(); $views = (int) get_post_meta( $id,

    'views', true ); $views++; update_post_meta( $id, 'views', $views ); $emitter = new SocketIO\Emitter(); $emitter->emit( 'post views', $id, $views ); echo $views; single.php
  10. require_once '../vendor/autoload.php'; $id = get_the_ID(); $views = (int) get_post_meta( $id,

    'views', true ); $views++; update_post_meta( $id, 'views', $views ); $emitter = new SocketIO\Emitter(); $emitter->emit( 'post views', $id, $views ); echo $views; single.php
  11. require_once '../vendor/autoload.php'; $id = get_the_ID(); $views = (int) get_post_meta( $id,

    'views', true ); $views++; update_post_meta( $id, 'views', $views ); $emitter = new SocketIO\Emitter(); $emitter->emit( 'post views', $id, $views ); echo $views; single.php