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 | |
namespace IFQ\project1; | |
class Project { | |
public function __construct() { | |
printf("Project1\n"); | |
} |
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 | |
/** | |
* aggiungo il checkbox privacy in coda di campi di default del form dei commenti | |
* https://www.smashingmagazine.com/2012/05/adding-custom-fields-in-wordpress-comment-form/ | |
* https://codex.wordpress.org/Function_Reference/comment_form | |
*/ | |
add_action( 'comment_form_logged_in_after', 'comment_form_additional_fields' ); | |
add_action( 'comment_form_after_fields', 'comment_form_additional_fields' ); | |
function comment_form_additional_fields() { | |
$commenter = wp_get_current_commenter(); |
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
<IfModule mod_dtimeout.c> | |
<Files ~ “.php”> | |
SetEnvIf Request_URI “index.php” DynamicTimeout=300 | |
SetEnvIf Request_URI “themes.php” DynamicTimeout=300 | |
SetEnvIf Request_URI “wp-admin” DynamicTimeout=300 | |
</Files> | |
</IfModule> |
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 changeCategory() { | |
define('MOVE_TIME_LIMIT', 432000); /* 5 giorni in secondi */ | |
$args = array( | |
'category_name' => 'Categoria1' | |
); | |
$query = new WP_query ($args); | |
if ($query->have_posts()) { | |
while ($query->have_posts()) { | |
$query->the_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
opcache.enable = Off |
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
<div class="download"> | |
<h2 class="download__title">Titolo della sezione 1</h2> | |
<div class="row download__row is-flex"> | |
<div class="col-md-4 column"> | |
<div class="download__item"> | |
<img class="download__item__icon" src="https://www.cabiria.net/wp-content/uploads/2017/03/pdf-icon.png" /> | |
<h3 class="download__item__title">Titolo del documento lungo su due righe</h3> |
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 googleAnalyticsCode() { | |
?> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-XXXXXXXX-X', 'auto'); | |
ga('send', 'pageview'); |
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: Compound | |
* Plugin URI: | |
* Description: Simple WordPress template chunks manager | |
* Version: 1.0 | |
* Author: Simone Alati | |
* Author URI: http://www.simonealati.it | |
*/ |
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
jQuery(function(){ | |
if (jQuery('body.home').length) { | |
var taxonomy = jQuery('li.sf-field-taxonomy-product_cat'); | |
taxonomy.addClass('product_first_cat'); | |
//clono la select della tassonomia e gli aggiungo una classe specifica | |
var taxonomy_clone = taxonomy.clone(); | |
taxonomy_clone.removeClass('product_first_cat').addClass('product_second_cat'); | |
taxonomy_clone.insertAfter(taxonomy); |
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
<section class="in-primo-piano"> | |
<div class="in-primo-piano__content"> | |
<h2>PRODOTTI IN PRIMO PIANO</h2> | |
<div class="product"> | |
<h3 class="product__title">TURBO SMART</h3> | |
<div class="product__description"> | |
<ol class="product__features toggleable"> | |
<!-- feature più importante - ecco perché uso <ol> --> | |
<li class="product__feature"> | |
<h4>ECO SOSTENIBILITÀ</h4> |
NewerOlder