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 | |
/** | |
* Show user information like IP address, useragent | |
**/ | |
$ip = $_SERVER['REMOTE_ADDR']; | |
$browser = $_SERVER['HTTP_USER_AGENT']; | |
$referrer = $_SERVER['HTTP_REFERER']; | |
if ($referrer == "") { |
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 | |
/** Add Viewport meta tag for mobile browsers */ | |
add_action( 'genesis_meta', 'add_viewport_meta_tag' ); | |
function add_viewport_meta_tag() { | |
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>'; | |
} |
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 | |
add_shortcode('showads468x60', 'ad_display'); | |
function ad_display() { | |
return '<div> | |
<script type="text/javascript"><!-- | |
google_ad_client = "ca-pub-3433716058123456"; | |
/* DigitCodes inPost 468x60 */ | |
google_ad_slot = "9644241234"; | |
google_ad_width = 468; | |
google_ad_height = 60; |
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 | |
/** | |
* Add shortcode for wordpress. | |
* Usage: | |
* - Add the below function in your functions.php file. | |
* - Replace [YOUR ADSENSE AD CODE] with javascript ad code obtained from adsense. | |
**/ | |
add_shortcode('showads468x60', 'ad_display'); | |
function ad_display() { |
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 | |
/** | |
* A simple PHP BBCode Parser function | |
* | |
* @author afsalrahim | |
* @contributors dzhaugasharov, luckydevilru, kylehulton | |
**/ | |
//BBCode Parser function |