Skip to content

Instantly share code, notes, and snippets.

View jaworowicz's full-sized avatar

Jakub Jaworowicz jaworowicz

View GitHub Profile
@jaworowicz
jaworowicz / acf_repeater_shortcode.php
Created March 23, 2020 00:11 — forked from FranciscoG/acf_repeater_shortcode.php
An Advanced Custom Fields shortcode that allows to loop through a field with a repeater. This only handles simple cases, it can't handle nested repeater fields
<?php
/**
* ACF Pro repeater field shortcode
*
* I created this shortcode function because it didn't exist and it was being requested by others
* I originally posted it here: https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/
*
* @attr {string} field - (Required) the name of the field that contains a repeater sub group
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc
@jaworowicz
jaworowicz / restapi-disable.php
Created October 15, 2019 23:58
Wyłączenie JSON REST API w WordPress - Plugin i gotowy kod do wklejenia w functions.php
<?php
/**
*
* @link https://jaworowi.cz
* @since 1.0.0
* @package restapi-disable
*
* @wordpress-plugin
* Plugin Name: JSON REST API DISABLE
* Plugin URI: https://jaworowi.cz