Envira – Remove pagination truncation

/* Envira – Remove pagination truncation * * @link https://enviragallery.com/docs/how-to-remove-pagination-truncation/ */ add_filter( ‘envira_pagination_link_args’, ‘test_envira_pagination_link_args’, 10, 3 ); function test_envira_pagination_link_args( $pagination_args, $html, $data ) { $pagination_args[‘show_all’] = true; return $pagination_args; }Continue reading

Envira – Remove Fragment Cache

/* Envira – Envira – Remove Fragment Cache * * @link https://enviragallery.com/docs/how-to-remove-fragment-cache-from-envira/ */ add_filter( ‘envira_gallery_get_transient_markup’, ‘__return_false’ ); add_filter( ‘envira_gallery_should_cache’, ‘__return_false’ );Continue reading

Make Blog Post Images Square

function ld_blog_crop_image_width($width) { return 9999; } function ld_blog_crop_image_height($height) { return 9999; } add_filter( ‘et_pb_blog_image_width’, ‘ld_blog_crop_image_width’); add_filter( ‘et_pb_blog_image_height’, ‘ld_blog_crop_image_height’ );Continue reading

NextGEN Ecommerce – apply the default pricelist to all of the existing galleries

use Imagely\NGG\Settings\Settings; use Imagely\NGGPro\Commerce\DataMappers\Gallery as GalleryMapper; function apply_default_pricelist_to_all_galleries() { $settings = Settings::get_instance(); $default_pricelist = $settings->get(‘ecommerce_default_pricelist’, null); if (!$default_pricelist) { return; } $mapper = GalleryMapper::get_instance(); $all_galleries = $mapper->find_all(); if ($all_galleries) { foreach ($all_galleries as $gallery) { $gallery->pricelist_id = $default_pricelist; $mapper->save($gallery); }…Continue reading

NextGEN Ecommerce – apply the default pricelist to all of the existing galleries

use Imagely\NGG\Settings\Settings; use Imagely\NGGPro\Commerce\DataMappers\Gallery as GalleryMapper; function apply_default_pricelist_to_all_galleries() { $settings = Settings::get_instance(); $default_pricelist = $settings->get(‘ecommerce_default_pricelist’, null); if (!$default_pricelist) { return; } $mapper = GalleryMapper::get_instance(); $all_galleries = $mapper->find_all(); if ($all_galleries) { foreach ($all_galleries as $gallery) { $gallery->pricelist_id = $default_pricelist; $mapper->save($gallery); }…Continue reading

expose acf

function expose_acf_to_rest() { register_rest_field(‘game_state’, ‘acf’, [ ‘get_callback’ => function($post_arr) { return get_fields($post_arr[‘id’]); }, ‘update_callback’ => null, ‘schema’ => null, ]); } add_action(‘rest_api_init’, ‘expose_acf_to_rest’);Continue reading

[reach_score]

/** * REACH/Wilson 2012 Secondary CV Risk Calculator * Shortcode: [reach_score] * * – Displays user data & final 20-month risk in a Bootstrap table. * – Region dropdown (NA/Western Europe, Eastern Europe/Middle East, Japan/Australia). * – Fetches user data…Continue reading