WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php| <?php | |
| /** | |
| * Written by Amri Shodiq. | |
| * Do not hesitate to copy and paste this code. | |
| * It's not embarassing. | |
| */ | |
| if (!defined('BASEPATH')) | |
| exit ('No direct script access allowed'); |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| #Removes access to the system folder by users. | |
| #Additionally this will allow you to create a System.php controller, | |
| #previously this would not have been possible. | |
| #'system' can be replaced if you have renamed your system folder. | |
| RewriteCond %{REQUEST_URI} ^system.* | |
| RewriteRule ^(.*)$ /index.php?/$1 [L] |
| .jetpack_subscription_widget .widget-wrap { | |
| background: url("images/enews.png") no-repeat 260px 15px; | |
| } | |
| #subscribe-email #subscribe-field { | |
| width: 175px; | |
| padding: 5px; | |
| font-size: 13px; | |
| margin: 10px -2px 0 0; | |
| } |
| <?php | |
| /* | |
| Template Name: Sales Page | |
| */ | |
| //* Add custom body class to the head | |
| add_filter( 'body_class', 'dm_add_body_class' ); | |
| function dm_add_body_class( $classes ) { | |
| $classes[] = 'dm-sales'; |
| <?php | |
| /* | |
| Plugin Name: WooCommerce Subscriptions No $0 Emails | |
| Plugin URI: | |
| Description: Do not send processing or completed renewal order emails to customers when the order or renewal is for $0.00. | |
| Author: | |
| Author URI: | |
| Version: 0.1 | |
| */ | |
| <?php | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; // Prevent direct access | |
| } | |
| /** | |
| * This is an example trigger that is triggered via a WordPress action and includes a user data item. | |
| * Trigger with: do_action('my_custom_action', $user_id ); | |
| */ |
| ;(function($) { | |
| var JA_Custom_Validation = { | |
| /** | |
| * Start the engine. | |
| * | |
| * @since 1.0.0 | |
| */ | |
| init: function() { |
| <?php | |
| add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' ); | |
| function custom_remove_woo_checkout_fields( $fields ) { | |
| // remove billing fields | |
| unset($fields['billing']['billing_first_name']); | |
| unset($fields['billing']['billing_last_name']); | |
| unset($fields['billing']['billing_company']); |
| <?php | |
| add_filter( 'woocommerce_states', 'dw_woocommerce_states' ); | |
| function dw_woocommerce_states( $states ) { | |
| $states['KW'] = array( | |
| 'KWQ' => __('Dasmān','porto'), | |
| 'KWA' => __('Sharq','porto'), | |
| 'KWZ' => __('Mirgāb','porto'), | |
| 'KWW' => __('Jibla','porto'), |