Skip to content

Instantly share code, notes, and snippets.

View zergiocosta's full-sized avatar
👽

Sergio Costa zergiocosta

👽
  • Sydney, AU
  • 19:22 (UTC +10:00)
View GitHub Profile
@zergiocosta
zergiocosta / custom_error_msgs.php
Last active September 3, 2020 15:43
Changing login error message (wp-admin)
<?php
// Insert into your functions.php and have fun by creating login error msgs
function guwp_error_msgs() {
// insert how many msgs you want as array items. it will be shown randomly (html is allowed)
$custom_error_msgs = [
'<strong>YOU</strong> SHALL NOT PASS!',
'<strong>HEY!</strong> GET OUT OF HERE!',
];
// get and returns a random array item to show as the error msg
return $custom_error_msgs[array_rand($custom_error_msgs)];
@zergiocosta
zergiocosta / jQuery UI datepicker pt-br
Created May 18, 2015 18:11
Tradução do módulo datepicker do jQuery UI para português brasileiro
jQuery(function($){
$.datepicker.regional['pt-BR'] = {
closeText: 'Fechar',
prevText: '&#x3c;Anterior',
nextText: 'Pr&oacute;ximo&#x3e;',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
'Jul','Ago','Set','Out','Nov','Dez'],
@zergiocosta
zergiocosta / File structure for general projects
Last active December 20, 2015 14:09
What I'm working with
|
├── api/
├── assets/
│ │ css/
│ │ ├── plugins.css
│ │ ├── print.css
│ │ └── style.css
│ │ fonts/
│ │ images/
│ │ ├── bgs/