Submit
Path:
F:
/
Inetpub
/
vhosts
/
solasmarine.com.tr
/
httpdocs
/
wp-includes
/
File Content:
class-wp-oembed-controller.php
<?php /** * WP_oEmbed_Controller class, used to provide an oEmbed endpoint. * * @package WordPress * @subpackage Embeds * @since 4.4.0 */ /** * oEmbed API endpoint controller. * * Registers the REST API route and delivers the response data. * The output format (XML or JSON) is handled by the REST API. * * @since 4.4.0 */ #[AllowDynamicProperties] final class WP_oEmbed_Controller { /** * Register the oEmbed REST API route. * * @since 4.4.0 */ public function register_routes() { /** * Filters the maxwidth oEmbed parameter. * * @since 4.4.0 * * @param int $maxwidth Maximum allowed width. Default 600. */ $maxwidth = apply_filters( 'oembed_default_width', 600 ); register_rest_route( 'oembed/1.0', '/embed', array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ), 'permission_callback' => '__return_true', 'args' => array( 'url' => array( 'description' => __( 'The URL of the resource for which to fetch oEmbed data.' ), 'required' => true, 'type' => 'string', 'format' => 'uri', ), 'format' => array( 'default' => 'json', 'sanitize_callback' => 'wp_oembed_ensure_format', ), 'maxwidth' => array( 'default' => $maxwidth, 'sanitize_callback' => 'absint', ), ), ), ) ); register_rest_route( 'oembed/1.0', '/proxy', array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_proxy_item' ), 'permission_callback' => array( $this, 'get_proxy_item_permissions_check' ), 'args' => array( 'url' => array( 'description' => __( 'The URL of the resource for which to fetch oEmbed data.' ), 'required' => true, 'type' => 'string', 'format' => 'uri', ), 'format' => array( 'description' => __( 'The oEmbed format to use.' ), 'type' => 'string', 'default' => 'json', 'enum' => array( 'json', 'xml', ), ), 'maxwidth' => array( 'description' => __( 'The maximum width of the embed frame in pixels.' ), 'type' => 'integer', 'default' => $maxwidth, 'sanitize_callback' => 'absint', ), 'maxheight' => array( 'description' => __( 'The maximum height of the embed frame in pixels.' ), 'type' => 'integer', 'sanitize_callback' => 'absint', ), 'discover' => array( 'description' => __( 'Whether to perform an oEmbed discovery request for unsanctioned providers.' ), 'type' => 'boolean', 'default' => true, ), ), ), ) ); } /** * Callback for the embed API endpoint. * * Returns the JSON object for the post. * * @since 4.4.0 * * @param WP_REST_Request $request Full data about the request. * @return array|WP_Error oEmbed response data or WP_Error on failure. */ public function get_item( $request ) { $post_id = url_to_postid( $request['url'] ); /** * Filters the determined post ID. * * @since 4.4.0 * * @param int $post_id The post ID. * @param string $url The requested URL. */ $post_id = apply_filters( 'oembed_request_post_id', $post_id, $request['url'] ); $data = get_oembed_response_data( $post_id, $request['maxwidth'] ); if ( ! $data ) { return new WP_Error( 'oembed_invalid_url', get_status_header_desc( 404 ), array( 'status' => 404 ) ); } return $data; } /** * Checks if current user can make a proxy oEmbed request. * * @since 4.8.0 * * @return true|WP_Error True if the request has read access, WP_Error object otherwise. */ public function get_proxy_item_permissions_check() { if ( ! current_user_can( 'edit_posts' ) ) { return new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to make proxied oEmbed requests.' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } /** * Callback for the proxy API endpoint. * * Returns the JSON object for the proxied item. * * @since 4.8.0 * * @see WP_oEmbed::get_html() * @global WP_Embed $wp_embed WordPress Embed object. * @global WP_Scripts $wp_scripts * * @param WP_REST_Request $request Full data about the request. * @return object|WP_Error oEmbed response data or WP_Error on failure. */ public function get_proxy_item( $request ) { global $wp_embed, $wp_scripts; $args = $request->get_params(); // Serve oEmbed data from cache if set. unset( $args['_wpnonce'] ); $cache_key = 'oembed_' . md5( serialize( $args ) ); $data = get_transient( $cache_key ); if ( ! empty( $data ) ) { return $data; } $url = $request['url']; unset( $args['url'] ); // Copy maxwidth/maxheight to width/height since WP_oEmbed::fetch() uses these arg names. if ( isset( $args['maxwidth'] ) ) { $args['width'] = $args['maxwidth']; } if ( isset( $args['maxheight'] ) ) { $args['height'] = $args['maxheight']; } // Short-circuit process for URLs belonging to the current site. $data = get_oembed_response_data_for_url( $url, $args ); if ( $data ) { return $data; } $data = _wp_oembed_get_object()->get_data( $url, $args ); if ( false === $data ) { // Try using a classic embed, instead. /* @var WP_Embed $wp_embed */ $html = $wp_embed->get_embed_handler_html( $args, $url ); if ( $html ) { // Check if any scripts were enqueued by the shortcode, and include them in the response. $enqueued_scripts = array(); foreach ( $wp_scripts->queue as $script ) { $enqueued_scripts[] = $wp_scripts->registered[ $script ]->src; } return (object) array( 'provider_name' => __( 'Embed Handler' ), 'html' => $html, 'scripts' => $enqueued_scripts, ); } return new WP_Error( 'oembed_invalid_url', get_status_header_desc( 404 ), array( 'status' => 404 ) ); } /** This filter is documented in wp-includes/class-wp-oembed.php */ $data->html = apply_filters( 'oembed_result', _wp_oembed_get_object()->data2html( (object) $data, $url ), $url, $args ); /** * Filters the oEmbed TTL value (time to live). * * Similar to the {@see 'oembed_ttl'} filter, but for the REST API * oEmbed proxy endpoint. * * @since 4.8.0 * * @param int $time Time to live (in seconds). * @param string $url The attempted embed URL. * @param array $args An array of embed request arguments. */ $ttl = apply_filters( 'rest_oembed_ttl', DAY_IN_SECONDS, $url, $args ); set_transient( $cache_key, $data, $ttl ); return $data; } }
Edit
Rename
Chmod
Delete
FILE
DIR
INFO
CMD
Name
Size
Permission
Action
ID3
---
0777
IXR
---
0777
PHPMailer
---
0777
Requests
---
0777
SimplePie
---
0777
Text
---
0777
abilities-api
---
0777
ai-client
---
0777
assets
---
0777
block-bindings
---
0777
block-patterns
---
0777
block-supports
---
0777
blocks
---
0777
build
---
0777
certificates
---
0777
collaboration
---
0777
css
---
0777
customize
---
0777
fonts
---
0777
html-api
---
0777
images
---
0777
interactivity-api
---
0777
js
---
0777
l10n
---
0777
php-ai-client
---
0777
php-compat
---
0777
pomo
---
0777
rest-api
---
0777
sitemaps
---
0777
sodium_compat
---
0777
style-engine
---
0777
theme-compat
---
0777
widgets
---
0777
abilities-api.php
24369bytes
0666
abilities.php
8009bytes
0666
admin-bar.php
39315bytes
0666
ai-client.php
2549bytes
0666
atomlib.php
12181bytes
0666
author-template.php
19844bytes
0666
block-bindings.php
7526bytes
0666
block-editor.php
28724bytes
0666
block-i18n.json
316bytes
0666
block-patterns.php
15606bytes
0666
block-template-utils.php
62804bytes
0666
block-template.php
18261bytes
0666
blocks.php
119442bytes
0666
bookmark-template.php
12768bytes
0666
bookmark.php
15427bytes
0666
cache-compat.php
11021bytes
0666
cache.php
13486bytes
0666
canonical.php
34645bytes
0666
capabilities.php
43633bytes
0666
category-template.php
56985bytes
0666
category.php
12834bytes
0666
class-IXR.php
2616bytes
0666
class-avif-info.php
30008bytes
0666
class-feed.php
539bytes
0666
class-http.php
367bytes
0666
class-json.php
43676bytes
0666
class-oembed.php
401bytes
0666
class-phpass.php
6771bytes
0666
class-phpmailer.php
664bytes
0666
class-pop3.php
21121bytes
0666
class-requests.php
2237bytes
0666
class-simplepie.php
453bytes
0666
class-smtp.php
457bytes
0666
class-snoopy.php
37715bytes
0666
class-walker-category-dropdown.php
2469bytes
0666
class-walker-category.php
8477bytes
0666
class-walker-comment.php
14221bytes
0666
class-walker-nav-menu.php
12044bytes
0666
class-walker-page-dropdown.php
2710bytes
0666
class-walker-page.php
7612bytes
0666
class-wp-admin-bar.php
18004bytes
0666
class-wp-ajax-response.php
5266bytes
0666
class-wp-application-passwords.php
17099bytes
0666
class-wp-block-bindings-registry.php
8263bytes
0666
class-wp-block-bindings-source.php
2992bytes
0666
class-wp-block-editor-context.php
1350bytes
0666
class-wp-block-list.php
4713bytes
0666
class-wp-block-metadata-registry.php
11846bytes
0666
class-wp-block-parser-block.php
2555bytes
0666
class-wp-block-parser-frame.php
1994bytes
0666
class-wp-block-parser.php
11520bytes
0666
class-wp-block-pattern-categories-registry.php
4383bytes
0666
class-wp-block-patterns-registry.php
10312bytes
0666
class-wp-block-processor.php
69959bytes
0666
class-wp-block-styles-registry.php
6419bytes
0666
class-wp-block-supports.php
6551bytes
0666
class-wp-block-template.php
2033bytes
0666
class-wp-block-templates-registry.php
7080bytes
0666
class-wp-block-type-registry.php
5030bytes
0666
class-wp-block-type.php
17233bytes
0666
class-wp-block.php
24720bytes
0666
class-wp-classic-to-block-menu-converter.php
4026bytes
0666
class-wp-comment-query.php
48631bytes
0666
class-wp-comment.php
9371bytes
0666
class-wp-connector-registry.php
14409bytes
0666
class-wp-customize-control.php
26119bytes
0666
class-wp-customize-manager.php
202881bytes
0666
class-wp-customize-nav-menus.php
57968bytes
0666
class-wp-customize-panel.php
10710bytes
0666
class-wp-customize-section.php
11209bytes
0666
class-wp-customize-setting.php
29963bytes
0666
class-wp-customize-widgets.php
72594bytes
0666
class-wp-date-query.php
35970bytes
0666
class-wp-dependencies.php
17089bytes
0666
class-wp-dependency.php
2653bytes
0666
class-wp-duotone.php
40910bytes
0666
class-wp-editor.php
72228bytes
0666
class-wp-embed.php
15908bytes
0666
class-wp-error.php
7502bytes
0666
class-wp-exception.php
253bytes
0666
class-wp-fatal-error-handler.php
8150bytes
0666
class-wp-feed-cache-transient.php
3304bytes
0666
class-wp-feed-cache.php
969bytes
0666
class-wp-hook.php
16636bytes
0666
class-wp-http-cookie.php
7269bytes
0666
class-wp-http-curl.php
13261bytes
0666
class-wp-http-encoding.php
6689bytes
0666
class-wp-http-ixr-client.php
3516bytes
0666
class-wp-http-proxy.php
5980bytes
0666
class-wp-http-requests-hooks.php
2022bytes
0666
class-wp-http-requests-response.php
4243bytes
0666
class-wp-http-response.php
2977bytes
0666
class-wp-http-streams.php
16764bytes
0666
class-wp-http.php
41648bytes
0666
class-wp-icons-registry.php
7857bytes
0666
class-wp-image-editor-gd.php
20705bytes
0666
class-wp-image-editor-imagick.php
36977bytes
0666
class-wp-image-editor.php
17418bytes
0666
class-wp-list-util.php
7443bytes
0666
class-wp-locale-switcher.php
6776bytes
0666
class-wp-locale.php
16848bytes
0666
class-wp-matchesmapregex.php
1828bytes
0666
class-wp-meta-query.php
30507bytes
0666
class-wp-metadata-lazyloader.php
6833bytes
0666
class-wp-navigation-fallback.php
9193bytes
0666
class-wp-network-query.php
19714bytes
0666
class-wp-network.php
12296bytes
0666
class-wp-object-cache.php
17524bytes
0666
class-wp-oembed-controller.php
6905bytes
0666
class-wp-oembed.php
31603bytes
0666
class-wp-paused-extensions-storage.php
5067bytes
0666
class-wp-phpmailer.php
4348bytes
0666
class-wp-plugin-dependencies.php
25182bytes
0666
class-wp-post-type.php
30672bytes
0666
class-wp-post.php
6483bytes
0666
class-wp-query.php
163331bytes
0666
class-wp-recovery-mode-cookie-service.php
6877bytes
0666
class-wp-recovery-mode-email-service.php
11166bytes
0666
class-wp-recovery-mode-key-service.php
4914bytes
0666
class-wp-recovery-mode-link-service.php
3523bytes
0666
class-wp-recovery-mode.php
11453bytes
0666
class-wp-rewrite.php
63693bytes
0666
class-wp-role.php
2523bytes
0666
class-wp-roles.php
9321bytes
0666
class-wp-script-modules.php
40599bytes
0666
class-wp-scripts.php
36789bytes
0666
class-wp-session-tokens.php
7319bytes
0666
class-wp-simplepie-file.php
3552bytes
0666
class-wp-simplepie-sanitize-kses.php
1910bytes
0666
class-wp-site-query.php
31482bytes
0666
class-wp-site.php
7459bytes
0666
class-wp-speculation-rules.php
7554bytes
0666
class-wp-styles.php
13356bytes
0666
class-wp-tax-query.php
19577bytes
0666
class-wp-taxonomy.php
18559bytes
0666
class-wp-term-query.php
40751bytes
0666
class-wp-term.php
5263bytes
0666
class-wp-text-diff-renderer-inline.php
979bytes
0666
class-wp-text-diff-renderer-table.php
18932bytes
0666
class-wp-textdomain-registry.php
10481bytes
0666
class-wp-theme-json-data.php
1809bytes
0666
class-wp-theme-json-resolver.php
35692bytes
0666
class-wp-theme-json-schema.php
7367bytes
0666
class-wp-theme-json.php
173639bytes
0666
class-wp-theme.php
65761bytes
0666
class-wp-token-map.php
28618bytes
0666
class-wp-url-pattern-prefixer.php
4802bytes
0666
class-wp-user-meta-session-tokens.php
2954bytes
0666
class-wp-user-query.php
44102bytes
0666
class-wp-user-request.php
2305bytes
0666
class-wp-user.php
23016bytes
0666
class-wp-walker.php
13322bytes
0666
class-wp-widget-factory.php
3347bytes
0666
class-wp-widget.php
18417bytes
0666
class-wp-xmlrpc-server.php
215020bytes
0666
class-wp.php
26371bytes
0666
class-wpdb.php
118638bytes
0666
class.wp-dependencies.php
373bytes
0666
class.wp-scripts.php
343bytes
0666
class.wp-styles.php
338bytes
0666
collaboration.php
2158bytes
0666
comment-template.php
103211bytes
0666
comment.php
134085bytes
0666
compat-utf8.php
19554bytes
0666
compat.php
16063bytes
0666
connectors.php
24080bytes
0666
cron.php
44996bytes
0666
date.php
400bytes
0666
default-constants.php
11365bytes
0666
default-filters.php
37417bytes
0666
default-widgets.php
2295bytes
0666
deprecated.php
193977bytes
0666
embed-template.php
338bytes
0666
embed.php
38906bytes
0666
error-protection.php
4092bytes
0666
feed-atom-comments.php
5504bytes
0666
feed-atom.php
3121bytes
0666
feed-rdf.php
2668bytes
0666
feed-rss.php
1189bytes
0666
feed-rss2-comments.php
4136bytes
0666
feed-rss2.php
3799bytes
0666
feed.php
25189bytes
0666
fonts.php
9790bytes
0666
formatting.php
354690bytes
0666
functions.php
290326bytes
0666
functions.wp-scripts.php
20492bytes
0666
functions.wp-styles.php
8654bytes
0666
general-template.php
174934bytes
0666
global-styles-and-settings.php
20780bytes
0666
http.php
27255bytes
0666
https-detection.php
5857bytes
0666
https-migration.php
4741bytes
0666
kses.php
82580bytes
0666
l10n.php
71415bytes
0666
link-template.php
160147bytes
0666
load.php
56475bytes
0666
locale.php
162bytes
0666
media-template.php
63275bytes
0666
media.php
223794bytes
0666
meta.php
66739bytes
0666
ms-blogs.php
26331bytes
0666
ms-default-constants.php
4921bytes
0666
ms-default-filters.php
6636bytes
0666
ms-deprecated.php
21750bytes
0666
ms-files.php
2857bytes
0666
ms-functions.php
91842bytes
0666
ms-load.php
20038bytes
0666
ms-network.php
3782bytes
0666
ms-settings.php
4204bytes
0666
ms-site.php
41729bytes
0666
nav-menu-template.php
25990bytes
0666
nav-menu.php
44269bytes
0666
option.php
105079bytes
0666
pluggable-deprecated.php
6324bytes
0666
pluggable.php
127558bytes
0666
plugin.php
36501bytes
0666
post-formats.php
7070bytes
0666
post-template.php
68615bytes
0666
post-thumbnail-template.php
10879bytes
0666
post.php
296525bytes
0666
query.php
37095bytes
0666
registration-functions.php
200bytes
0666
registration.php
200bytes
0666
rest-api.php
100881bytes
0666
revision.php
30712bytes
0666
rewrite.php
19461bytes
0666
robots-template.php
5185bytes
0666
rss-functions.php
255bytes
0666
rss.php
23203bytes
0666
script-loader.php
163126bytes
0666
script-modules.php
11943bytes
0666
session.php
258bytes
0666
shortcodes.php
24034bytes
0666
sitemaps.php
3238bytes
0666
speculative-loading.php
8600bytes
0666
spl-autoload-compat.php
441bytes
0666
style-engine.php
7563bytes
0666
taxonomy.php
177144bytes
0666
template-canvas.php
544bytes
0666
template-loader.php
4267bytes
0666
template.php
36824bytes
0666
theme-i18n.json
1892bytes
0666
theme-previews.php
2887bytes
0666
theme-templates.php
4060bytes
0666
theme.json
9037bytes
0666
theme.php
134631bytes
0666
update.php
38276bytes
0666
user.php
178824bytes
0666
utf8.php
7260bytes
0666
vars.php
6607bytes
0666
version.php
1131bytes
0666
view-transitions.php
602bytes
0666
widgets.php
70828bytes
0666
wp-db.php
445bytes
0666
wp-diff.php
799bytes
0666