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 | |
// Published under GPL | |
// tutorial here: https://codeable.io/community/how-to-import-json-into-wordpress/ | |
class Developer_Import { | |
public function __construct() { | |
add_action( 'wp_ajax_import_developer', array( $this, 'import_developer' ) ); |
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
/* Bootstrap 4.1.0 - https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css */ | |
.accordion | |
.active | |
.alert | |
.alert-danger | |
.alert-dark | |
.alert-dismissible | |
.alert-heading | |
.alert-info |
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 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. |