This small plugin adds a new format to retrieve excerpt or title in text plain format instead of rendered.
- Install WPGraphQL
- Download or copy the
wpgraphql-field-format-text-plain.php
file - Place it under
wp-content/mu-plugins
- Done
<?php | |
namespace WP_Disable_Plugin_Update_Notifications; | |
$plugins = [ | |
'elementor/elementor.php', | |
'elementor-pro/elementor-pro.php', | |
]; | |
add_filter( 'site_transient_update_plugins', function ( $value ) use ( $plugins ) { |
<?php | |
/** | |
* Plugin Name: Custom | |
* Plugin URI: https://gist.github.com/lightningspirit/4619cb99fcb662b390d9596df1479d41 | |
* Description: Custom code for everybody | |
* Author: Move Your Digital | |
* Author URI: https://moveyourdigital.com | |
* Version: 1.0.0 | |
* |
type ValueType = | |
| string | |
| number | |
| boolean | |
| null | |
| undefined | |
| (string | number | boolean | null | undefined)[] | |
function mapBooleans(key: string, value: ValueType) { | |
switch (value) { |
This small plugin adds a new format to retrieve excerpt or title in text plain format instead of rendered.
wpgraphql-field-format-text-plain.php
filewp-content/mu-plugins
import { useCallback, useEffect, useMemo, useState } from "preact/hooks" | |
class StateTransitionError extends Error {} | |
function useFSM<T extends string>( | |
transitions: Record<T, T[]>, | |
options: { | |
throwOnTransitionError?: boolean | |
} = { throwOnTransitionError: true }, | |
) { |
Includes a WPGraphQL JWT token in every posts preview link. That can be used for an external application (e.g. Next.js) to include in the authorization header when contacting back the WordPress instance using the WPGraphQL.