Skip to content

Instantly share code, notes, and snippets.

@quimo
quimo / functions.php
Last active April 19, 2018 16:57
Rendere i commenti WordPress GDPR compliance
<?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();
@quimo
quimo / project1.php
Created January 10, 2020 10:06
PHP Namespaces
<?php
namespace IFQ\project1;
class Project {
public function __construct() {
printf("Project1\n");
}