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
{ | |
foundPosts: "51", | |
totalPages: 13, | |
places: | |
[{ | |
id: 202, | |
title: "Al-Bake", | |
description: "Al-Bake Shawarma, Afghani Chicken, Chicken Changezi, Malai Kofta, Chicken Talumin Soup", | |
smallPic: "http://10.23.2.207:8080/501/server/htdocs/content/uploads/2014/05/Al-Bake-84x84.jpg", | |
coverPic: "http://10.23.2.207:8080/501/server/htdocs/content/uploads/2014/05/Al-Bake-945x215.jpg", |
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
add_action('after_setup_theme', 'show_price_logged'); | |
function show_price_logged($price) { | |
if (!is_user_logged_in()) { | |
remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart'); | |
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10); | |
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30); | |
remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10); | |
} | |
} |
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
define("PLAYSTORE_LINK", ""); | |
define("APPSTORE_LINK", ""); | |
sny_os_redirect(); | |
function sny_os_redirect() { | |
if(sny_if_android() && PLAYSTORE_LINK){ | |
header("Location: " . PLAYSTORE_LINK); | |
}elseif(sny_if_ios() && APPSTORE_LINK){ | |
header("Location: ".APPSTORE_LINK); |
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
require_once( ABSPATH . 'wp-admin/includes/file.php' ); | |
require_once( ABSPATH . 'wp-admin/includes/image.php' ); | |
$uploadedfile = $_FILES['file']; | |
$upload_overrides = array( 'test_form' => false ); | |
$movefile = wp_handle_upload( $uploadedfile, $upload_overrides ); | |
if ( $movefile ) { | |
$wp_filetype = $movefile['type']; | |
$filename = $movefile['file']; | |
$wp_upload_dir = wp_upload_dir(); |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_extra_width": 1, | |
"caret_style": "phase", | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/User/SublimeLinter/Seti_orig (SL).tmTheme", | |
"copy_with_empty_selection": false, | |
"detect_slow_plugins": false, | |
"drag_text": false, | |
"draw_centered": false, |
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 alter_table(){ | |
global $wpdb; | |
$sql = "ALTER TABLE ".$wpbd -> posts." ADD `likes_count` INT( 11 ) NOT NULL DEFAULT '0'" | |
$wpdb -> query($sql); | |
} | |
function on_create_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { | |
switch_to_blog( $blog_id ); | |
alter_table(); | |
restore_current_blog(); |
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
var deleteSpam = { | |
count: 0, | |
list: null, | |
timeout: 500, | |
//Selector of cross(x) link | |
crossSelector: '.userContentWrapper [aria-label="Delete"]', | |
//Selector for buttons wrapper in overlay box which appears when we click on cross icon | |
overlayPresenseSelector: '.uiOverlayFooter', | |
//Delete button selector on overlay box | |
confirmDeleteButtonSelector: 'button.layerConfirm', |
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 generate_token() { | |
return bin2hex(openssl_random_pseudo_bytes($this->token_length)); | |
} |
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 verify_notification_token($token) { | |
$fields = array( | |
'dry_run' => true, | |
'to' => $token, | |
); | |
$headers = array( | |
'Authorization: key=' . GOOGLE_API_SERVER_KEY, | |
'Content-Type: application/json', | |
); | |
$ch = curl_init(); |
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
@mixin class-generator($classNamespace, $fromValue, $toValue, $multiple, $property, $unit) { | |
@for $i from $fromValue to $toValue { | |
.#{$classNamespace}#{$i*$multiple} { | |
#{$property}: #{$i*$multiple}#{$unit}; | |
} | |
} | |
} | |
@include class-generator(pt, 0, 25, 5, padding-top, px); |