PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.11.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.11.0
2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk All 53 releases
← All changes | includes/admin/importers/class-snapshot-store.php +0 -42 trunk → 2.11.0 View file →
@@ -32,50 +32,8 @@
32 32 */
33 33 private const OPTION_PREFIX = 'thinkrank_snapshot_';
34 34
35 35 /**
36 - * Width of `wp_options.option_name`, VARCHAR(191) since WordPress 4.4 cut it
37 - * to fit a utf8mb4 index.
38 - *
39 - * @var int
40 - */
41 - private const OPTION_NAME_MAX = 191;
42 -
43 - /**
44 - * Digits held back for the chunk page number in a key. Ten is far past what
45 - * any real snapshot pages to; it costs ten characters of type slug.
46 - *
47 - * @var int
48 - */
49 - private const PAGE_DIGITS = 10;
50 -
51 - /**
52 - * Longest type slug whose chunk key still fits `option_name`.
53 - *
54 - * MySQL's default (non-strict) mode truncates an over-long option name on
55 - * write instead of refusing it, and the truncated row is then invisible to
56 - * the read, which looks the full key up. In-request option caching hides
57 - * that until the next request, when read_chunk() starts returning null for
58 - * records the manifest still counts — a snapshot that advertises data it
59 - * cannot produce. Callers taking a type slug from an uploaded file must
60 - * check it against this before storing anything under it.
61 - *
62 - * @since 2.12.0
63 - *
64 - * @param string $plugin Plugin slug the chunks are filed under.
65 - * @return int Maximum type slug length, in characters.
66 - */
67 - public static function max_type_length(string $plugin): int {
68 - // The key is OPTION_PREFIX . "{$plugin}_{$type}_chunk_{$page}".
69 - $overhead = strlen(self::OPTION_PREFIX)
70 - + strlen($plugin)
71 - + strlen('__chunk_')
72 - + self::PAGE_DIGITS;
73 -
74 - return max(1, self::OPTION_NAME_MAX - $overhead);
75 - }
76 -
77 - /**
78 36 * Write a chunk of snapshot data
79 37 *
80 38 * @param string $plugin Plugin slug (e.g., 'yoast')
81 39 * @param string $type Data type (e.g., 'postmeta')