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
const merge = require('webpack-merge'); | |
const common = require('./webpack.common'); | |
const TerserPlugin = require('terser-webpack-plugin'); | |
module.exports = merge(common, { | |
mode: 'production', | |
optimization: { | |
minimizer: [ | |
new TerserPlugin() | |
], |
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
const merge = require('webpack-merge'); | |
const common = require('./webpack.common'); | |
module.exports = merge(common, { | |
mode: 'development', | |
devtool: 'inline-source-map' | |
}); |
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
const path = require('path'); | |
const { VueLoaderPlugin } = require('vue-loader'); | |
const output = path.join(__dirname, '../admin/js/dist'); | |
module.exports = { | |
mode: 'development', | |
entry: { | |
'gists-snippet-bundle': './src/index.js' | |
}, |
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
//Define a new component called hello-vue | |
Vue.component('hello-vue', { | |
template: '<div><h3>Hello Vue.js</h3></div>' | |
}); |
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
<div id="app"> | |
<p>{{ greeting }}</p> | |
<input v-model="name"> | |
</div> | |
new Vue({ | |
el: '#app', | |
data: { | |
greeting: 'Hello,', | |
name: 'PDA', |
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 | |
function handle_pda_before_sending_file_hook( $server_data, $link_data ) { | |
//Write code to handle data here | |
} | |
add_action( 'PDA_HOOK_BEFORE_SENDING_FILE', 'handle_pda_before_sending_file_hook', 10, 2 ); | |
?> |
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 | |
if ( class_exists( 'PDA_Private_Link_Services' ) ) { | |
//669 is attachment's id. | |
$result = PDA_Private_Link_Services::protect_file( 669 ); | |
if ( is_wp_error( $result ) ) { | |
echo $result->get_error_message(); | |
} | |
} |
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 | |
if ( class_exists( 'PDA_Private_Link_Services' ) ) { | |
//669 is attachment's id. | |
return PDA_Private_Link_Services::create_private_link( 669, array( | |
'expired_days' => 5, | |
'limit_downloads' => 3, | |
) ); | |
} |
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('the_content', 'pda_convert_img_to_fast_img', 10 ); | |
/** | |
* Convert img tag to fast-img tag in the post's content | |
* @param $content The post's content | |
* | |
* @return mixed The massage content | |
*/ |
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
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/node:8.10 | |
working_directory: ~/lambda_func | |
steps: | |
- checkout |