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
| const CopyText = function() { | |
| let t; | |
| const e = function(e) { | |
| t || (t = document.createElement("textarea"), document.body.appendChild(t)), t.value = e, t.setAttribute("readonly", "true"), t.setAttribute("type", "text"), t.select(), t.setSelectionRange(0, 9999); | |
| try { | |
| return document.execCommand("copy"), !0 | |
| } catch (t) { | |
| return !1 | |
| } finally { | |
| t.setAttribute("type", "hidden") |
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 dynamic_image($url, $width = false, $height = -1, $quality = 80, $compression = 75) | |
| { | |
| $parsed = parse_url($url); | |
| $path = $parsed['path']; | |
| $file_name = basename($path); | |
| $only_path = str_replace($file_name, '', $path); | |
| $public_path = public_path($path); | |
| if(file_exists($public_path)) |
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 | |
| // php >= 7.0 | |
| function paginate ($total, $per_page, $curr_page) | |
| { | |
| $url = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
| $result = []; | |
| $result['html'] = '<div class="pagination">'; | |
| $result['offset'] = ($curr_page - 1) < 0 ? 0 : ($curr_page - 1) * $per_page ; | |
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 | |
| /* | |
| * Resize images dynamically using wp built in functions | |
| * @author Victor Teixeira | |
| * @link http://core.trac.wordpress.org/ticket/15311 | |
| * | |
| * php 5.2+ | |
| * | |
| * Exemple use: |
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
| /* | |
| Just add this JS code in you HTML however you want. it will check all kinds of AdBlocker with JS | |
| */ | |
| var adBlockEnabled = false; | |
| var testAd = document.createElement('div'); | |
| testAd.innerHTML = ' '; | |
| testAd.className = 'adsbox'; | |
| document.body.appendChild(testAd); | |
| window.setTimeout(function() { | |
| if (testAd.offsetHeight === 0) { |
NewerOlder