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 | |
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
if( ! class_exists('ACF_Media') ) : | |
class ACF_Media { | |
/** | |
* Constructor. |
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 | |
/** | |
* acf_get_meta | |
* | |
* Returns an array of "ACF only" meta for the given post_id. | |
* | |
* @date 9/10/18 | |
* @since 5.8.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 | |
add_action('acf/init', 'my_acf_blocks_init'); | |
function my_acf_blocks_init() { | |
acf_register_block_type(array( | |
'name' => 'test-js', | |
'title' => __('Test JS'), | |
'description' => __('A block for testing JS.'), | |
'render_template' => 'template-parts/blocks/test-js/test-js.php', |
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
// Do nothing. |
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 acf_get_value( $post_id, $field ) { | |
// Load meta value. | |
$value = acf_get_metadata( $post_id, $field['name'] ); | |
/** | |
* Filters the $value after it has been loaded. | |
* | |
* @date 28/09/13 | |
* @since 5.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 | |
/* | |
* get_my_plugin_downloads | |
* | |
* This function will return an array of plugin download information | |
* | |
* @type function | |
* @date 31/3/17 | |
* @since 5.5.10 |
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
Hi guys | |
There is a JS error preventing the 'duplicate' checkbox from displaying the 'Duplicate' button when editing a post. | |
The JS error can be found in the file 'res/js/scripts.js' on line 27 | |
Please change: | |
``` | |
if(jQuery('#post ').find('input[name="icl_dupes[]"]:checked'.length > 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
function my_acf_init_settings() { | |
//acf_update_setting('enqueue_google_maps', false); | |
//acf_update_setting('enqueue_select2', false); | |
//acf_update_setting('select2_version', 4); | |
} | |
add_action('acf/init', 'my_acf_init_settings'); |
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
/* | |
* check_sync | |
* | |
* This function will check for any $_GET data to sync | |
* | |
* @type function | |
* @date 9/12/2014 | |
* @since 5.1.5 | |
* | |
* @param n/a |
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_cartesian | |
* | |
* This function will fix a frustrating issue in the WooCommerce plugin | |
* When adding a product using variations, you will most likely use the 'Create variations from all attributes' function | |
* The issue with this function is that it will create the variations in a random order | |
* This is frustrating for your clients to edit | |
* |