This file contains 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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
This file contains 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
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
This file contains 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
<script type="text/javascript"> | |
function fisherYates ( myArray ) { | |
var i = myArray.length, j, temp; | |
if ( i === 0 ) return false; | |
while ( --i ) { | |
j = Math.floor( Math.random() * ( i + 1 ) ); | |
temp = myArray[i]; | |
myArray[i] = myArray[j]; | |
myArray[j] = temp; | |
} |
This file contains 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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro | |
# | |
WP_OWNER=changeme # <-- wordpress owner | |
WP_GROUP=changeme # <-- wordpress group | |
WP_ROOT=/home/changeme # <-- wordpress root directory |
This file contains 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 sumobi_eddmp_create_payment( $data ) { | |
if ( wp_verify_nonce( $data['edd_create_payment_nonce'], 'edd_create_payment_nonce' ) ) { | |
// email address of user | |
$email_address = $data['user']; | |
// check to see if a user account doesn't already exist with email address | |
$user_id = username_exists( $email_address ); |
This file contains 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 | |
//do not include the opening tag! | |
// Required Scripts and Styles | |
add_action( 'wp_enqueue_scripts', 'leaven_load_scripts', 15 ); | |
function leaven_load_scripts() { | |
// Responsive Navigation | |
wp_enqueue_style( 'fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), '4.3.0' ); |
This file contains 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
$options = $I->grabMultiple('#selectID option', 'value'); | |
$I->selectOption('select', $options[array_rand($options)]); |
This file contains 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
/** | |
* Configure PHPMailer to send via PHP's mail() | |
* | |
* @param PHPMailer $phpmailer | |
*/ | |
function phpmailer_send_via_mail( $phpmailer ) { | |
$phpmailer->IsMail(); | |
} | |
add_action( 'phpmailer_init', 'phpmailer_send_via_mail', 999 ); |
This file contains 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
/* globals FWP */ | |
/** | |
* JavaScript for FacetWP Infinite Scroll | |
*/ | |
(function( $ ) { | |
'use-strict'; | |
var throttleTimer = null; | |
var throttleDelay = 100; |
This file contains 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 | |
/********************************************Add a custom filed in the categoy*************************/ | |
add_action( 'init', 'wpm_product_cat_register_meta' ); | |
/** | |
* Register details product_cat meta. | |
* | |
* Register the details metabox for WooCommerce product categories. | |
* | |
*/ | |
function wpm_product_cat_register_meta() { |
OlderNewer