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 namespace GM; | |
| use Traversable; | |
| use JsonSerializable; | |
| /** | |
| * Stateless class that recursively convert an array or a traversable object into a nested array. | |
| * Optionally convert all "atomic" items to strings and optionally HTML-encode all strings. | |
| * Array and traversable objects are all recursively converted. | |
| * Non-traversable objects are converted to array, in 1st available among following methods: |
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 namespace GM\FSDFM; | |
| /** | |
| * Plugin Name: Fullscreen Distraction-Free Mode (pre v4.1) | |
| * Description: Allows to use the distraction-free mode that was active pre 4.1 WP version. | |
| * Plugin URI: https://gist.github.com/Giuseppe-Mazzapica/c081ce03a68b00d983d5 | |
| * Author: Giuseppe Mazzapica | |
| * Author URI: https://gm.zoomlab.it | |
| * License: MIT | |
| * Version: 1.0.0 | |
| */ |
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 namespace GM; | |
| use SplObjectStorage; | |
| class Optimum | |
| { | |
| private $data; | |
| private $raw; | |
| private $map; | |
| private $storage; |
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 | |
| array_walk($GLOBALS['wp_query']->posts, function($post, $i, $wp_query) { | |
| $GLOBALS['post'] = $post; | |
| $wp_query->the_post(); | |
| // loop code | |
| the_title(); | |
| the_content(); |
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 namespace GM; | |
| class PointersManager implements PointersManagerInterface { | |
| private $pfile; | |
| private $version; | |
| private $prefix; | |
| private $pointers = array(); | |
| public function __construct( $file, $version, $prefix ) { |
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 | |
| namespace GM\VirtualPages; | |
| /** | |
| * @author Giuseppe Mazzapica <[email protected]> | |
| * @license http://opensource.org/licenses/MIT MIT | |
| */ | |
| class Controller implements ControllerInterface { | |
| private $pages; |
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
| function queried_posts_terms( $taxonomies = 'category' ) { | |
| global $wp_query, $wpdb; | |
| if ( empty( $wp_query->posts ) ) return FALSE; | |
| $ids = wp_list_pluck( $wp_query->posts, 'ID' ); | |
| $taxonomies = array_filter( (array) $taxonomies, function( $tax ) { | |
| if ( is_string( $tax ) ) { | |
| $tax = sanitize_title( $tax ); | |
| return taxonomy_exists( $tax ) ? esc_sql( $tax ) : NULL; | |
| } | |
| } ); |
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 namespace GM\WWWPostThumbnail; | |
| /** | |
| * Plugin Name: WWW Post Thumbnail | |
| * Description: Allow to use an external image url as featured image. | |
| * Plugin URI: https://gist.github.com/Giuseppe-Mazzapica/928bc22e5f49a654cf7c | |
| * Author: Giuseppe Mazzapica | |
| * Author URI: https://github.com/Giuseppe-Mazzapica | |
| * License: MIT | |
| * Version: 0.1.0 | |
| * |
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
| <!doctype html> | |
| <html lang=""> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Muschiatini Dixit</title> | |
| <meta name="description" content="Muschiatini Dixit"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" /> | |
| </head> |