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 | |
/** | |
* Obligatory alert of to use the thumbnail before publishing any article | |
*/ | |
function featured_image_requirement() { | |
if(!has_post_thumbnail()) { | |
wp_die( '<div>Your post is without thumbnail!</div><br><button class="button button-primary button-large" onclick="history.go(-1);">Back to posting</button>'); | |
} |
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
DROP FUNCTION IF EXISTS fn_idade; | |
DELIMITER $$ | |
CREATE FUNCTION fn_idade(data_nascimento DATE) | |
RETURNS INT | |
LANGUAGE SQL | |
BEGIN | |
RETURN (Year(Curdate()) - Year(data_nascimento)) -(Right(Curdate(),5) < (Right(data_nascimento,5))); | |
END; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define TAM 100 | |
#define QUA 100 | |
struct Alternativas | |
{ | |
float nota[TAM]; | |
float classificacao[TAM][TAM]; |
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
<!-- Get Head --> | |
<?php wp_head(); ?> | |
<!-- The title --> | |
<?php wp_title(''); ?> | |
<!-- Get Template Directory URI --> | |
<?php echo get_template_directory_uri(); ?> |
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 | |
/** | |
* get_the_date - Retrieves the date the current $post was written | |
*/ | |
get_the_date( $date ); | |
/** | |
* get_comments_number - Retrieves the value of the total number of comments for a post. | |
*/ |
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 | |
// Nav Menu Dropdown Class | |
include_once( CHILD_DIR . '/lib/classes/nav-menu-dropdown.php' ); | |
/** | |
* Mobile Menu | |
* | |
*/ | |
function be_mobile_menu() { |
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
package escola; | |
import java.util.ArrayList; | |
public class Aluno extends Pessoa { | |
private int numeroMatricula; | |
private int anoInicioCurso; | |
private Bolsa bolsa; | |
private ArrayList<Disciplina> disciplinas; |
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 | |
/** | |
* Sanitize String | |
* | |
* @param string $str string to be cleaned | |
* @return string new string without special characters | |
*/ | |
function sanitizeString($str) { | |
$str = preg_replace('/[áàãâä]/ui', 'a', $str); |
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 | |
/** | |
* Get Date array by date | |
* | |
* @param string $myDate Date in the format format dd/mm/yyyy | |
* @return array Date array | |
*/ | |
function getDateArray($myDate) { |
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 | |
$fields = array(); | |
$fields[] = array( | |
"title" => "Nome", | |
"id" => "nome", | |
"type" => "text" | |
); |
OlderNewer