author | ymh <ymh.work@gmail.com> |
Mon, 08 Sep 2025 19:44:41 +0200 | |
changeset 23 | 417f20492bf7 |
parent 22 | 8c2e4d02f4ef |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* API for easily embedding rich media such as videos and images into content. |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Embed |
|
7 |
* @since 2.9.0 |
|
8 |
*/ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
9 |
#[AllowDynamicProperties] |
0 | 10 |
class WP_Embed { |
5 | 11 |
public $handlers = array(); |
12 |
public $post_ID; |
|
9 | 13 |
public $usecache = true; |
5 | 14 |
public $linkifunknown = true; |
9 | 15 |
public $last_attr = array(); |
16 |
public $last_url = ''; |
|
5 | 17 |
|
18 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
19 |
* When a URL cannot be embedded, return false instead of returning a link |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
20 |
* or the URL. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
21 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
22 |
* Bypasses the {@see 'embed_maybe_make_link'} filter. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
23 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
24 |
* @var bool |
5 | 25 |
*/ |
26 |
public $return_false_on_fail = false; |
|
0 | 27 |
|
28 |
/** |
|
29 |
* Constructor |
|
30 |
*/ |
|
5 | 31 |
public function __construct() { |
16 | 32 |
// Hack to get the [embed] shortcode to run before wpautop(). |
0 | 33 |
add_filter( 'the_content', array( $this, 'run_shortcode' ), 8 ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
34 |
add_filter( 'widget_text_content', array( $this, 'run_shortcode' ), 8 ); |
18 | 35 |
add_filter( 'widget_block_content', array( $this, 'run_shortcode' ), 8 ); |
0 | 36 |
|
16 | 37 |
// Shortcode placeholder for strip_shortcodes(). |
0 | 38 |
add_shortcode( 'embed', '__return_false' ); |
39 |
||
16 | 40 |
// Attempts to embed all URLs in a post. |
0 | 41 |
add_filter( 'the_content', array( $this, 'autoembed' ), 8 ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
42 |
add_filter( 'widget_text_content', array( $this, 'autoembed' ), 8 ); |
18 | 43 |
add_filter( 'widget_block_content', array( $this, 'autoembed' ), 8 ); |
0 | 44 |
|
16 | 45 |
// After a post is saved, cache oEmbed items via Ajax. |
0 | 46 |
add_action( 'edit_form_advanced', array( $this, 'maybe_run_ajax_cache' ) ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
47 |
add_action( 'edit_page_form', array( $this, 'maybe_run_ajax_cache' ) ); |
0 | 48 |
} |
49 |
||
50 |
/** |
|
19 | 51 |
* Processes the [embed] shortcode. |
0 | 52 |
* |
53 |
* Since the [embed] shortcode needs to be run earlier than other shortcodes, |
|
54 |
* this function removes all existing shortcodes, registers the [embed] shortcode, |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
55 |
* calls do_shortcode(), and then re-registers the old shortcodes. |
0 | 56 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
57 |
* @global array $shortcode_tags |
0 | 58 |
* |
19 | 59 |
* @param string $content Content to parse. |
60 |
* @return string Content with shortcode parsed. |
|
0 | 61 |
*/ |
5 | 62 |
public function run_shortcode( $content ) { |
0 | 63 |
global $shortcode_tags; |
64 |
||
16 | 65 |
// Back up current registered shortcodes and clear them all out. |
0 | 66 |
$orig_shortcode_tags = $shortcode_tags; |
67 |
remove_all_shortcodes(); |
|
68 |
||
69 |
add_shortcode( 'embed', array( $this, 'shortcode' ) ); |
|
70 |
||
16 | 71 |
// Do the shortcode (only the [embed] one is registered). |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
72 |
$content = do_shortcode( $content, true ); |
0 | 73 |
|
16 | 74 |
// Put the original shortcodes back. |
0 | 75 |
$shortcode_tags = $orig_shortcode_tags; |
76 |
||
77 |
return $content; |
|
78 |
} |
|
79 |
||
80 |
/** |
|
81 |
* If a post/page was saved, then output JavaScript to make |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
82 |
* an Ajax request that will call WP_Embed::cache_oembed(). |
0 | 83 |
*/ |
5 | 84 |
public function maybe_run_ajax_cache() { |
0 | 85 |
$post = get_post(); |
86 |
||
9 | 87 |
if ( ! $post || empty( $_GET['message'] ) ) { |
0 | 88 |
return; |
9 | 89 |
} |
90 |
?> |
|
0 | 91 |
<script type="text/javascript"> |
19 | 92 |
jQuery( function($) { |
18 | 93 |
$.get("<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ) . '?action=oembed-cache&post=' . $post->ID; ?>"); |
19 | 94 |
} ); |
0 | 95 |
</script> |
9 | 96 |
<?php |
0 | 97 |
} |
98 |
||
99 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
100 |
* Registers an embed handler. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
101 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
102 |
* Do not use this function directly, use wp_embed_register_handler() instead. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
103 |
* |
0 | 104 |
* This function should probably also only be used for sites that do not support oEmbed. |
105 |
* |
|
16 | 106 |
* @param string $id An internal ID/name for the handler. Needs to be unique. |
107 |
* @param string $regex The regex that will be used to see if this handler should be used for a URL. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
108 |
* @param callable $callback The callback function that will be called if the regex is matched. |
16 | 109 |
* @param int $priority Optional. Used to specify the order in which the registered handlers will be tested. |
110 |
* Lower numbers correspond with earlier testing, and handlers with the same priority are |
|
111 |
* tested in the order in which they were added to the action. Default 10. |
|
0 | 112 |
*/ |
5 | 113 |
public function register_handler( $id, $regex, $callback, $priority = 10 ) { |
9 | 114 |
$this->handlers[ $priority ][ $id ] = array( |
0 | 115 |
'regex' => $regex, |
116 |
'callback' => $callback, |
|
117 |
); |
|
118 |
} |
|
119 |
||
120 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
121 |
* Unregisters a previously-registered embed handler. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
122 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
123 |
* Do not use this function directly, use wp_embed_unregister_handler() instead. |
0 | 124 |
* |
16 | 125 |
* @param string $id The handler ID that should be removed. |
126 |
* @param int $priority Optional. The priority of the handler to be removed (default: 10). |
|
0 | 127 |
*/ |
5 | 128 |
public function unregister_handler( $id, $priority = 10 ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
129 |
unset( $this->handlers[ $priority ][ $id ] ); |
0 | 130 |
} |
131 |
||
132 |
/** |
|
16 | 133 |
* Returns embed HTML for a given URL from embed handlers. |
134 |
* |
|
135 |
* Attempts to convert a URL into embed HTML by checking the URL |
|
136 |
* against the regex of the registered embed handlers. |
|
137 |
* |
|
138 |
* @since 5.5.0 |
|
139 |
* |
|
140 |
* @param array $attr { |
|
141 |
* Shortcode attributes. Optional. |
|
142 |
* |
|
143 |
* @type int $width Width of the embed in pixels. |
|
144 |
* @type int $height Height of the embed in pixels. |
|
145 |
* } |
|
146 |
* @param string $url The URL attempting to be embedded. |
|
147 |
* @return string|false The embed HTML on success, false otherwise. |
|
148 |
*/ |
|
149 |
public function get_embed_handler_html( $attr, $url ) { |
|
150 |
$rawattr = $attr; |
|
151 |
$attr = wp_parse_args( $attr, wp_embed_defaults( $url ) ); |
|
152 |
||
153 |
ksort( $this->handlers ); |
|
154 |
foreach ( $this->handlers as $priority => $handlers ) { |
|
155 |
foreach ( $handlers as $id => $handler ) { |
|
156 |
if ( preg_match( $handler['regex'], $url, $matches ) && is_callable( $handler['callback'] ) ) { |
|
157 |
$return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr ); |
|
158 |
if ( false !== $return ) { |
|
159 |
/** |
|
160 |
* Filters the returned embed HTML. |
|
161 |
* |
|
162 |
* @since 2.9.0 |
|
163 |
* |
|
164 |
* @see WP_Embed::shortcode() |
|
165 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
166 |
* @param string $return The HTML result of the shortcode. |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
167 |
* @param string $url The embed URL. |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
168 |
* @param array $attr An array of shortcode attributes. |
16 | 169 |
*/ |
170 |
return apply_filters( 'embed_handler_html', $return, $url, $attr ); |
|
171 |
} |
|
172 |
} |
|
173 |
} |
|
174 |
} |
|
175 |
||
176 |
return false; |
|
177 |
} |
|
178 |
||
179 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
180 |
* The do_shortcode() callback function. |
0 | 181 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
182 |
* Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
183 |
* the registered embed handlers. If none of the regex matches and it's enabled, then the URL |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
184 |
* will be given to the WP_oEmbed class. |
0 | 185 |
* |
16 | 186 |
* @param array $attr { |
5 | 187 |
* Shortcode attributes. Optional. |
0 | 188 |
* |
5 | 189 |
* @type int $width Width of the embed in pixels. |
190 |
* @type int $height Height of the embed in pixels. |
|
191 |
* } |
|
0 | 192 |
* @param string $url The URL attempting to be embedded. |
5 | 193 |
* @return string|false The embed HTML on success, otherwise the original URL. |
194 |
* `->maybe_make_link()` can return false on failure. |
|
0 | 195 |
*/ |
5 | 196 |
public function shortcode( $attr, $url = '' ) { |
0 | 197 |
$post = get_post(); |
198 |
||
5 | 199 |
if ( empty( $url ) && ! empty( $attr['src'] ) ) { |
200 |
$url = $attr['src']; |
|
201 |
} |
|
202 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
203 |
$this->last_url = $url; |
5 | 204 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
205 |
if ( empty( $url ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
206 |
$this->last_attr = $attr; |
0 | 207 |
return ''; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
208 |
} |
0 | 209 |
|
210 |
$rawattr = $attr; |
|
9 | 211 |
$attr = wp_parse_args( $attr, wp_embed_defaults( $url ) ); |
0 | 212 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
213 |
$this->last_attr = $attr; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
214 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
215 |
/* |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
216 |
* KSES converts & into & and we need to undo this. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
217 |
* See https://core.trac.wordpress.org/ticket/11311 |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
218 |
*/ |
0 | 219 |
$url = str_replace( '&', '&', $url ); |
220 |
||
16 | 221 |
// Look for known internal handlers. |
222 |
$embed_handler_html = $this->get_embed_handler_html( $rawattr, $url ); |
|
223 |
if ( false !== $embed_handler_html ) { |
|
224 |
return $embed_handler_html; |
|
0 | 225 |
} |
226 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
227 |
$post_id = ( ! empty( $post->ID ) ) ? $post->ID : null; |
0 | 228 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
229 |
// Potentially set by WP_Embed::cache_oembed(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
230 |
if ( ! empty( $this->post_ID ) ) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
231 |
$post_id = $this->post_ID; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
232 |
} |
0 | 233 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
234 |
// Check for a cached result (stored as custom post or in the post meta). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
235 |
$key_suffix = md5( $url . serialize( $attr ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
236 |
$cachekey = '_oembed_' . $key_suffix; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
237 |
$cachekey_time = '_oembed_time_' . $key_suffix; |
0 | 238 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
239 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
240 |
* Filters the oEmbed TTL value (time to live). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
241 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
242 |
* @since 4.0.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
243 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
244 |
* @param int $time Time to live (in seconds). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
245 |
* @param string $url The attempted embed URL. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
246 |
* @param array $attr An array of shortcode attributes. |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
247 |
* @param int $post_id Post ID. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
248 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
249 |
$ttl = apply_filters( 'oembed_ttl', DAY_IN_SECONDS, $url, $attr, $post_id ); |
5 | 250 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
251 |
$cache = ''; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
252 |
$cache_time = 0; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
253 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
254 |
$cached_post_id = $this->find_oembed_post_id( $key_suffix ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
255 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
256 |
if ( $post_id ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
257 |
$cache = get_post_meta( $post_id, $cachekey, true ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
258 |
$cache_time = get_post_meta( $post_id, $cachekey_time, true ); |
5 | 259 |
|
260 |
if ( ! $cache_time ) { |
|
261 |
$cache_time = 0; |
|
262 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
263 |
} elseif ( $cached_post_id ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
264 |
$cached_post = get_post( $cached_post_id ); |
5 | 265 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
266 |
$cache = $cached_post->post_content; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
267 |
$cache_time = strtotime( $cached_post->post_modified_gmt ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
268 |
} |
0 | 269 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
270 |
$cached_recently = ( time() - $cache_time ) < $ttl; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
271 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
272 |
if ( $this->usecache || $cached_recently ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
273 |
// Failures are cached. Serve one if we're using the cache. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
274 |
if ( '{{unknown}}' === $cache ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
275 |
return $this->maybe_make_link( $url ); |
0 | 276 |
} |
277 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
278 |
if ( ! empty( $cache ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
279 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
280 |
* Filters the cached oEmbed HTML. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
281 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
282 |
* @since 2.9.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
283 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
284 |
* @see WP_Embed::shortcode() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
285 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
286 |
* @param string $cache The cached HTML result, stored in post meta. |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
287 |
* @param string $url The attempted embed URL. |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
288 |
* @param array $attr An array of shortcode attributes. |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
289 |
* @param int $post_id Post ID. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
290 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
291 |
return apply_filters( 'embed_oembed_html', $cache, $url, $attr, $post_id ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
292 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
293 |
} |
0 | 294 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
295 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
296 |
* Filters whether to inspect the given URL for discoverable link tags. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
297 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
298 |
* @since 2.9.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
299 |
* @since 4.4.0 The default value changed to true. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
300 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
301 |
* @see WP_oEmbed::discover() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
302 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
303 |
* @param bool $enable Whether to enable `<link>` tag discovery. Default true. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
304 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
305 |
$attr['discover'] = apply_filters( 'embed_oembed_discover', true ); |
0 | 306 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
307 |
// Use oEmbed to get the HTML. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
308 |
$html = wp_oembed_get( $url, $attr ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
309 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
310 |
if ( $post_id ) { |
5 | 311 |
if ( $html ) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
312 |
update_post_meta( $post_id, $cachekey, $html ); |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
313 |
update_post_meta( $post_id, $cachekey_time, time() ); |
5 | 314 |
} elseif ( ! $cache ) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
315 |
update_post_meta( $post_id, $cachekey, '{{unknown}}' ); |
5 | 316 |
} |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
317 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
318 |
$has_kses = false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ); |
0 | 319 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
320 |
if ( $has_kses ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
321 |
// Prevent KSES from corrupting JSON in post_content. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
322 |
kses_remove_filters(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
323 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
324 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
325 |
$insert_post_args = array( |
9 | 326 |
'post_name' => $key_suffix, |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
327 |
'post_status' => 'publish', |
9 | 328 |
'post_type' => 'oembed_cache', |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
329 |
); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
330 |
|
0 | 331 |
if ( $html ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
332 |
if ( $cached_post_id ) { |
9 | 333 |
wp_update_post( |
334 |
wp_slash( |
|
335 |
array( |
|
336 |
'ID' => $cached_post_id, |
|
337 |
'post_content' => $html, |
|
338 |
) |
|
339 |
) |
|
340 |
); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
341 |
} else { |
9 | 342 |
wp_insert_post( |
343 |
wp_slash( |
|
344 |
array_merge( |
|
345 |
$insert_post_args, |
|
346 |
array( |
|
347 |
'post_content' => $html, |
|
348 |
) |
|
349 |
) |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
350 |
) |
9 | 351 |
); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
352 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
353 |
} elseif ( ! $cache ) { |
9 | 354 |
wp_insert_post( |
355 |
wp_slash( |
|
356 |
array_merge( |
|
357 |
$insert_post_args, |
|
358 |
array( |
|
359 |
'post_content' => '{{unknown}}', |
|
360 |
) |
|
361 |
) |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
362 |
) |
9 | 363 |
); |
0 | 364 |
} |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
365 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
366 |
if ( $has_kses ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
367 |
kses_init_filters(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
368 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
369 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
370 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
371 |
// If there was a result, return it. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
372 |
if ( $html ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
373 |
/** This filter is documented in wp-includes/class-wp-embed.php */ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
374 |
return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_id ); |
0 | 375 |
} |
376 |
||
16 | 377 |
// Still unknown. |
0 | 378 |
return $this->maybe_make_link( $url ); |
379 |
} |
|
380 |
||
381 |
/** |
|
19 | 382 |
* Deletes all oEmbed caches. Unused by core as of 4.0.0. |
0 | 383 |
* |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
384 |
* @param int $post_id Post ID to delete the caches for. |
0 | 385 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
386 |
public function delete_oembed_caches( $post_id ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
387 |
$post_metas = get_post_custom_keys( $post_id ); |
9 | 388 |
if ( empty( $post_metas ) ) { |
0 | 389 |
return; |
9 | 390 |
} |
0 | 391 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
392 |
foreach ( $post_metas as $post_meta_key ) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
393 |
if ( str_starts_with( $post_meta_key, '_oembed_' ) ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
394 |
delete_post_meta( $post_id, $post_meta_key ); |
9 | 395 |
} |
0 | 396 |
} |
397 |
} |
|
398 |
||
399 |
/** |
|
400 |
* Triggers a caching of all oEmbed results. |
|
401 |
* |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
402 |
* @param int $post_id Post ID to do the caching for. |
0 | 403 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
404 |
public function cache_oembed( $post_id ) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
405 |
$post = get_post( $post_id ); |
0 | 406 |
|
5 | 407 |
$post_types = get_post_types( array( 'show_ui' => true ) ); |
16 | 408 |
|
0 | 409 |
/** |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
410 |
* Filters the array of post types to cache oEmbed results for. |
0 | 411 |
* |
412 |
* @since 2.9.0 |
|
413 |
* |
|
9 | 414 |
* @param string[] $post_types Array of post type names to cache oEmbed results for. Defaults to post types with `show_ui` set to true. |
0 | 415 |
*/ |
16 | 416 |
$cache_oembed_types = apply_filters( 'embed_cache_oembed_types', $post_types ); |
417 |
||
418 |
if ( empty( $post->ID ) || ! in_array( $post->post_type, $cache_oembed_types, true ) ) { |
|
0 | 419 |
return; |
5 | 420 |
} |
0 | 421 |
|
16 | 422 |
// Trigger a caching. |
5 | 423 |
if ( ! empty( $post->post_content ) ) { |
9 | 424 |
$this->post_ID = $post->ID; |
0 | 425 |
$this->usecache = false; |
426 |
||
427 |
$content = $this->run_shortcode( $post->post_content ); |
|
428 |
$this->autoembed( $content ); |
|
429 |
||
430 |
$this->usecache = true; |
|
431 |
} |
|
432 |
} |
|
433 |
||
434 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
435 |
* Passes any unlinked URLs that are on their own line to WP_Embed::shortcode() for potential embedding. |
0 | 436 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
437 |
* @see WP_Embed::autoembed_callback() |
0 | 438 |
* |
439 |
* @param string $content The content to be searched. |
|
440 |
* @return string Potentially modified $content. |
|
441 |
*/ |
|
5 | 442 |
public function autoembed( $content ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
443 |
// Replace line breaks from all HTML elements with placeholders. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
444 |
$content = wp_replace_in_html_tags( $content, array( "\n" => '<!-- wp-line-break -->' ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
445 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
446 |
if ( preg_match( '#(^|\s|>)https?://#i', $content ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
447 |
// Find URLs on their own line. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
448 |
$content = preg_replace_callback( '|^(\s*)(https?://[^\s<>"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
449 |
// Find URLs in their own paragraph. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
450 |
$content = preg_replace_callback( '|(<p(?: [^>]*)?>\s*)(https?://[^\s<>"]+)(\s*<\/p>)|i', array( $this, 'autoembed_callback' ), $content ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
451 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
452 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
453 |
// Put the line breaks back. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
454 |
return str_replace( '<!-- wp-line-break -->', "\n", $content ); |
0 | 455 |
} |
456 |
||
457 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
458 |
* Callback function for WP_Embed::autoembed(). |
0 | 459 |
* |
19 | 460 |
* @param array $matches A regex match array. |
0 | 461 |
* @return string The embed HTML on success, otherwise the original URL. |
462 |
*/ |
|
19 | 463 |
public function autoembed_callback( $matches ) { |
9 | 464 |
$oldval = $this->linkifunknown; |
0 | 465 |
$this->linkifunknown = false; |
19 | 466 |
$return = $this->shortcode( array(), $matches[2] ); |
0 | 467 |
$this->linkifunknown = $oldval; |
468 |
||
19 | 469 |
return $matches[1] . $return . $matches[3]; |
0 | 470 |
} |
471 |
||
472 |
/** |
|
473 |
* Conditionally makes a hyperlink based on an internal class variable. |
|
474 |
* |
|
475 |
* @param string $url URL to potentially be linked. |
|
16 | 476 |
* @return string|false Linked URL or the original URL. False if 'return_false_on_fail' is true. |
0 | 477 |
*/ |
5 | 478 |
public function maybe_make_link( $url ) { |
479 |
if ( $this->return_false_on_fail ) { |
|
480 |
return false; |
|
481 |
} |
|
482 |
||
9 | 483 |
$output = ( $this->linkifunknown ) ? '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>' : $url; |
0 | 484 |
|
485 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
486 |
* Filters the returned, maybe-linked embed URL. |
0 | 487 |
* |
488 |
* @since 2.9.0 |
|
489 |
* |
|
490 |
* @param string $output The linked or original URL. |
|
491 |
* @param string $url The original URL. |
|
492 |
*/ |
|
493 |
return apply_filters( 'embed_maybe_make_link', $output, $url ); |
|
494 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
495 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
496 |
/** |
19 | 497 |
* Finds the oEmbed cache post ID for a given cache key. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
498 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
499 |
* @since 4.9.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
500 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
501 |
* @param string $cache_key oEmbed cache key. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
502 |
* @return int|null Post ID on success, null on failure. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
503 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
504 |
public function find_oembed_post_id( $cache_key ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
505 |
$cache_group = 'oembed_cache_post'; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
506 |
$oembed_post_id = wp_cache_get( $cache_key, $cache_group ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
507 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
508 |
if ( $oembed_post_id && 'oembed_cache' === get_post_type( $oembed_post_id ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
509 |
return $oembed_post_id; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
510 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
511 |
|
9 | 512 |
$oembed_post_query = new WP_Query( |
513 |
array( |
|
514 |
'post_type' => 'oembed_cache', |
|
515 |
'post_status' => 'publish', |
|
516 |
'name' => $cache_key, |
|
517 |
'posts_per_page' => 1, |
|
518 |
'no_found_rows' => true, |
|
519 |
'cache_results' => true, |
|
520 |
'update_post_meta_cache' => false, |
|
521 |
'update_post_term_cache' => false, |
|
522 |
'lazy_load_term_meta' => false, |
|
523 |
) |
|
524 |
); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
525 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
526 |
if ( ! empty( $oembed_post_query->posts ) ) { |
16 | 527 |
// Note: 'fields' => 'ids' is not being used in order to cache the post object as it will be needed. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
528 |
$oembed_post_id = $oembed_post_query->posts[0]->ID; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
529 |
wp_cache_set( $cache_key, $oembed_post_id, $cache_group ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
530 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
531 |
return $oembed_post_id; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
532 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
533 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
534 |
return null; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
535 |
} |
0 | 536 |
} |