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 echo "Ciao Mondo"; ?> |
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 | |
// Creazione Custom Post Type Portfolio | |
add_action( 'admin_init', 'wpam_portfolio' ); | |
function wpam_portfolio(){ | |
$labels = array( | |
'name' => _x('Portfolio', 'la sezione per i nostri lavori', 'tuo-tema'), | |
'singular_name' => _x('Lavoro', 'un elemento del nostro portfolio', 'tuo-tema'), | |
'add_new' => _x('Aggiungi Nuovo', 'elemento', 'tuo-tema'), | |
'add_new_item' => __('Aggiungi un Nuovo Lavoro', 'tuo-tema'), |
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
iMac-di-Andrea:vdAM andreabarghigiani$ wordmove push -s --all | |
▬▬ ✓ Using Movefile: ./Movefile ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ | |
/Library/Ruby/Gems/2.0.0/gems/wordmove-1.1.0/lib/wordmove/deployer/base.rb:23:in `deployer_for': You need to specify an environment with --environment parameter (RuntimeError) | |
from /Library/Ruby/Gems/2.0.0/gems/wordmove-1.1.0/lib/wordmove/cli.rb:56:in `push' | |
from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run' | |
from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command' | |
from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch' | |
from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start' | |
from /Library/Ruby/Gems/2.0.0/gems/wordmove-1.1.0/bin/wordmove:6:in `<top (required)>' |
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
# Configurazione Locale | |
local: | |
vhost: "http://url/locale" | |
wordpress_path: "/percorso/cartella/sviluppo/wordpress" # usa un percorso assoluto | |
database: | |
name: "nome_database" # Nome del Database | |
user: "utente" # Utente MySQL | |
password: "password" # Password MySQL | |
host: "localhost" # URL host MySQL |
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
#Inserisci qua i plugin che vuoi usare | |
#Sintassi Preferita | |
preferred_syntax = :scss | |
#Percorso al progetto | |
http_path = '/' | |
#Cartella CSS | |
css_dir = 'css' | |
#Cartella SASS | |
sass_dir = 'sass' |
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 | |
/* | |
Plugin Name: Carrelli CPT | |
Plugin URI: http://mariocarrelli.com | |
Description: Il CPT per contenere i carrelli e struttura categorie personalizzata | |
Version: 1.0 | |
Author: Andrea Barghigiani | |
Author URI: http://andreabarghigiani.info | |
License: GPL2 (o anche 3 va bene) |
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 | |
/* In qst file aggiungo tutte le modifiche che devono essere applicate grazie a ACF PRO */ | |
/* Rimuovo il titolo dai post */ | |
function remove_title(){ | |
remove_post_type_support('post', 'title'); | |
} | |
add_action( "admin_init", "remove_title" ); |
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 | |
//Manca l'inserimento di un parametro da passare alla funzione | |
function riduci_stringa($stringa){ | |
//Il secondo parametro di substr() era sbagliato | |
//perchè nn serve un negativo. | |
//puoi approfondire su: http://php.net/manual/en/function.substr.php | |
echo substr( $stringa, 2); |
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 | |
//OK per la dichiarazione di un Array | |
//Ricorda che gli indici partono da 0 | |
$piovono_polpette = array( | |
"Pollaccione", //indice 0 | |
" Bred", //indice 1 | |
"Diventa", //indice 2 | |
" Gattaccio", //indice 3 | |
" Breddaccio", //indice 4 |
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 | |
//Manca proprio tutta la definizione della funzione | |
function conto_alla_rovescia( $int ){ | |
$int = intval($int); //Mi assicuro che sia un intero | |
$m = $int; //Mi creo una variabile per contare i passi | |
for( $i = 0; $i < $m; $i++ ){ | |
echo $int-- . "<br />"; | |
} | |
} |
OlderNewer