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: Customify Export Default | |
* Plugin URI: # | |
* Description: | |
* Author: | |
* Version: 1.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
<?php | |
/* | |
Plugin Name: Customify Sites REST API | |
Plugin URI: http://customifysites.com/ | |
Description: Add REST API end point for customify demo importer | |
Author: shrimp2t | |
Author URI: http://customifysites.com/ | |
Version: 0.0.1 | |
Text Domain: customify-sites-api | |
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
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 | |
// get_current_screen() | |
//$class= 'updated notice notice-success notice-alt is-dismissible'; | |
// install theme url esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) | |
$theme_slug = 'twentyseventeen'; | |
$install_url = add_query_arg( array( | |
'action' => 'install-theme', | |
'theme' => $theme_slug, |
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 | |
if (is_admin() || is_customize_preview()) { | |
if( class_exists( 'WP_Customize_Section' ) ) { | |
class Customify_Section_Pro extends WP_Customize_Section | |
{ | |
/** | |
* The type of customize section being rendered. | |
* | |
* @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
<?php | |
// Set the file size header | |
header( "Content-Length: " . @filesize( $file_path ) ); | |
// Now deliver the file based on the kind of software the server is running / has enabled | |
if ( stristr( getenv( 'SERVER_SOFTWARE' ), 'lighttpd' ) ) { | |
header( "X-LIGHTTPD-send-file: $file_path" ); |
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 | |
/** | |
* Get the SQL query for getting listings within a given proximity. | |
* | |
* @link https://wordpress.stackexchange.com/a/206560/123815 | |
* @since 1.0.0 | |
*/ | |
public function get_proximity_sql() { | |
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
var icons = []; | |
$('.icon.example').each( function( ) { | |
var group = $( this ); | |
$( '.column > i', group ).each( function(){ | |
var icon = $(this).attr('class') || ''; | |
icons.push( icon ); | |
} ); | |
} ); |
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 ($, window, document) { | |
"use strict"; | |
var customifyWCFiterXHR = false; | |
$.fn.customifyOffCanvas = function ( options ) { | |
var opts = $.extend({ | |
selector : '.woocommerce-listing', | |
}, 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
<?xml version="1.0"?> | |
<ruleset name="WordPress" namespace="WordPress"> | |
<description>WordPress Coding Standards</description> | |
<autoload>./PHPCSAliases.php</autoload> | |
<!--<rule ref="WordPress-Core"/> --> | |
<rule ref="WordPress-Core"> | |
<exclude name="Generic.Commenting.DocComment.MissingShort" /> |
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 | |
// The function to count words in Unicode strings | |
function count_unicode_words( $unicode_string ){ | |
// First remove all the punctuation marks & digits | |
$unicode_string = preg_replace('/[[:punct:][:digit:]]/', '', $unicode_string); | |
// Now replace all the whitespaces (tabs, new lines, multiple spaces) by single space | |
$unicode_string = preg_replace('/[[:space:]]/', ' ', $unicode_string); | |
// The words are now separated by single spaces and can be splitted to an array | |
// I have included \n\r\t here as well, but only space will also suffice | |
$words_array = preg_split( "/[\n\r\t ]+/", $unicode_string, 0, PREG_SPLIT_NO_EMPTY ); |