This file contains hidden or 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 remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) { | |
global $wp_filter; | |
// Check that filter actually exists first | |
if ( ! isset( $wp_filter[ $tag ] ) ) return FALSE; | |
if ( is_object( $wp_filter[ $tag ] ) && isset( $wp_filter[ $tag ]->callbacks ) ) { | |
// Create $fob object from filter tag, to use below | |
$fob = $wp_filter[ $tag ]; | |
$callbacks = &$wp_filter[ $tag ]->callbacks; | |
} else { |
This file contains hidden or 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
angular.module('demo') | |
.config(function ($routeProvider) { | |
$routeProvider | |
.when('/', { | |
templateUrl: 'index.html', | |
controller: 'MainCtrl', | |
controllerAs: 'main' | |
)} | |
.otherwise({ | |
redirectTo: '/' |
This file contains hidden or 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
//to list sinks | |
$ pacmd list-sinks | |
//Control volume | |
//increase volume | |
pactl set-sink-volume (indexno) +5% | |
//decrease volume | |
pactl set-sink-volume (indexno) -5% |
This file contains hidden or 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 category_terms_with_post_builder( $tax_name = 'product_cat', $post_type = 'product' ) { | |
$parent_terms = get_terms( $tax_name, array( | |
'hide_empty' => false, | |
'fields' => 'ids', | |
'parent' => 0 | |
) ); | |
$parent_terms_with_keys = array_combine($parent_terms, $parent_terms); |
This file contains hidden or 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 | |
/* | |
Plugin Name: PMPro Customizations | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for Paid Memberships Pro (14 day trial on level 1) | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ |
This file contains hidden or 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
angular | |
.module('myApp') | |
.directive( '3dcarousel', ['$timeout', function($timeout) { | |
return{ | |
link: function($scope, element, attrs) { | |
$scope.$on('sliderLoaded', function() { | |
$timeout(function() { | |
var actualWidth = angular.element( window ).width() | |
var documentWidth = actualWidth * 0.464 ; | |
var documentHeight = documentWidth * 0.7; |
This file contains hidden or 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 cpm_create_order($customer_data, $the_customer) { | |
global $woocommerce; | |
$product_id = $customer_data['sub_product']; | |
$variation_id = $customer_data['sub_variation']; | |
$user_first_name = $customer_data['first_name']; | |
$user_last_name = $customer_data['last_name']; | |
$user_email = $customer_data['user_email']; | |
$billing_email = $customer_data['user_email']; | |
$billing_state = $customer_data['cpm_state']; |
This file contains hidden or 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
<form id="form-id"> | |
<div class="span6 form-table"> | |
<label for="usr">First Name <b>*</b></label> | |
<input name="first_name" type="text" class="form-control" id="usr" data-required="yes"> | |
<div class="cus-validation-error" style="display:none;"> | |
Please Enter Your First Name. | |
</div> | |
</div> | |
<div class="span6 form-table"> | |
<label for="">E-mail address<b>*</b></label> |
This file contains hidden or 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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
This file contains hidden or 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 angular_menu_builder() { | |
$locations = get_nav_menu_locations(); | |
$menu = wp_get_nav_menu_object($locations['primary']); | |
$menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'order' => 'DESC' ) ); | |
?> | |
<nav class="primary-nav-wrapper"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12 col-sm-12 col-md-12"> |