This file contains hidden or 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
// unique.js | |
const unique = (array, newArray = [], index = 0) => { | |
if (index === array.length) return newArray; | |
if (!newArray.includes(array[index])) newArray.push(array[index]); | |
index += 1; | |
return unique(array, newArray, index); | |
} | |
export default unique; |
This file contains hidden or 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 unique(array, newArray, index) { | |
if (index === array.length) return newArray; | |
if (newArray.indexOf(array[index]) === -1) newArray.push(array[index]); | |
index += 1; | |
return unique(array, newArray, index); | |
} | |
// unique([1, 2, 2, 3, 4, 5, 5], [], 0); | |
// [1, 2, 3, 4, 5] |
This file contains hidden or 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 base configuration for WordPress | |
* | |
* The wp-config.php creation script uses this file during the | |
* installation. You don't have to use the web site, you can | |
* copy this file to "wp-config.php" and fill in the values. | |
* | |
* This file contains the following configurations: | |
* |
This file contains hidden or 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 ( ! function_exists( 'pagination' ) ) : | |
function pagination($pages = '') { | |
global $paged; | |
if(empty($paged)) $paged = 1; | |
if($pages == '') |
This file contains hidden or 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
*.log | |
advanced-cache.php | |
backup-db/ | |
backups/ | |
blogs.dir/ | |
cache/ | |
upgrade/ | |
uploads/ | |
wp-cache-config.php |
This file contains hidden or 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 pgp_filter( $query ) { | |
if ( $query->is_main_query() && !is_admin() ) { | |
$query->set( $key, $value ); | |
} | |
} | |
add_action( 'pre_get_posts', 'pgp_filter' ); |
This file contains hidden or 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
.gform_fields { | |
list-style-type: none; | |
margin-right: -15px; | |
margin-left: -15px; | |
padding: 0; | |
} | |
.gfield { | |
margin-bottom: 15px; | |
padding-right: 15px; |
This file contains hidden or 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 product to request list | |
function add_product_id($product_id) { | |
$product_ids = get_product_ids(); | |
// If product id is in array, return | |
if (in_array($product_id, $product_ids)) { | |
return; | |
} |