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 rw_image_resize( $attachment_id, $width, $height, $crop = true ) | |
{ | |
$path = get_attached_file( $attachment_id ); | |
if ( ! file_exists( $path ) ) | |
{ | |
return false; | |
} | |
$upload = wp_upload_dir(); |
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 url_get_contents($url) { | |
if (function_exists('file_get_contents') && ini_get('allow_url_fopen')) { | |
$url_get_contents_data = file_get_contents($url); | |
} elseif (function_exists('curl_exec')) { | |
$conn = curl_init($url); | |
curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, true); | |
curl_setopt($conn, CURLOPT_FRESH_CONNECT, true); | |
curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1); |
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 listToDropdown(selector) { | |
var $list = $(selector), | |
$select = $('<select class="btn btn-outline btn-white select-field-menup" />'); | |
// blank | |
$select.append($('<option />').attr('value', '').html('Navegação')); | |
// for each list change to a option in select field | |
$list.children('li').each(function(index, el) { |
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
var sync1 = $('#sync1'), | |
sync2 = $('#sync2'), | |
duration = 300, | |
thumbs = 4; | |
// Sync nav | |
sync1.on('click', '.owl-next', function () { | |
sync2.trigger('next.owl.carousel') | |
}); | |
sync1.on('click', '.owl-prev', function () { |
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
scss/ # Import all ‘-dir.scss’ files | |
| | |
|- abstracts/ | |
| |- __abstracts-dir.scss # Import all abstracts .scss files | |
| |- _fonts.scss # Font Import | |
| |- _mixins.scss # Scss Mixins | |
| |- _variables.scss # Scss Variables | |
| | |
|- base/ | |
| |- __base-dir.scss # Import all base .scss files |
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 | |
/** | |
* Class NexoYoutubeVideos | |
* | |
* Get video list from youtube | |
* Max of 50 videos | |
*/ | |
class NexoYoutubeVideos { |
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 support for comments and trackbacks in post types | |
add_action( 'admin_init', 'nexo_disable_comments_post_types_support' ); | |
function nexo_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ( $post_types as $post_type ) { | |
if ( post_type_supports( $post_type, 'comments' ) ) { | |
remove_post_type_support( $post_type, 'comments' ); | |
remove_post_type_support( $post_type, 'trackbacks' ); | |
} |
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 ChangeLang(a) { | |
var b, elemento = ""; | |
if (document.createEvent) { | |
var c = document.createEvent("HTMLEvents"); | |
c.initEvent("click", true, true) | |
} | |
if (a == 'pt') { | |
elemento = $(".goog-te-banner-frame:eq(0)").contents().find("button[id*='restore']") | |
} else { | |
switch (a) { |