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
/* Add async Attributes to Enqueue Scripts where Needed. | |
=========================================================================== */ | |
function itl_script_tag_defer( $tag, $handle ) { | |
if ( is_admin() ) { | |
return $tag; | |
} | |
if ( strpos($tag, '/wp-includes/js/jquery/jquery') ) { | |
return $tag; | |
} |
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
/* Convert string duration to ISO 8601 duration format. | |
=========================================================================== */ | |
function itl_iso8601_duration( $seconds ) { | |
$hours = floor( $seconds / 3600 ); | |
$seconds = $seconds % 3600; | |
$minutes = floor( $seconds / 60 ); | |
$seconds = $seconds % 60; | |
$iso8601 = sprintf( 'PT%s%s%s', |
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
@font-face { | |
font-family: 'vazir-font'; | |
font-weight: normal; | |
font-style: normal; | |
src: url('https://cdn.rawgit.com/rastikerdar/vazir-font/v19.0.0/dist/Vazir.woff') format('woff'); | |
font-display: swap; | |
} | |
#board { | |
padding: 0 15px; | |
} |
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
/* | |
* install stylebot from Chrome Webstore: https://chrome.google.com/extensions/detail/oiaejidbmkiecgbjeifoejpgmdaleoha | |
* import this style from backup (Stylebot Options) | |
*/ | |
{{"https://trello.com/b/":{"_enabled":true,"_rules":{"at1":{"at":true,"text":"@font-face {\n \n font-family: 'vazir-font';\n \n font-weight: normal;\n \n font-style: normal;\n src: url('https://cdn.rawgit.com/rastikerdar/vazir-font/v19.0.0/dist/Vazir.woff') format('woff');\n \n font-display: swap;\n}","type":"@font-face"},"#board":{"padding":"0 15px"},"body":{"background":"#216f95"},"body, button, html, input, select, textarea":{"font-family":"'vazir-font', 'Segoe UI', sans-serif","font-size":"16px"},".window-header:after, .window-module-title:after":{"display":"block","content":"''","clear":"both"},"#board, textarea, .checklist-item-row, .card-detail-fake-text-area, .checklist-item-details-text, .phenom.mod-comment-type .phenom-reactions, .phenom-desc, .action-comment p":{"direction":"rtl","text-align":"right"},"pre, code" |
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
/* Bootstrap pagination. | |
=========================================================================== */ | |
function itl_paging_nav() { | |
global $wp_query, $wp_rewrite; | |
// Setting up default values based on the current URL. | |
$pagenum_link = html_entity_decode( get_pagenum_link() ); | |
$url_parts = explode( '?', $pagenum_link ); | |
// Get max pages and current page out of the current query, if available. |
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 | |
global $wpdb; | |
$sql = " | |
SELECT $wpdb->posts.* | |
FROM $wpdb->posts | |
WHERE $wpdb->posts.post_status = 'publish' | |
AND $wpdb->posts.post_type = 'post' | |
AND $wpdb->posts.post_date < NOW() |
OlderNewer