Descreva o projeto.
Descreva o processo de instalação
| // limitador de caracteres | |
| var limitText = function() { | |
| var count = 600; // value limit caracter | |
| var txt = document.forms[0].text.value; | |
| var len = txt.length; | |
| var countText = document.getElementById("your-counter"); // create element your html | |
| if(len > count){ | |
| txt = txt.substring(0,count); | |
| document.forms[0].text.value = txt; | |
| return false; |
| #maps { | |
| width: 100%; | |
| height: 100%; | |
| } | |
| // this is solution | |
| #maps img { | |
| max-width: inherit; | |
| } |
| Array.prototype.remove = function(i) { | |
| var index; | |
| if( ( index = this.indexOf( i ) ) !== -1 ) { | |
| this.splice( index , 1 ); | |
| } | |
| return this | |
| }; |
| function scrollUp() { | |
| var content_animate = $(jQuery.browser.webkit ? "body": "html"); // bug fix to animate on firefox and uses to opera and ie. | |
| var _position = content_animate.scrollTop(); | |
| if(_position > 0) { | |
| content_animate.animate({ | |
| scrollTop: 0 | |
| }, 1500); | |
| } | |
| } |
| <?php | |
| //função do curl baseado no script do David Walsh (http://davidwalsh.name/) | |
| function curl_get_result($url) { | |
| $ch = curl_init($url); | |
| $timeout = 50; | |
| curl_setopt($ch,CURLOPT_URL,$url); | |
| curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); | |
| curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); | |
| $data = curl_exec($ch); |
| <?php | |
| // adiciona o post ao WordPress | |
| add_action('wp_ajax_nopriv_post_insert', 'post_insert'); | |
| add_action('wp_ajax_post_insert', 'post_insert'); | |
| function post_insert(){ | |
| require_once(ABSPATH . 'wp-admin/includes/image.php'); | |
| if('POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] )) { |