Skip to content

Instantly share code, notes, and snippets.

View code-flow's full-sized avatar
😆
happy

Florian code-flow

😆
happy
View GitHub Profile
@code-flow
code-flow / snip-woocommerce-offers-merchants.php
Created April 12, 2024 07:53
Add Merchant fields to WooCommerce offers
<?php
/*
Plugin Name: SNIP WooCommerce Offers Merchants
Description: Adds new fields for merchants in the WooCommerce Offers schema.
Author: Florian Simeth
Version: 0.1.0
Author URI: https://rich-snippets.io
Plugin URI: https://rich-snippets.io/add-merchant-fields-to-woocommerce-offers/
*/
@code-flow
code-flow / snip-yotpo-bridge.php
Created September 1, 2023 07:12
SNIP Yotpo Bridge Plugin
<?php
/*
Plugin Name: SNIP/Yotpo Bridge
Description: Allows to use Yotpo ratings on Structured Data generated with SNIP.
Author: Florian Simeth
Version: 0.3.0
Author URI: https://rich-snippets.io/yotpo-bridge
Plugin URI: https://rich-snippets.io
*/
@code-flow
code-flow / performance.php
Created May 11, 2023 15:02
Deactivate WordPress Plugins in the frontend if they're not needed
<?php
/*
Plugin Name: Plugin-Deactivate-Test
Version: 1.0.0
*/
// Place this file in wp-content/mu-plugins/
add_filter( 'option_active_plugins', 'mu_deactivate_unnecessary_plugins' );
@code-flow
code-flow / wpt-allow-svg.php
Last active October 28, 2021 11:05
Allows the upload of SVG images into WordPress.
<?php
/**
* Plugin Name: Allow SVG
* Plugin URI: https://wp-typ.de/entwicklung/svg-dateien-in-wordpress-erlauben-so-gehts/
* Description: Allows the upload of SVG images into WordPress.
* Requires at least: 5.0
* Requires PHP: 5.6
* Version: 0.1.1
* Author: Florian Simeth
*/
@code-flow
code-flow / snip-permissions.php
Created April 13, 2020 09:28
Permissions for editors in SNIP
<?php
/*
Plugin Name: snip Permissions
Description: Sets permissions to use SNIPs REST API the way you like it.
Version: 0.1.0
*/
add_filter(
'wpbuddy/rich_snippets/rest/permission',
<?php
/*
Plugin Name: SNIP Shortcode Example
Description: A plugin that allows to add shortcode-content to schema properties.
Author: Florian Simeth
Version: 0.1.0
Author URI: https://rich-snippets.io
Plugin URI: https://rich-snippets.io/shortcode-content-in-properties/
*/
@code-flow
code-flow / snip-custom-loop.php
Created January 6, 2020 10:11
Adds a custom loop to SNIP
<?php
/*
Plugin Name: SNIP Custom Loop
Version: 0.1.0
Description: Example that shows how to create custom loops.
*/
add_filter( 'wpbuddy/rich_snippets/fields/loop_subselect/values', 'csnip_loop_values', 10, 1 );
/**
@code-flow
code-flow / snip-comments-field.php
Last active September 30, 2019 09:56
SNIP Comments Field
<?php
/*
Plugin Name: SNIP Comments Field
Description: Allows to integrate comments into Structured Data.
Author: Florian Simeth
Version: 0.1.0
Author URI: https://rich-snippets.io
Plugin URI: https://rich-snippets.io/comments-field-type/
*/
@code-flow
code-flow / snip-basic-field-type.php
Created August 22, 2019 14:26
SNIP Basic Field Type Example
<?php
/*
Plugin Name: SNIP Basic Field Type Example
Description: A plugin that adds a new Field Type in SNIP.
Author: Florian Simeth
Version: 0.1.0
Author URI: https://rich-snippets.io
Plugin URI: https://rich-snippets.io/how-to-add-your-own-field-type/
*/
@code-flow
code-flow / remove-yoast-woocommerce-schema.php
Created August 1, 2019 06:35
Removes Structured Data generated from Yoast SEO for WooCommerce.
<?php
/*
Plugin Name: Yoast SEO: WooCommerce Structured Data Remover
Version: 0.1.0
Description: Removes Structured Data generated from Yoast SEO for WooCommerce.
*/
add_action( 'init', 'wbud_yoast_seo_structured_data_remover' );
function wbud_yoast_seo_structured_data_remover() {