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
add_filter( 'mce_external_plugins', 'my_theme_mce_external_plugins' ); | |
function my_theme_mce_external_plugins( $plugin_array ) { | |
$plugin_array['typekit'] = get_template_directory_uri() . '/typekit.tinymce.js'; | |
return $plugin_array; | |
} |
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
/* | |
* Translit file names to simple chars, | |
* this prevent accents and special chars at file names. | |
***********************************************************************/ | |
function my_sanitize_file_name($filename) { | |
return remove_accents($filename); | |
} | |
add_filter('sanitize_file_name', 'my_sanitize_file_name'); | |
/* |
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
/* | |
* Method "exact" for WP Image Editor | |
* | |
* Usage: exact($image, array(200, 200, true)) using same "resize" arguments from WP Image Editor. | |
* https://codex.wordpress.org/Class_Reference/WP_Image_Editor | |
* | |
* @description: Return the exact size from an image, scaling it when necessary. | |
* @created: 31/07/15 | |
* @param object $image - The WP Image Editor instance | |
* @param array $args - The same arguments from "resize" method |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link href="jquery.qtip.css" rel="stylesheet"> | |
<style> | |
.qtip-chapeu { max-width: 350px; font: 12px/18px Arial, sans-serif !important; } | |
.candidato-info { overflow: hidden; margin-bottom: 10px; } | |
.candidato-info img { float: left; max-width: 90px; max-height: 126px; margin-right: 20px; } |
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
/* | |
* Function findFirst() will search for the first element found in the objects array passed | |
* $.findFirst('selector', [element, document]); | |
*/ | |
$.extend({ | |
findFirst: function(selector, objs) { | |
for (var i in objs) { | |
var elem = jQuery(selector, objs[i]); | |
if (elem.length) return elem; | |
} |
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
function hasCSS(name) { | |
// Checking an array | |
if (typeof name == 'object') { | |
for (var n in name) { | |
if (hasCSS(name[n]) === false) | |
return false; | |
} | |
return true; | |
} |
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
if(!session_id()) | |
session_start(); | |
if(isset($_COOKIE['ci_session'])) { | |
session_unset(); | |
$session = file_get_contents("/var/tmp/ci_session" . $_COOKIE['ci_session']); | |
session_decode($session); | |
} | |
print_r($_SESSION); |
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 | |
// Executa o formulário quando submetido | |
if (!empty($_POST)) { | |
$nome = $_POST['nome']; | |
$mensagem = "Formulário processado $nome!"; | |
} |
NewerOlder