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
/** | |
* @package Thz Framework | |
* @author Themezly | |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only | |
* @websites http://www.themezly.com | http://www.youjoomla.com | http://www.yjsimplegrid.com | |
*/ | |
class ThzelGetElementSettings { | |
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
/** | |
* @package YJSG Framework | |
* @copyright Copyright(C) since 2007 Youjoomla.com. All Rights Reserved. | |
* @author YouJoomla | |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only | |
* @websites http://www.youjoomla.com | http://www.yjsimplegrid.com | |
*/ | |
;window.onerror = function(msg, url, line, col, error) { | |
var extra = !col ? '' : '\ncolumn: ' + col; | |
extra += !error ? '' : '\nerror: ' + error; |
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 thz_opengraph() { | |
if (defined('WPSEO_VERSION')) { | |
// if Yoast | |
if (get_post_type() == 'docs') { | |
$og_img = 'CUSTOM IMAGE IF DOCS'; |
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
$('body').on('mousewheel DOMMouseScroll', function(e){ | |
if(typeof e.originalEvent.detail == 'number' && e.originalEvent.detail !== 0) { | |
if(e.originalEvent.detail > 0) { | |
console.log('Down'); | |
$('.thz-sections-slider .slick-next').trigger('click'); | |
} else if(e.originalEvent.detail < 0){ | |
console.log('Up'); | |
$('.thz-sections-slider .slick-prev').trigger('click'); | |
} | |
} else if (typeof e.originalEvent.wheelDelta == 'number') { |
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
(function($) { | |
$(document).ready(function() { | |
$('<span class="featured-img-info">Use an image 500x500px or larger</span>').appendTo('#postimagediv'); | |
}); | |
})(jQuery); |
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 | |
// post type | |
function cpt_items_register() { | |
$cpt_labels = array( | |
'name' => _x( 'Items', 'Post Type General Name', '{domain}' ), | |
'singular_name' => _x( 'Item', 'Post Type Singular Name', '{domain}' ), | |
'menu_name' => esc_html__( 'Items', '{domain}' ), | |
'name_admin_bar' => esc_html__( 'Page Block', '{domain}' ), |
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 | |
/* | |
* Disable Gutenberg globally | |
* use this if you prefer one-liner | |
* add_filter('use_block_editor_for_post', '__return_false'); | |
*/ | |
function _thz_filter_disable_block_editor(){ | |
return false; | |
} | |
add_filter( 'use_block_editor_for_post', '_thz_filter_disable_block_editor' ); |
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
<script type="text/javascript"> | |
(function($) { | |
$(document).ready(function($) { | |
$('.thz-grid-item-title').on('click',function(e){ | |
e.preventDefault(); | |
$(this).parents('.thz-grid-item-in').find('.thz-hover-icon').trigger('click'); | |
}); | |
}); |
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 | |
/** | |
* @package Thz Framework | |
* @author Themezly | |
* @websites http://www.themezly.com | http://www.youjoomla.com | http://www.yjsimplegrid.com | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // No direct access | |
} |
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
/** | |
* GA | |
*/ | |
function _thz_action_add_ga(){ | |
$GAcode = 'XX-XXXXXX-X'; // change with your GA tracking code | |
echo '<script async src="https://www.googletagmanager.com/gtag/js?id=UA-63305981-2"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(\'js\', new Date()); gtag(\'config\', \''.$GAcode.'\'); </script>'; | |
} | |
add_action('wp_footer', '_thz_action_add_ga'); |
NewerOlder