Skip to content

Instantly share code, notes, and snippets.

View aristath's full-sized avatar
🏠

Ari Stathopoulos aristath

🏠
View GitHub Profile
<?php
/**
* A plugin to handle skroutz.gr XML generation on a per-product basis.
*
* @since 1.0
* @package woo-skroutz
*
* Plugin Name: Woo Skroutz
* Plugin URI: https://wpmu.io
* Description: Add Skroutz.gr XML generation per-product.
@aristath
aristath / woo-skroutz.php
Created March 8, 2018 23:21
Custom WooCommerce implementation for skroutz.gr XML generation. Requires the woo-brands plugin.
<?php
/**
* Plugin Name: Woo Skroutz XML Generator
* Plugin URI: https://wpmu.io
* Description: Add Skroutz.gr XML generation per-product.
* Author: Aristeides Stathopoulos
* Author URI: https://aristath.github.io
* Developer: WPMU.IO
* Developer URI: https://wpmu.io
* Requires at least: 4.9
@aristath
aristath / show_untranslatable.php
Created February 9, 2018 09:53
A simple WordPress plugin that replaces all translatable characters with underscores, leaving only untranslatable text on the screen. To use, add ?show_untranslatable=1 in the URL.
<?php
/*
* Plugin Name: Underscore translations.
*/
class Underscore_Translations {
public function __construct() {
if ( ! isset( $_GET['show_untranslatable'] ) || '1' !== $_GET['show_untranslatable'] ) {
return;
}
@aristath
aristath / phpcs_phpcompatibility.json
Last active December 20, 2017 17:34
Kirki plugin Tide audit.
{"id":92348,"date":"2017-12-19T12:43:46","modified":"2017-12-19T12:43:46","title":"Kirki Toolkit","content":"<p>The ultimate WordPress Customizer Toolkit<\/p>\n","meta":[],"audit_project":[254],"visibility":"public","version":"3.0.21","checksum":"89db96bcf7bbf6592a307a1cc6936ad8653d2ca1b85d19da5c107d4b9af8e674","project_type":"plugin","source_url":"https:\/\/downloads.wordpress.org\/plugin\/kirki.3.0.21.zip","source_type":"zip","code_info":{"type":"plugin","details":[{"key":"Name","value":"Kirki Toolkit"},{"key":"PluginURI","value":"http:\/\/aristath.github.io\/kirki"},{"key":"Version","value":"3.0.21"},{"key":"Description","value":"The ultimate WordPress Customizer Toolkit"},{"key":"Author","value":"Aristeides Stathopoulos"},{"key":"AuthorURI","value":"http:\/\/aristath.github.io"},{"key":"TextDomain","value":"kirki"}],"cloc":{"php":{"blank":1805,"comment":6634,"code":7237,"n_files":137},"css":{"blank":114,"comment":16,"code":4111,"n_files":8},"sum":{"blank":5812,"comment":9181,"code":34176,"n_files":211},"j
<?php
/**
* A search section.
*
* @package Customizer Search
* @subpackage Core
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
* @license http://opensource.org/licenses/https://opensource.org/licenses/MIT
* @since 1.0.0
*/
@aristath
aristath / custom-post-type-plugin.php
Last active July 21, 2021 13:08
sample theme to test REST
<?php
/**
* Plugin Name: Code Meta fields.
*
* @package My Theme
*/
/**
* Register the post-type.
*/
<?php
/**
* This file implements custom requirements for the Kirki plugin.
* It can be used as-is in themes (drop-in).
*
* @package kirki-helpers
*/
if ( ! class_exists( 'Kirki' ) ) {
<?php
function idesign_customizer_config() {
$url = get_stylesheet_directory_uri() . '/inc/kirki/';
/**
* If you need to include Kirki in your theme,
* then you may want to consider adding the translations here
'output' => array(
array(
'element' => '#content',
'property' => 'background-color',
),
array(
'element' => '#sidebar-1',
'property' => color,
),
),
<?php
// Add our config to differentiate from other themes/plugins
// that may use Kirki at the same time.
Kirki::add_config( 'mytheme', array(
'capability' => 'edit_theme_options',
'option_type' => 'theme_mod',
) );
// Add Section.