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 timeToString($time) { | |
$t = $time / 60; | |
$t = number_format($t, 2); | |
// Result 1.5; | |
$__t = explode('.', $t); | |
$m = "0.".$__t[1]; | |
$m * 60; | |
$m = $m*60; |
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 | |
/** | |
* @param : $template_name | |
* @Author : Azi Baloch | |
* Description : this function will recognize that is the wordpress current page | |
* using N template or not . | |
* eg . i want to add body id depending on template then i can use this function | |
* to check the currently being used template | |
**/ |
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
// ^([0-9a-zA-Z\._])+@([a-zA-Z0-9])+\.([0-9A-Za-z]){2,4}([\.a-zA-Z0-9]){0,3}+$ | |
// example : (jQuery) Javascript | |
function validateEmail(email){ | |
var pattren = new RegExp("^([0-9a-zA-Z\._])+@([a-zA-Z0-9])+\.([0-9A-Za-z]){2,4}([\.a-zA-Z0-9]){0,3}+$"); | |
if(pttren.test(email)){ | |
return true; | |
} else |
NewerOlder