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 | |
| /** | |
| * http://webdeveloperswall.com/php/get-youtube-video-id-from-url | |
| **/ | |
| function extractUTubeVidId($url){ | |
| /* | |
| * type1: http://www.youtube.com/watch?v=9Jr6OtgiOIw | |
| * type2: http://www.youtube.com/watch?v=9Jr6OtgiOIw&feature=related | |
| * type3: http://youtu.be/9Jr6OtgiOIw | |
| */ |
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 | |
| /** | |
| * Latest posts widget | |
| * | |
| * @package magplus | |
| */ | |
| class magplus_WP_Latest_Posts_Widget extends WP_Widget | |
| { | |
| function __construct() | |
| { |
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 | |
| /* | |
| * Visual Composre Map File | |
| */ | |
| function rs_get_current_post_type() { | |
| $type = false; | |
| if( isset( $_GET['post'] ) ) { | |
| $id = $_GET['post']; |
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 | |
| /** | |
| * Slider Style 2 | |
| * | |
| * @package magplus | |
| * @since 1.0 | |
| */ | |
| ?> | |
| <?php |
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
| #stop directory browsing | |
| Options All -Indexes | |
| # SSL Https active Force non-www | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
| RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
| RewriteCond %{HTTPS} !=on | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] |
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
| ini_set('display_errors','Off'); | |
| ini_set('error_reporting', E_ALL ); | |
| define('WP_DEBUG', false); | |
| define('WP_DEBUG_DISPLAY', false); |
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 the product's short description (excerpt) to the WooCommerce shop/category pages. The description displays after the product's name, but before the product's price. | |
| * | |
| * Ref: https://gist.github.com/om4james/9883140 | |
| * | |
| * Put this snippet into a child theme's functions.php file | |
| */ | |
| function woocommerce_after_shop_loop_item_title_short_description() { | |
| global $product; |
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
| /*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/ | |
| /*At least requires the meta viewport tag with content 'width=device-width'*/ | |
| @media only screen and (max-width: 1080px) and (orientation : portrait) { | |
| /* PORTRAIT: | |
| Windows Surface Pro*/ | |
| } | |
| @media only screen and (max-width: 800px) and (orientation : portrait) { | |
| /* PORTRAIT: | |
| Acer Iconia Tab A100 |
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
| //Featured post child function | |
| function rexus_featured_posts() { | |
| global $post; | |
| $enable = of_get_option( 'rexus_enable_featured', '1' ); // Enable disable area. | |
| $tag = of_get_option( 'rexus_featured_tag' ); // Get the user selected tag for the featured posts. | |
| // Bail if disable by user. | |
| if ( ! $enable ) { | |
| return; |
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
| /*================================================== | |
| = Bootstrap 3 Media Queries = | |
| ==================================================*/ | |
| /*========== Mobile First Method ==========*/ | |
| /* Custom, iPhone Retina */ | |
| @media only screen and (min-width : 320px) { | |
| } |