Skip to content

Instantly share code, notes, and snippets.

View ventouris's full-sized avatar

Tasos Ventouris ventouris

  • Greece
View GitHub Profile
// The button to add the regular product
<a class="btn btn-addcart add_to_cart" data-count="1" data-pid="284">Add to cart</a>
// dropbox created dynamically from backend
<div class="add-on-service talktime-options hidden-box" id="talktime-options-284" style="display: block;">
<select class="form-control" id="select-extra-time-284">
<option>Please select an option</option>
<option data-attributename="pa_additional-talktime" data-slug="30mins" value="7804">30mins (+$3.00)</option>
<option data-attributename="pa_additional-talktime" data-slug="60mins" value="7805">60mins (+$6.00)</option>
</select>
add_action('plugins_loaded', 'stp_pop_init');
if (!function_exists('stp_pop_init')){
function stp_pop_init() {
add_action('init', 'stp_pop_setup', 9999);
wp_register_style(
'stp_bootstrap_theme_css',
plugins_url( '/assets/css/bootstrap-theme.css', __FILE__ ),
false,
const helpers = require('./helpers');
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev
/**
* Webpack Plugins
*/
const DedupePlugin = require('webpack/lib/optimize/DedupePlugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const IgnorePlugin = require('webpack/lib/IgnorePlugin');
@ventouris
ventouris / webpack.dev.js
Created May 23, 2017 09:35
webpack.dev.js
const helpers = require('./helpers');
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev
/**
* Webpack Plugins
*/
const DefinePlugin = require('webpack/lib/DefinePlugin');
const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin');
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
$lang = get_bloginfo("language");
if ( $lang == 'de-DE' ) {
add_action('init', 'search_base_german');
function search_base_german() {
$search_slug = 'suche'; // change slug name
$GLOBALS['wp_rewrite']->search_base = $search_slug;
}
}