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
/* | |
Simple script that gets GET vars from the url in javascript | |
*/ | |
function _getUrlVars() { | |
var vars = [], hash; | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) { | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); |
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 | |
/** | |
* Plugin Name: Elementor Scheme Class Issue | |
* | |
* 1) Create wp-content/mu-plugins folder | |
* 2) Create php file (name doesn't matter) | |
* 3) Copy/Paste | |
**/ | |
namespace Elementor; |
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 | |
/* | |
* This function turns a number into the ordinal word for the number | |
* | |
* Parameter : integer | |
* Returns : string | |
*/ | |
function numToOrdinalWord($num) { | |
$first_word = array('eth','first','second','third','fourth','fifth','sixth','seventh','eighth','ninth','tenth','eleventh','twelfth','thirteenth','fourteenth','fifteenth','sixteenth','seventeenth','eighteenth','nineteenth','twentieth'); |
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 | |
/** | |
* returns the top most ancestor post id for the current post | |
*/ | |
function catchylabs_get_top_parent_page_id() { | |
global $post; | |
$ancestors = $post->ancestors; | |
// Check if page is a child page (any level) | |
if ($ancestors) { |
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 | |
/** | |
* author: Robert Danklefsen | |
* website: https://www.catchylabs.com/ | |
* | |
* simple function for adding extra stuff to your Wordpress site's robots.txt | |
* add to functions.php | |
*/ | |
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 | |
/* | |
* Author: Robert Danklefsen | |
* Website: http://www.catchylabs.com | |
* | |
* This simple widget returns a simple twitter feed using standard OAuth now | |
* required by Twitter's 1.1 API. | |
* | |
* To use this, you must first set up an app in the developer tools at http://dev.twitter.com/apps |
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 | |
/** | |
* Simple function for turning a number into an ordinal string. | |
* source: https://catswhocode.com/php-sanitize-input/ | |
*/ | |
function ordinal($cdnl){ | |
$test_c = abs($cdnl) % 10; | |
$ext = ((abs($cdnl) %100 < 21 && abs($cdnl) %100 > 4) ? 'th' | |
: (($test_c < 4) ? ($test_c < 3) ? ($test_c < 2) ? ($test_c < 1) |
OlderNewer