This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'ppwp_ppf_action_url', 'ppwp_get_custom_ppf_action_url', 999, 1 ); | |
/** | |
* Replace the default URL to current page. | |
* | |
* @param string $default_url The default URL. | |
* | |
* @return mixed | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'plugin_loaded', 'add_prophoto_middleware' ); | |
function add_prophoto_middleware() { | |
add_action('pp_render_content', 'ppw_check_password_protection' ); | |
add_action('wp', 'ppw_prevent_caching' ); | |
} | |
function ppw_prevent_caching() { | |
global $post; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"extends": [ | |
"prettier", | |
"airbnb" | |
], | |
"plugins": [ | |
"react", | |
"jsx-a11y" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"devDependencies": { | |
"@babel/core": "^7.9.0", | |
"@babel/preset-env": "^7.9.0", | |
"autoprefixer": "^6.7.7", | |
"babel-core": "^6.26.3", | |
"babel-eslint": "^7.1.1", | |
"babel-loader": "^7.1.5", | |
"babel-plugin-import": "^1.13.0", | |
"babel-plugin-transform-object-rest-spread": "^6.23.0", | |
"babel-plugin-transform-regenerator": "^6.22.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
'use strict'; | |
$(document).ready(function () { | |
// Init jPlayer. | |
$("#jquery_jplayer_1").jPlayer({ | |
cssSelectorAncestor: "#jp_container_1", | |
swfPath: "/js", | |
supplied: "mp3, oga", | |
useStateClassSkin: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pda_s3_pre_sync', 'pda_fix_nmedia_files' ); // Add this line if you are using PDA S3 Integration | |
add_action( 'pda_before_protect_file', 'pda_fix_nmedia_files' ); | |
/** | |
* Try to correct the _wp_attached_file data. | |
* | |
* Files are uploaded by nmedia plugin its _wp_attached_file are post_url. | |
* This function tries to correct them: | |
* 1. Get the post parent because nmedia creates two kind of post data. One appears in the WordPress Media UI and its parent is managed by nmedia. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
'use strict'; | |
$(window).load(function () { | |
$('video').on('ended', function (evt) { | |
console.log('Video ended'); | |
}); | |
}); | |
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$mine_types = array( | |
'txt' => 'text/plain', | |
'htm' => 'text/html', | |
'html' => 'text/html', | |
'php' => 'text/html', | |
'css' => 'text/css', | |
'js' => 'application/javascript', | |
'json' => 'application/json', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'attachment', | |
'post_status' => 'any', | |
'meta_query' => array( | |
array( | |
'key' => '_pda_protection', | |
'value' => '1' | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>test upload by chunk</title> | |
</head> | |
<body> | |
<input type="file" id="f" /> | |
<script src="script.js"></script> |