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
.desc-row td{ | |
margin: 0 !important; | |
padding: 0 !important; | |
border: 0 !important; | |
} | |
.description{ | |
padding: 5px 8px; | |
border-bottom: 1px solid #ddd; | |
} | |
.table-row{ |
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
html { | |
min-height: 100%; | |
height: auto; | |
} | |
body{ | |
background: url("../img/bg-top.png"), url("../img/bg-middle.png"), url("../img/bg-bottom.png"); | |
background-repeat: no-repeat,no-repeat, no-repeat; | |
background-position: top center, center center, bottom center; | |
} |
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 is_url_exist($url){ | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_NOBODY, true); | |
curl_exec($ch); | |
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE); | |
if($code == 200){ | |
$status = true; | |
}else{ | |
$status = false; |
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
/** String formatter allows to do like this | |
/* "{0} is dead, but {1} is alive! {0} {2}".format("ASP", "ASP.NET") | |
**/ | |
if (!String.prototype.format) { | |
String.prototype.format = function() { | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function(match, number) { | |
return typeof args[number] != 'undefined' ? args[number] : match; | |
}); | |
}; |
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
//USAGE: $("#form").serializefiles(); | |
(function($) { | |
$.fn.serializefiles = function() { | |
var obj = $(this); | |
/* ADD FILE TO PARAM AJAX */ | |
var formData = new FormData(); | |
$.each($(obj).find("input[type='file']"), function(i, tag) { | |
$.each($(tag)[0].files, function(i, file) { | |
formData.append(tag.name, file); | |
}); |
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 base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, and ABSPATH. You can find more information by visiting | |
* {@link http://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php} | |
* Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
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 array_diff_assoc_recursive($array1, $array2) | |
{ | |
foreach($array1 as $key => $value) { | |
if(is_array($value)) { | |
if(!isset($array2[$key])) { | |
$difference[$key] = $value; | |
} | |
elseif(!is_array($array2[$key])) { | |
$difference[$key] = $value; | |
} |
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 send GET request to server | |
* @param $request_url string Server url | |
* @param $data_array array Assoc array with data | |
* @return bool Status | |
*/ | |
function sendRequest($request_url,$data_array){ | |
// use key 'http' even if you send the request to https://... | |
$options = 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
for i in `ls *.pdf`; do convert "$i" "$i".jpg; done |
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 set_different_post_type_sizes() | |
{ | |
if (!empty($_REQUEST['post_id']) && ctype_digit($_REQUEST['post_id'])) { | |
if ('pedagogues' == get_post_type($_REQUEST['post_id'])) { | |
add_image_size('pedagogues-normal', 207, 250, true); | |
} | |
if ('slider' == get_post_type($_REQUEST['post_id'])) { | |
add_image_size('slider-normal', 891, 310, true); | |
} |
OlderNewer