This plugin detects a long press on any element for a specified amount of time.
- Copy longpress.js to your website
- Include it in your HTML after you include jQuery.
Usage
// dropzoneWordpressForm is the configuration for the element that has an id attribute | |
// with the value dropzone-wordpress-form (or dropzoneWordpressForm) | |
Dropzone.options.dropzoneWordpressForm = { | |
//acceptedFiles: "image/*", // all image mime types | |
acceptedFiles: ".jpg", // only .jpg files | |
maxFiles: 1, | |
uploadMultiple: false, | |
maxFilesize: 5, // 5 MB | |
//addRemoveLinks: true, | |
//dictRemoveFile: 'X (remove)', |
var ajax = (function () { | |
var ajax = {}; | |
ajax.get = function (url, callbackFunc) { | |
var req = prepareRequest('GET', url, callbackFunc); | |
req.send(); | |
} | |
ajax.post = function (url, params, callbackFunc) { | |
var req = prepareRequest('POST', url, callbackFunc); |
library(rjson) | |
trim <- function (x) gsub("^\\s+|\\s+$", "", x) | |
data_dir = 'Documents/playlists/' | |
play_list = list() | |
for(i in list.files(data_dir,"^.*\\.(m3u)$")){ | |
year = substr(i,1,4) # record file specific information, in this case year from playlist group | |
<?php | |
/* Adds all user meta to the /wp-json/wp/v2/user/[id] endpoint */ | |
function sb_user_meta( $data, $field_name, $request ) { | |
if( $data['id'] ){ | |
$user_meta = get_user_meta( $data['id'] ); | |
} | |
if ( !$user_meta ) { | |
return new WP_Error( 'No user meta found', 'No user meta found', array( 'status' => 404 ) ); | |
} |
2 - Autos & Vehicles | |
1 - Film & Animation | |
10 - Music | |
15 - Pets & Animals | |
17 - Sports | |
18 - Short Movies | |
19 - Travel & Events | |
20 - Gaming | |
21 - Videoblogging | |
22 - People & Blogs |
var express = require('express'); | |
var app = express(); | |
var fs = require('fs'); | |
app.listen(3000, function() { | |
console.log("[NodeJS] Application Listening on Port 3000"); | |
}); | |
app.get('/api/play/:key', function(req, res) { | |
var key = req.params.key; |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<div class="wp_org_api"></div> | |
<script> | |
//setUp Post Data | |
var actionType = 'hot_tags'; | |
var number = 10; | |
var timeout = 15; | |
//Parse Post Data | |
var postData = { |
// Usage: node index.js "twitter search string" | |
var request = require('request'); | |
// Grab a bearer token using application-only auth | |
// (doc: https://dev.twitter.com/oauth/application-only) |