Open terminal and type:
1. Create a directory at ~/bin:
mkdir ~/bin
2. Copy sublime executable to your ~/bin directory:
| (function() { | |
| var CSSCriticalPath = function(w, d, opts) { | |
| var opt = opts || {}; | |
| var css = {}; | |
| var pushCSS = function(r) { | |
| if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
| var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
| for(var i = 0; i < styles.length; i++) { | |
| if(!!styles[i] === false) continue; | |
| var pair = styles[i].split(": "); |
| <?php | |
| function update_price_wpuf_form( $post_id ) { | |
| $boolChifre = isset( $_POST['pa_chifre'] ) ? $_POST['pa_chifre'] : 0; | |
| $currentPrice = get_post_meta( $post_id, '_regular_price' ); | |
| $images = get_post_meta( $post_id, '_product_image' ); | |
| $images = count($images); | |
| if ( $images > 2 ) { | |
| $currentPrice = 35; | |
| } |
| <?php | |
| function wpuf_get_post_edit_link( $post_id ) { | |
| if ( !class_exists( 'WP_User_Frontend' ) || !$post_id ) { | |
| return; | |
| } | |
| $edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_frontend_posting' ); | |
| $url = get_permalink( $edit_page ); | |
| $url = wp_nonce_url( $url . '?pid=' . $post_id, 'wpuf_edit' ); |
| ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa | |
| ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa | |
| ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa |
| <?php | |
| function wpuf_stick_post( $post_id ) { | |
| $form_id = $_POST['form_id']; | |
| if ( $form_id == 19102 ) { | |
| stick_post($post_id); | |
| } | |
| } | |
| add_action( 'wpuf_add_post_after_insert', 'wpuf_stick_post' ); |
| <?php | |
| // Add user role as body class | |
| function print_user_classes() { | |
| add_filter('body_class','class_to_body'); | |
| } | |
| add_action('init', 'print_user_classes'); | |
| // Add user role class to front-end body tag | |
| function class_to_body($classes) { |
| <?php | |
| function wpuf_unique_product_sku_notice( $error ) { | |
| if ( isset( $_POST['_sku'] ) ) { | |
| global $wpdb; | |
| $sku = $_POST['_sku']; | |
| $product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $sku ) ); |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This is accurate as of WordPress 4.9.
There are a few TODOs left. Please bear with me.
| <?php | |
| global $current_user; | |
| $address_fields = array(); | |
| if ( isset( $_POST['add_line_1'] ) | |
| && isset( $_POST['city'] ) | |
| && isset( $_POST['state'] ) | |
| && isset( $_POST['zip_code'] ) |