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 | |
define ( 'BP_ENABLE_ROOT_PROFILES', true ); | |
define( 'BP_DEFAULT_COMPONENT', 'settings' ); | |
//dropzone | |
define( 'DROPZONEJS_PLUGIN_URL', get_stylesheet_directory_uri() ); | |
define( 'DROPZONEJS_PLUGIN_VERSION', '0.0.1' ); | |
add_action( 'init', 'dropzonejs_init' ); | |
function dropzonejs_init() { |
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 brg_login_redirect( $redirect_to, $request, $user ) { | |
global $user; | |
//if there's a user with defined roles | |
if ( isset( $user->roles ) && is_array( $user->roles ) ) { | |
//check if it's admin | |
if ( in_array( 'administrator', $user->roles ) ) { | |
//admins can go anywhere | |
return $redirect_to; |
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
#!/bin/bash | |
# Script to lauch WordPress Dev Site | |
NOME="$(date +%s%N | cut -b1-13)" | |
for i in "$@" | |
do | |
case $i in | |
-n=*|--nome=*) | |
NOME="${i#*=}" | |
shift #past argument=value | |
;; |
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 | |
// É aconselhável criar um backup do banco antes | |
// crie a taxonomia cidade na functions do tema | |
add_action('init', 'register_locations'); | |
function register_locations() { | |
register_taxonomy( 'cidade',array ( | |
0 => 'locais', | |
), | |
array( 'hierarchical' => true, |
NewerOlder