Skip to content

Instantly share code, notes, and snippets.

View wpinfusion's full-sized avatar

WP Infusion wpinfusion

View GitHub Profile
FROM php:8.0-apache
# persistent dependencies
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
# Ghostscript is required for rendering PDF previews
ghostscript \
g++ \
curl \
@wpinfusion
wpinfusion / acf-tsf-integration.php
Last active August 17, 2022 13:54 — forked from doubleedesign/acf-tsf-integration.php
Get meta descriptions in The SEO Framework from ACF flexible content fields
<?php
/**
* The SEO Framework + ACF flexible content integration
* TSF will look at the excerpt and then the content to generate the default meta description.
* If both of those are empty, this code looks for ACF flexible modules to get it from.
* // TODO: Make this work with archives as well as posts
* @param $description
* @param $args
*
* @return mixed|string