Skip to content

Instantly share code, notes, and snippets.

View shameemreza's full-sized avatar
🇧🇩
Talk is cheap. Check My Code, Blog and Portfolio.

Shameem Reza shameemreza

🇧🇩
Talk is cheap. Check My Code, Blog and Portfolio.
View GitHub Profile
@amrishodiq
amrishodiq / Lbs.php
Created April 2, 2012 07:57
PHP Code Igniter library class to get latitude & longitude, get address for specified latitude & longitude, get direction from one place to another place, and so on. Most LBS concept I implemented with 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');
@keithmorris
keithmorris / .htaccess
Created June 30, 2012 12:09
CodeIgniter .htaccess file
<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]
@srikat
srikat / style.css
Created January 13, 2014 02:17
CSS to make the output of Jetpack Subscription widget better in Genesis child theme, News 2.1.2. Details with screenshots: https://twitter.com/srikat/status/422551589824376832
.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;
}
@DustonMcGroarty
DustonMcGroarty / genesis-sales-page.php
Last active July 14, 2019 20:46
Genesis Sales Page Template
<?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';
@thenbrent
thenbrent / no-renewal-emails-for-zero-reneawl.php
Last active June 26, 2024 15:12
Do not send renewal order emails when the email relates to a $0 renewal.
<?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
*/
@danielbitzer
danielbitzer / class-custom-trigger.php
Last active August 26, 2024 15:25
AutomateWoo Custom Trigger Example
<?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 );
*/
@remcotolsma
remcotolsma / README.md
Last active December 21, 2023 14:13
WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more

WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more

Brew

http://brew.sh/

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
@jaredatch
jaredatch / custom-validation.js
Last active October 18, 2024 02:02
WPForms adding a custom validation rule
;(function($) {
var JA_Custom_Validation = {
/**
* Start the engine.
*
* @since 1.0.0
*/
init: function() {
@cryptexvinci
cryptexvinci / remove_checkout_fields.php
Last active October 3, 2024 14:20
Remove fields from WooCommerce checkout page.
<?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']);
@pbrocks
pbrocks / install-phpcs-with-homebrew.md
Last active June 3, 2024 14:27
Install phpcs with Homebrew

Install phpcs with Homebrew

To set up php linting, you’ll want to install this PHP CodeSniffer repo and configure with this WordPress Coding Standards repo: . There are a number of ways to do this, whether direct download, Composer, Homebrew, Pear, etc. The following is what works for me on MacOS using Homebrew:

In a terminal window on your Mac, start by updating your Homebrew.

brew doctor

Then install the Code Sniffer: