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 | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; // Exit if accessed directly | |
| } | |
| /** | |
| * Plugin Name: Login por CPF | |
| * Description: Permite o usuário se logar utilizando o CPF. | |
| * Author: Felipe Marcos | |
| * Author URI: https://felipe.zip | |
| * License: GNU General Public License v3 or later |
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
| <!-- html code --> | |
| <div class="news-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. | |
| Facere nostrum neque quae aliquid magnam quibusdam nesciunt, | |
| totam sit, autem quas accusamus | |
| </div> | |
| // js code | |
| var size = 10, | |
| newsContent= $('.news-content'), | |
| newsText = newsContent.text(); |
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 | |
| function limitarTexto($texto, $limite){ | |
| $texto = substr($texto, 0, strrpos(substr($texto, 0, $limite), ' ')) . '...'; | |
| return $texto; | |
| } | |
| // String a ser limitada | |
| $string = 'Como limitar caracteres sem cortar as palavras com PHP'; | |
| // Mostrando a string limitada em 25 caracteres. |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <script type="text/javascript" src="jquery-1.7.1.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| $.getJSON('estados_cidades.json', function (data) { |