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 my own Login Logo | |
function guru_login_logo() { ?> | |
<style type="text/css"> | |
#login h1 a, .login h1 a { | |
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/your-logo.png); | |
height:65px; | |
width:320px; | |
background-size: 320px 65px; | |
background-repeat: no-repeat; | |
padding-bottom: 10px; |
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
<div class="iframe-container"> | |
<iframe class="latestVideoEmbed" vnum="0" cid="UCMhv8E4GMw6erC-9iiYtNFg" allowfullscreen="" width="800" height="480" frameborder="0"></iframe> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script> | |
var reqURL = "https://api.rss2json.com/v1/api.json?rss_url=" + encodeURIComponent("https://www.youtube.com/feeds/videos.xml?channel_id="); | |
function loadVideo(iframe) { | |
$.getJSON(reqURL + iframe.getAttribute('cid'), | |
function(data) { | |
var videoNumber = (iframe.getAttribute('vnum') ? Number(iframe.getAttribute('vnum')) : 0); | |
console.log(videoNumber); |
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 | |
// create your shortcode function | |
function guru_my_shortcode() { | |
// do something here | |
// return text you want to display | |
return $output; | |
} |
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 guru_is_blog () { | |
global $post; | |
$posttype = get_post_type($post ); | |
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; | |
} | |
if (guru_is_blog()) { echo 'You are on a blog page'; } |
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 guru_yearsmarried() { | |
// dates to be calculated | |
$dateMarried = strtotime( '2004-04-22 15:00:00' ); | |
$currentDate = strtotime( current_time ( 'mysql' )); | |
// calculate the time in seconds and convert | |
$seconds = $currentDate - $dateMarried; | |
$years = $seconds / 60 / 60 / 24 / 365.242199; |
OlderNewer