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 | |
/** | |
* | |
* Plugin Name: WooCommerce Enable Reviews - Bulk Edit | |
* Description: Allow enable reviews by bulk edit into WooCommerce | |
* Version: 1.0.0 | |
* Author: Mário Valney | |
* Author URI: http://mariovalney.com | |
* Text Domain: woo-enable-reviews-bulk-edit | |
* |
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
(function ($) { | |
var AddMask = { | |
masks: { | |
phone: function(value) { | |
var new_value = '', | |
value = this.number(value); | |
if (value.length <= 0) { | |
new_value = ''; | |
} else if (value.length < 3) { |
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_filter( 'posts_request', 'gist_posts_request' ); | |
function gist_posts_request( $sql ) { | |
if ( strrpos( $sql, 'value_of_' ) === false ) { | |
return $sql; | |
} | |
$matches = array(); |
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 wrap_with_link( $string ) { | |
/** | |
* The Regex: | |
* | |
* From the start of the string we look for http or https protocols or just "://" | |
* After that we look for one or more not-whitespace string plus dot in the end | |
* After that we look for one not-whitespace-with-2-or-3 string | |
* In the end we look for one '?' or '/' character and than zero or more not-whitespace string |
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
(function ($) { | |
$.fn.humanText = function(options) { | |
var defaults = {}, settings = {}, app = {}; | |
/** | |
* Array of default settings: | |
* | |
* - last_mark: string The mark to last line. Default is period (.); | |
*/ | |
defaults = { |
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 | |
/** | |
* Adding data to table using CSV data | |
* Using WPDB in WordPress but you can use any PHP... | |
* | |
* @link https://dev.mysql.com/doc/refman/5.7/en/load-data.html | |
*/ | |
global $wpdb; |
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
#------------------------------# | |
# Gitignore to WordPress # | |
#------------------------------# | |
*~ | |
.DS_Store | |
.svn | |
.cvs | |
*.bak | |
*.swp |
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 | |
/** | |
* VZR_Updater_Helper | |
* Helper to VZR_Module_Updater | |
* | |
* @package VZR_Example | |
* @subpackage VZR_Module_Updater | |
* @since 1.0.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
<snippet> | |
<content><![CDATA[if ( ${8:\$the_query->}have_posts() ) : ${1:?> | |
${2:<!-- HTML Before Loop -->} | |
<?php }while ( ${9:\$the_query->}have_posts() ) : ${10:\$the_query->}the_post(); ?> | |
${3:<!-- Post Content -->} | |
<?php endwhile;${4: ?> | |
${5:<!-- HTML After Loop-->} | |
<?php }${6:else : ?> | |
${7:<!-- HTML If No Content-->} | |
<?php }endif; |
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
(function( $ ) { | |
$.fn.slickFilterable = function( options ) { | |
/** | |
* A plugin to create a slick we can filter. | |
* | |
* If you are not using Rows you can use slickFilter | |
* (check documentation) otherwise we can provide a valid filter. | |
* | |
* options { |