Plugin Directory

Changeset 3814604


Ignore:
Timestamp:
11/20/2026 11:10:00 PM (less than one hour ago)
Author:
luisathautelocals
Message:

1.2.0: homepage business schema, Yoast SEO and Rank Math title and description fields through the REST API, cache clear after changes

Location:
purpose-pilot-llms-txt-connector
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • purpose-pilot-llms-txt-connector/tags/1.2.0/purpose-pilot-llms-txt-connector.php

    r3810430 r3814604  
    22/**
    33 * Plugin Name: Purpose Pilot llms.txt Connector
    4  * Description: Lets The Purpose Pilot publish this site's llms.txt and, when turned on, its lead attribution script. Both are settings that an authorized administrator account updates through the WordPress REST API.
    5  * Version: 1.1.0
     4 * Description: Lets The Purpose Pilot publish this site's llms.txt, its homepage business schema and, when turned on, its lead attribution script, and update Yoast SEO or Rank Math titles and descriptions. All through the WordPress REST API with an authorized administrator account.
     5 * Version: 1.2.0
    66 * Requires at least: 5.6
    77 * Requires PHP: 7.4
    … …  
    1616    exit;
    1717}
     18
     19define('PURPOSE_PILOT_CONNECTOR_VERSION', '1.2.0');
    1820
    1921function purpose_pilot_llms_rewrite() {
    … …  
    9698    );
    9799});
     100
     101// ---------------------------------------------------------------------------
     102// 1.2.0: SEO titles and descriptions (Yoast SEO, Rank Math).
     103// Neither plugin lets the REST API write its title and description fields,
     104// so an approved change to a page title made outside wp-admin was silently
     105// dropped. Registering the fields lets a user who can edit that post update
     106// them with a normal REST request. Only the plugin that is active is
     107// registered, and only for post types shown in the REST API.
     108
     109function purpose_pilot_seo_meta_keys() {
     110    $keys = array();
     111    if (defined('WPSEO_VERSION')) {
     112        $keys = array_merge($keys, array(
     113            '_yoast_wpseo_title',
     114            '_yoast_wpseo_metadesc',
     115            '_yoast_wpseo_opengraph-title',
     116            '_yoast_wpseo_opengraph-description',
     117            '_yoast_wpseo_twitter-title',
     118            '_yoast_wpseo_twitter-description',
     119        ));
     120    }
     121    if (class_exists('RankMath')) {
     122        $keys = array_merge($keys, array(
     123            'rank_math_title',
     124            'rank_math_description',
     125            'rank_math_facebook_title',
     126            'rank_math_facebook_description',
     127            'rank_math_twitter_title',
     128            'rank_math_twitter_description',
     129        ));
     130    }
     131    return $keys;
     132}
     133
     134add_action('init', function () {
     135    $keys = purpose_pilot_seo_meta_keys();
     136    if (empty($keys)) {
     137        return;
     138    }
     139    $types = get_post_types(array('show_in_rest' => true), 'names');
     140    foreach ($types as $type) {
     141        if ($type === 'attachment' || $type === 'wp_block' || $type === 'wp_template' || $type === 'wp_template_part' || $type === 'wp_navigation') {
     142            continue;
     143        }
     144        foreach ($keys as $key) {
     145            register_post_meta($type, $key, array(
     146                'type'              => 'string',
     147                'single'            => true,
     148                'show_in_rest'      => true,
     149                'sanitize_callback' => 'sanitize_text_field',
     150                'auth_callback'     => function ($allowed, $meta_key, $post_id) {
     151                    return current_user_can('edit_post', $post_id);
     152                },
     153            ));
     154        }
     155    }
     156}, 20);
     157
     158// Posts whose SEO fields or schema changed during this request.
     159$GLOBALS['purpose_pilot_changed_posts'] = array();
     160$GLOBALS['purpose_pilot_home_changed'] = false;
     161
     162function purpose_pilot_note_meta_change($meta_id, $post_id, $meta_key) {
     163    if (in_array($meta_key, purpose_pilot_seo_meta_keys(), true)) {
     164        $GLOBALS['purpose_pilot_changed_posts'][(int) $post_id] = true;
     165    }
     166}
     167add_action('added_post_meta', 'purpose_pilot_note_meta_change', 10, 3);
     168add_action('updated_post_meta', 'purpose_pilot_note_meta_change', 10, 3);
     169add_action('deleted_post_meta', 'purpose_pilot_note_meta_change', 10, 3);
     170
     171// At the end of the request: refresh Yoast's stored copy of the page (it
     172// reads titles from its own table, built when the post was saved, which
     173// happens before REST meta is written), then clear the page cache so the
     174// change is visible right away. Each step only runs when that plugin is
     175// active, and a failure in one never stops the others.
     176add_action('shutdown', function () {
     177    $posts = array_keys($GLOBALS['purpose_pilot_changed_posts']);
     178    $home = !empty($GLOBALS['purpose_pilot_home_changed']);
     179    if (empty($posts) && !$home) {
     180        return;
     181    }
     182    foreach ($posts as $post_id) {
     183        if (function_exists('YoastSEO') && class_exists('Yoast\WP\SEO\Builders\Indexable_Builder')) {
     184            try {
     185                $repo = YoastSEO()->classes->get('Yoast\WP\SEO\Repositories\Indexable_Repository');
     186                $builder = YoastSEO()->classes->get('Yoast\WP\SEO\Builders\Indexable_Builder');
     187                $indexable = $repo->find_by_id_and_type($post_id, 'post', false);
     188                if ($indexable) {
     189                    $builder->build_for_id_and_type($post_id, 'post', $indexable);
     190                }
     191            } catch (\Throwable $e) {
     192                // Yoast rebuilds the entry itself on its next save.
     193            }
     194        }
     195        purpose_pilot_purge_url(get_permalink($post_id), $post_id);
     196    }
     197    if ($home) {
     198        purpose_pilot_purge_url(home_url('/'), (int) get_option('page_on_front'));
     199    }
     200});
     201
     202function purpose_pilot_purge_url($url, $post_id) {
     203    try {
     204        if ($post_id) {
     205            clean_post_cache($post_id);
     206        }
     207        if (function_exists('rocket_clean_post') && $post_id) {
     208            rocket_clean_post($post_id);
     209        } elseif (function_exists('rocket_clean_files') && $url) {
     210            rocket_clean_files(array($url));
     211        }
     212        if (function_exists('rocket_clean_home') && $url && untrailingslashit($url) === untrailingslashit(home_url('/'))) {
     213            rocket_clean_home();
     214        }
     215        if ($post_id) {
     216            do_action('litespeed_purge_post', $post_id);
     217        } elseif ($url) {
     218            do_action('litespeed_purge_url', $url);
     219        }
     220        if (function_exists('w3tc_flush_post') && $post_id) {
     221            w3tc_flush_post($post_id);
     222        }
     223        if (function_exists('wp_cache_post_change') && $post_id) {
     224            wp_cache_post_change($post_id);
     225        }
     226        if (function_exists('sg_cachepress_purge_cache') && $url) {
     227            sg_cachepress_purge_cache($url);
     228        }
     229    } catch (\Throwable $e) {
     230        // A cache plugin error never blocks the change itself.
     231    }
     232}
     233
     234// ---------------------------------------------------------------------------
     235// 1.2.0: homepage business schema (JSON-LD).
     236// The Purpose Pilot builds it from the practice's verified details (name,
     237// address, phone, hours) and stores it here through the REST API. Only
     238// valid JSON describing schema.org data is accepted, and it is printed
     239// re-encoded, so the setting can never inject markup. Empty = nothing added.
     240
     241function purpose_pilot_sanitize_schema($value) {
     242    $value = trim((string) $value);
     243    if ($value === '') {
     244        return '';
     245    }
     246    $data = json_decode($value, true);
     247    if (!is_array($data)) {
     248        return '';
     249    }
     250    $context = isset($data['@context']) ? (string) $data['@context'] : '';
     251    if (strpos($context, 'schema.org') === false) {
     252        return '';
     253    }
     254    return (string) wp_json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
     255}
     256
     257add_action('init', function () {
     258    register_setting('purpose_pilot_llms_options', 'purpose_pilot_schema_jsonld', array(
     259        'type'              => 'string',
     260        'show_in_rest'      => true,
     261        'default'           => '',
     262        'sanitize_callback' => 'purpose_pilot_sanitize_schema',
     263    ));
     264    // Read-only marker so the managing service can tell which version is installed.
     265    register_setting('purpose_pilot_llms_options', 'purpose_pilot_connector_version', array(
     266        'type'              => 'string',
     267        'show_in_rest'      => true,
     268        'default'           => PURPOSE_PILOT_CONNECTOR_VERSION,
     269        'sanitize_callback' => function () {
     270            return PURPOSE_PILOT_CONNECTOR_VERSION;
     271        },
     272    ));
     273});
     274
     275add_action('update_option_purpose_pilot_schema_jsonld', function () {
     276    $GLOBALS['purpose_pilot_home_changed'] = true;
     277});
     278add_action('add_option_purpose_pilot_schema_jsonld', function () {
     279    $GLOBALS['purpose_pilot_home_changed'] = true;
     280});
     281
     282add_action('wp_head', function () {
     283    if (!is_front_page()) {
     284        return;
     285    }
     286    $json = (string) get_option('purpose_pilot_schema_jsonld', '');
     287    if ($json === '') {
     288        return;
     289    }
     290    $data = json_decode($json, true);
     291    if (!is_array($data)) {
     292        return;
     293    }
     294    $out = wp_json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP);
     295    if (!$out) {
     296        return;
     297    }
     298    // JSON re-encoded with JSON_HEX_TAG, so it cannot close the script tag.
     299    echo "<script type=\"application/ld+json\" id=\"purpose-pilot-business-schema\">" . $out . "</script>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     300}, 30);
  • purpose-pilot-llms-txt-connector/tags/1.2.0/readme.txt

    r3810430 r3814604  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Serves an llms.txt that The Purpose Pilot writes for client sites, and optionally loads its lead attribution script. No generator, no settings screen.
     11Serves the llms.txt and homepage business schema The Purpose Pilot writes for client sites, and lets it update Yoast SEO or Rank Math titles. No settings screen.
    1212
    1313== Description ==
    … …  
    2323* Adds a /llms.txt address to your site that returns the stored text as plain text.
    2424* Registers one setting (purpose_pilot_llms_txt) that administrators can read and update through the WordPress REST API.
    25 * Optional, off by default: registers a second setting (purpose_pilot_lead_tracker_id). When an administrator stores the site's client id there, the site loads The Purpose Pilot's lead attribution script on public pages (see External services).
     25* Registers a setting (purpose_pilot_schema_jsonld) for the homepage business schema (JSON-LD: practice name, address, phone). Only valid schema.org JSON is accepted, and it is printed on the homepage only. Empty means nothing is added.
     26* If Yoast SEO or Rank Math is active, lets users who can edit a page update that page's SEO title, meta description and social (Open Graph and X) title and description through the REST API. Neither plugin allows this on its own, so approved title changes made outside wp-admin were dropped. After a change, the page's cache is cleared when WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache or SiteGround Optimizer is active, so the change shows right away.
     27* Optional, off by default: registers a setting (purpose_pilot_lead_tracker_id). When an administrator stores the site's client id there, the site loads The Purpose Pilot's lead attribution script on public pages (see External services).
    2628
    2729What it does not do:
    2830
    2931* The plugin itself makes no outgoing requests from your server.
    30 * Unless lead attribution is turned on, it adds nothing to your pages, posts, theme or admin screens.
     32* Unless an administrator stores schema or turns on lead attribution, it adds nothing to your pages, theme or admin screens.
    3133* It does not create files on your server.
     34* It does not change any page content.
    3235
    3336If the stored text is empty, /llms.txt returns a 404, as if the plugin were not installed.
    … …  
    6366= What happens when I deactivate or delete the plugin? =
    6467
    65 Deactivating removes the /llms.txt address. Deleting the plugin also deletes the stored text and the lead attribution setting.
     68Deactivating removes the /llms.txt address. Deleting the plugin also deletes the stored text, the schema and the lead attribution setting. SEO titles and descriptions already saved stay with your SEO plugin.
    6669
    6770== Changelog ==
     71
     72= 1.2.0 =
     73* Homepage business schema (JSON-LD), stored through the REST API.
     74* Yoast SEO and Rank Math title, description and social fields can be updated through the REST API by users who can edit the page.
     75* Clears the page cache of common cache plugins after one of these changes.
    6876
    6977= 1.1.0 =
  • purpose-pilot-llms-txt-connector/tags/1.2.0/uninstall.php

    r3810430 r3814604  
    11<?php
    22/**
    3  * Removes the stored llms.txt and lead attribution setting when the plugin is deleted.
     3 * Removes the stored llms.txt, lead attribution and schema settings when the plugin is deleted.
    44 */
    55if (!defined('WP_UNINSTALL_PLUGIN')) {
    … …  
    88delete_option('purpose_pilot_llms_txt');
    99delete_option('purpose_pilot_lead_tracker_id');
     10delete_option('purpose_pilot_schema_jsonld');
     11delete_option('purpose_pilot_connector_version');
  • purpose-pilot-llms-txt-connector/trunk/purpose-pilot-llms-txt-connector.php

    r3810430 r3814604  
    22/**
    33 * Plugin Name: Purpose Pilot llms.txt Connector
    4  * Description: Lets The Purpose Pilot publish this site's llms.txt and, when turned on, its lead attribution script. Both are settings that an authorized administrator account updates through the WordPress REST API.
    5  * Version: 1.1.0
     4 * Description: Lets The Purpose Pilot publish this site's llms.txt, its homepage business schema and, when turned on, its lead attribution script, and update Yoast SEO or Rank Math titles and descriptions. All through the WordPress REST API with an authorized administrator account.
     5 * Version: 1.2.0
    66 * Requires at least: 5.6
    77 * Requires PHP: 7.4
    … …  
    1616    exit;
    1717}
     18
     19define('PURPOSE_PILOT_CONNECTOR_VERSION', '1.2.0');
    1820
    1921function purpose_pilot_llms_rewrite() {
    … …  
    9698    );
    9799});
     100
     101// ---------------------------------------------------------------------------
     102// 1.2.0: SEO titles and descriptions (Yoast SEO, Rank Math).
     103// Neither plugin lets the REST API write its title and description fields,
     104// so an approved change to a page title made outside wp-admin was silently
     105// dropped. Registering the fields lets a user who can edit that post update
     106// them with a normal REST request. Only the plugin that is active is
     107// registered, and only for post types shown in the REST API.
     108
     109function purpose_pilot_seo_meta_keys() {
     110    $keys = array();
     111    if (defined('WPSEO_VERSION')) {
     112        $keys = array_merge($keys, array(
     113            '_yoast_wpseo_title',
     114            '_yoast_wpseo_metadesc',
     115            '_yoast_wpseo_opengraph-title',
     116            '_yoast_wpseo_opengraph-description',
     117            '_yoast_wpseo_twitter-title',
     118            '_yoast_wpseo_twitter-description',
     119        ));
     120    }
     121    if (class_exists('RankMath')) {
     122        $keys = array_merge($keys, array(
     123            'rank_math_title',
     124            'rank_math_description',
     125            'rank_math_facebook_title',
     126            'rank_math_facebook_description',
     127            'rank_math_twitter_title',
     128            'rank_math_twitter_description',
     129        ));
     130    }
     131    return $keys;
     132}
     133
     134add_action('init', function () {
     135    $keys = purpose_pilot_seo_meta_keys();
     136    if (empty($keys)) {
     137        return;
     138    }
     139    $types = get_post_types(array('show_in_rest' => true), 'names');
     140    foreach ($types as $type) {
     141        if ($type === 'attachment' || $type === 'wp_block' || $type === 'wp_template' || $type === 'wp_template_part' || $type === 'wp_navigation') {
     142            continue;
     143        }
     144        foreach ($keys as $key) {
     145            register_post_meta($type, $key, array(
     146                'type'              => 'string',
     147                'single'            => true,
     148                'show_in_rest'      => true,
     149                'sanitize_callback' => 'sanitize_text_field',
     150                'auth_callback'     => function ($allowed, $meta_key, $post_id) {
     151                    return current_user_can('edit_post', $post_id);
     152                },
     153            ));
     154        }
     155    }
     156}, 20);
     157
     158// Posts whose SEO fields or schema changed during this request.
     159$GLOBALS['purpose_pilot_changed_posts'] = array();
     160$GLOBALS['purpose_pilot_home_changed'] = false;
     161
     162function purpose_pilot_note_meta_change($meta_id, $post_id, $meta_key) {
     163    if (in_array($meta_key, purpose_pilot_seo_meta_keys(), true)) {
     164        $GLOBALS['purpose_pilot_changed_posts'][(int) $post_id] = true;
     165    }
     166}
     167add_action('added_post_meta', 'purpose_pilot_note_meta_change', 10, 3);
     168add_action('updated_post_meta', 'purpose_pilot_note_meta_change', 10, 3);
     169add_action('deleted_post_meta', 'purpose_pilot_note_meta_change', 10, 3);
     170
     171// At the end of the request: refresh Yoast's stored copy of the page (it
     172// reads titles from its own table, built when the post was saved, which
     173// happens before REST meta is written), then clear the page cache so the
     174// change is visible right away. Each step only runs when that plugin is
     175// active, and a failure in one never stops the others.
     176add_action('shutdown', function () {
     177    $posts = array_keys($GLOBALS['purpose_pilot_changed_posts']);
     178    $home = !empty($GLOBALS['purpose_pilot_home_changed']);
     179    if (empty($posts) && !$home) {
     180        return;
     181    }
     182    foreach ($posts as $post_id) {
     183        if (function_exists('YoastSEO') && class_exists('Yoast\WP\SEO\Builders\Indexable_Builder')) {
     184            try {
     185                $repo = YoastSEO()->classes->get('Yoast\WP\SEO\Repositories\Indexable_Repository');
     186                $builder = YoastSEO()->classes->get('Yoast\WP\SEO\Builders\Indexable_Builder');
     187                $indexable = $repo->find_by_id_and_type($post_id, 'post', false);
     188                if ($indexable) {
     189                    $builder->build_for_id_and_type($post_id, 'post', $indexable);
     190                }
     191            } catch (\Throwable $e) {
     192                // Yoast rebuilds the entry itself on its next save.
     193            }
     194        }
     195        purpose_pilot_purge_url(get_permalink($post_id), $post_id);
     196    }
     197    if ($home) {
     198        purpose_pilot_purge_url(home_url('/'), (int) get_option('page_on_front'));
     199    }
     200});
     201
     202function purpose_pilot_purge_url($url, $post_id) {
     203    try {
     204        if ($post_id) {
     205            clean_post_cache($post_id);
     206        }
     207        if (function_exists('rocket_clean_post') && $post_id) {
     208            rocket_clean_post($post_id);
     209        } elseif (function_exists('rocket_clean_files') && $url) {
     210            rocket_clean_files(array($url));
     211        }
     212        if (function_exists('rocket_clean_home') && $url && untrailingslashit($url) === untrailingslashit(home_url('/'))) {
     213            rocket_clean_home();
     214        }
     215        if ($post_id) {
     216            do_action('litespeed_purge_post', $post_id);
     217        } elseif ($url) {
     218            do_action('litespeed_purge_url', $url);
     219        }
     220        if (function_exists('w3tc_flush_post') && $post_id) {
     221            w3tc_flush_post($post_id);
     222        }
     223        if (function_exists('wp_cache_post_change') && $post_id) {
     224            wp_cache_post_change($post_id);
     225        }
     226        if (function_exists('sg_cachepress_purge_cache') && $url) {
     227            sg_cachepress_purge_cache($url);
     228        }
     229    } catch (\Throwable $e) {
     230        // A cache plugin error never blocks the change itself.
     231    }
     232}
     233
     234// ---------------------------------------------------------------------------
     235// 1.2.0: homepage business schema (JSON-LD).
     236// The Purpose Pilot builds it from the practice's verified details (name,
     237// address, phone, hours) and stores it here through the REST API. Only
     238// valid JSON describing schema.org data is accepted, and it is printed
     239// re-encoded, so the setting can never inject markup. Empty = nothing added.
     240
     241function purpose_pilot_sanitize_schema($value) {
     242    $value = trim((string) $value);
     243    if ($value === '') {
     244        return '';
     245    }
     246    $data = json_decode($value, true);
     247    if (!is_array($data)) {
     248        return '';
     249    }
     250    $context = isset($data['@context']) ? (string) $data['@context'] : '';
     251    if (strpos($context, 'schema.org') === false) {
     252        return '';
     253    }
     254    return (string) wp_json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
     255}
     256
     257add_action('init', function () {
     258    register_setting('purpose_pilot_llms_options', 'purpose_pilot_schema_jsonld', array(
     259        'type'              => 'string',
     260        'show_in_rest'      => true,
     261        'default'           => '',
     262        'sanitize_callback' => 'purpose_pilot_sanitize_schema',
     263    ));
     264    // Read-only marker so the managing service can tell which version is installed.
     265    register_setting('purpose_pilot_llms_options', 'purpose_pilot_connector_version', array(
     266        'type'              => 'string',
     267        'show_in_rest'      => true,
     268        'default'           => PURPOSE_PILOT_CONNECTOR_VERSION,
     269        'sanitize_callback' => function () {
     270            return PURPOSE_PILOT_CONNECTOR_VERSION;
     271        },
     272    ));
     273});
     274
     275add_action('update_option_purpose_pilot_schema_jsonld', function () {
     276    $GLOBALS['purpose_pilot_home_changed'] = true;
     277});
     278add_action('add_option_purpose_pilot_schema_jsonld', function () {
     279    $GLOBALS['purpose_pilot_home_changed'] = true;
     280});
     281
     282add_action('wp_head', function () {
     283    if (!is_front_page()) {
     284        return;
     285    }
     286    $json = (string) get_option('purpose_pilot_schema_jsonld', '');
     287    if ($json === '') {
     288        return;
     289    }
     290    $data = json_decode($json, true);
     291    if (!is_array($data)) {
     292        return;
     293    }
     294    $out = wp_json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP);
     295    if (!$out) {
     296        return;
     297    }
     298    // JSON re-encoded with JSON_HEX_TAG, so it cannot close the script tag.
     299    echo "<script type=\"application/ld+json\" id=\"purpose-pilot-business-schema\">" . $out . "</script>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     300}, 30);
  • purpose-pilot-llms-txt-connector/trunk/readme.txt

    r3810430 r3814604  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Serves an llms.txt that The Purpose Pilot writes for client sites, and optionally loads its lead attribution script. No generator, no settings screen.
     11Serves the llms.txt and homepage business schema The Purpose Pilot writes for client sites, and lets it update Yoast SEO or Rank Math titles. No settings screen.
    1212
    1313== Description ==
    … …  
    2323* Adds a /llms.txt address to your site that returns the stored text as plain text.
    2424* Registers one setting (purpose_pilot_llms_txt) that administrators can read and update through the WordPress REST API.
    25 * Optional, off by default: registers a second setting (purpose_pilot_lead_tracker_id). When an administrator stores the site's client id there, the site loads The Purpose Pilot's lead attribution script on public pages (see External services).
     25* Registers a setting (purpose_pilot_schema_jsonld) for the homepage business schema (JSON-LD: practice name, address, phone). Only valid schema.org JSON is accepted, and it is printed on the homepage only. Empty means nothing is added.
     26* If Yoast SEO or Rank Math is active, lets users who can edit a page update that page's SEO title, meta description and social (Open Graph and X) title and description through the REST API. Neither plugin allows this on its own, so approved title changes made outside wp-admin were dropped. After a change, the page's cache is cleared when WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache or SiteGround Optimizer is active, so the change shows right away.
     27* Optional, off by default: registers a setting (purpose_pilot_lead_tracker_id). When an administrator stores the site's client id there, the site loads The Purpose Pilot's lead attribution script on public pages (see External services).
    2628
    2729What it does not do:
    2830
    2931* The plugin itself makes no outgoing requests from your server.
    30 * Unless lead attribution is turned on, it adds nothing to your pages, posts, theme or admin screens.
     32* Unless an administrator stores schema or turns on lead attribution, it adds nothing to your pages, theme or admin screens.
    3133* It does not create files on your server.
     34* It does not change any page content.
    3235
    3336If the stored text is empty, /llms.txt returns a 404, as if the plugin were not installed.
    … …  
    6366= What happens when I deactivate or delete the plugin? =
    6467
    65 Deactivating removes the /llms.txt address. Deleting the plugin also deletes the stored text and the lead attribution setting.
     68Deactivating removes the /llms.txt address. Deleting the plugin also deletes the stored text, the schema and the lead attribution setting. SEO titles and descriptions already saved stay with your SEO plugin.
    6669
    6770== Changelog ==
     71
     72= 1.2.0 =
     73* Homepage business schema (JSON-LD), stored through the REST API.
     74* Yoast SEO and Rank Math title, description and social fields can be updated through the REST API by users who can edit the page.
     75* Clears the page cache of common cache plugins after one of these changes.
    6876
    6977= 1.1.0 =
  • purpose-pilot-llms-txt-connector/trunk/uninstall.php

    r3810430 r3814604  
    11<?php
    22/**
    3  * Removes the stored llms.txt and lead attribution setting when the plugin is deleted.
     3 * Removes the stored llms.txt, lead attribution and schema settings when the plugin is deleted.
    44 */
    55if (!defined('WP_UNINSTALL_PLUGIN')) {
    … …  
    88delete_option('purpose_pilot_llms_txt');
    99delete_option('purpose_pilot_lead_tracker_id');
     10delete_option('purpose_pilot_schema_jsonld');
     11delete_option('purpose_pilot_connector_version');
Note: See TracChangeset for help on using the changeset viewer.