/home
/tmubiotech
/public_html
/wp
/wp-includes
/embed.php
}
if ( null === $node ) {
$node = new SimpleXMLElement( '<oembed></oembed>' );
}
foreach ( $data as $key => $value ) {
if ( is_numeric( $key ) ) {
$key = 'oembed';
}
if ( is_array( $value ) ) {
$item = $node->addChild( $key );
_oembed_create_xml( $value, $item );
} else {
$node->addChild( $key, esc_html( $value ) );
}
}
return $node->asXML();
}
/**
* Filters the given oEmbed HTML to make sure iframes have a title attribute.
*
* @since 5.2.0
*
* @param string $result The oEmbed HTML result.
* @param object $data A data object result from an oEmbed provider.
* @param string $url The URL of the content to be embedded.
* @return string The filtered oEmbed result.
*/
function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) {
if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) {
return $result;
}
$title = ! empty( $data->title ) ? $data->title : '';
$pattern = '`<iframe([^>]*)>`i';
Arguments
"SimpleXMLElement::asXML(): xmlEscapeEntities : char out of range"
/home
/tmubiotech
/public_html
/wp
/wp-includes
/embed.php
}
if ( null === $node ) {
$node = new SimpleXMLElement( '<oembed></oembed>' );
}
foreach ( $data as $key => $value ) {
if ( is_numeric( $key ) ) {
$key = 'oembed';
}
if ( is_array( $value ) ) {
$item = $node->addChild( $key );
_oembed_create_xml( $value, $item );
} else {
$node->addChild( $key, esc_html( $value ) );
}
}
return $node->asXML();
}
/**
* Filters the given oEmbed HTML to make sure iframes have a title attribute.
*
* @since 5.2.0
*
* @param string $result The oEmbed HTML result.
* @param object $data A data object result from an oEmbed provider.
* @param string $url The URL of the content to be embedded.
* @return string The filtered oEmbed result.
*/
function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) {
if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) {
return $result;
}
$title = ! empty( $data->title ) ? $data->title : '';
$pattern = '`<iframe([^>]*)>`i';
/home
/tmubiotech
/public_html
/wp
/wp-includes
/embed.php
function _oembed_rest_pre_serve_request( $served, $result, $request, $server ) {
$params = $request->get_params();
if ( '/oembed/1.0/embed' !== $request->get_route() || 'GET' !== $request->get_method() ) {
return $served;
}
if ( ! isset( $params['format'] ) || 'xml' !== $params['format'] ) {
return $served;
}
// Embed links inside the request.
$data = $server->response_to_data( $result, false );
if ( ! class_exists( 'SimpleXMLElement' ) ) {
status_header( 501 );
die( get_status_header_desc( 501 ) );
}
$result = _oembed_create_xml( $data );
// Bail if there's no XML.
if ( ! $result ) {
status_header( 501 );
return get_status_header_desc( 501 );
}
if ( ! headers_sent() ) {
$server->send_header( 'Content-Type', 'text/xml; charset=' . get_option( 'blog_charset' ) );
}
echo $result;
return true;
}
/**
* Creates an XML string from a given array.
*
* @since 4.4.0
Arguments
array:13 [
"version" => "1.0"
"provider_name" => "北醫大生技EMBA"
"provider_url" => "https://biotech-emba.tmu.edu.tw"
"author_name" => "maxine"
"author_url" => "https://biotech-emba.tmu.edu.tw/author/maxine/"
"title" => "生技EMBA BIG電影公益活動\v感謝餐會"
"type" => "rich"
"width" => 600
"height" => 338
"html" => """
<blockquote class="wp-embedded-content"><a href="https://biotech-emba.tmu.edu.tw/%e7%94%9f%e6%8a%80emba-big%e9%9b%bb%e5%bd%b1%e5%85%ac%e7%9b%8a%e6%b4%bb%e5%8b%95%e6%84%9f%e8%ac%9d%e9%a4%90%e6%9c%83/">生技EMBA BIG電影公益活動\v感謝餐會</a></blockquote>\n
<script type='text/javascript'>\n
<!--//--><![CDATA[//><!--\n
\t\t/*! This file is auto-generated */\n
\t\t!function(d,l){"use strict";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c<n.length;c++)n[c].style.display="none";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute("style"),"height"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if("link"===t.message)if(i=l.createElement("a"),a=l.createElement("a"),i.href=r.getAttribute("src"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",t,!1),d.addEventListener("load",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf("MSIE 10"),i=!!navigator.userAgent.match(/Trident.*rv:11\./),a=l.querySelectorAll("iframe.wp-embedded-content"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute("data-secret"))t=Math.random().toString(36).substr(2,10),e.src+="#?secret="+t,e.setAttribute("data-secret",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute("security"),e.parentNode.replaceChild(t,e)}}}}(window,document);\n
//--><!]]>\n
</script><iframe sandbox="allow-scripts" security="restricted" src="https://biotech-emba.tmu.edu.tw/%e7%94%9f%e6%8a%80emba-big%e9%9b%bb%e5%bd%b1%e5%85%ac%e7%9b%8a%e6%b4%bb%e5%8b%95%e6%84%9f%e8%ac%9d%e9%a4%90%e6%9c%83/embed/" width="600" height="338" title="生技EMBA BIG電影公益活動\v感謝餐會 — 北醫大生技EMBA" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe>
"""
"thumbnail_url" => "https://biotech-emba.tmu.edu.tw/app/uploads/biotech-emba/感謝餐會照片.png"
"thumbnail_width" => 375
"thumbnail_height" => 293
]
/home
/tmubiotech
/public_html
/wp
/wp-includes
/class-wp-hook.php
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level--;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
Arguments
false
WP_REST_Response {}
WP_REST_Request {}
WP_REST_Server {}
/home
/tmubiotech
/public_html
/wp
/wp-includes
/plugin.php
$wp_current_filter[] = $hook_name;
_wp_call_all_hook( $args );
}
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return $value;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
// Don't pass the tag name to WP_Hook.
array_shift( $args );
$filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
array_pop( $wp_current_filter );
return $filtered;
}
/**
* Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
*
* @since 3.0.0
*
* @see apply_filters() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the filter hook.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
* @return mixed The filtered value after all hooked functions are applied to it.
Arguments
false
array:4 [
0 => false
1 => WP_REST_Response {}
2 => WP_REST_Request {}
3 => WP_REST_Server {}
]
/home
/tmubiotech
/public_html
/wp
/wp-includes
/rest-api
/class-wp-rest-server.php
$this->send_headers( $headers );
$code = $result->get_status();
$this->set_status( $code );
/**
* Filters whether the REST API request has already been served.
*
* Allow sending the request manually - by returning true, the API result
* will not be sent to the client.
*
* @since 4.4.0
*
* @param bool $served Whether the request has already been served.
* Default false.
* @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`.
* @param WP_REST_Request $request Request used to generate the response.
* @param WP_REST_Server $server Server instance.
*/
$served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this );
if ( ! $served ) {
if ( 'HEAD' === $request->get_method() ) {
return null;
}
// Embed links inside the request.
$embed = isset( $_GET['_embed'] ) ? rest_parse_embed_param( $_GET['_embed'] ) : false;
$result = $this->response_to_data( $result, $embed );
/**
* Filters the REST API response.
*
* Allows modification of the response data after inserting
* embedded data (if any) and before echoing the response data.
*
* @since 4.8.1
*
* @param array $result Response data to send to the client.
* @param WP_REST_Server $server Server instance.
Arguments
"rest_pre_serve_request"
false
WP_REST_Response {}
WP_REST_Request {}
WP_REST_Server {}
/home
/tmubiotech
/public_html
/wp
/wp-includes
/rest-api.php
return;
}
/**
* Whether this is a REST Request.
*
* @since 4.4.0
* @var bool
*/
define( 'REST_REQUEST', true );
// Initialize the server.
$server = rest_get_server();
// Fire off the request.
$route = untrailingslashit( $GLOBALS['wp']->query_vars['rest_route'] );
if ( empty( $route ) ) {
$route = '/';
}
$server->serve_request( $route );
// We're done.
die();
}
/**
* Retrieves the URL prefix for any API resource.
*
* @since 4.4.0
*
* @return string Prefix.
*/
function rest_get_url_prefix() {
/**
* Filters the REST URL prefix.
*
* @since 4.4.0
*
* @param string $prefix URL prefix. Default 'wp-json'.
*/
Arguments
/home
/tmubiotech
/public_html
/wp
/wp-includes
/class-wp-hook.php
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level--;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
Arguments
/home
/tmubiotech
/public_html
/wp
/wp-includes
/class-wp-hook.php
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level--;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
do {
$priority = current( $this->iterations[ $nesting_level ] );
Arguments
""
array:1 [
0 => WP {}
]
/home
/tmubiotech
/public_html
/wp
/wp-includes
/plugin.php
// Do 'all' actions first.
if ( isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
$all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
_wp_call_all_hook( $all_args );
}
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
$wp_filter[ $hook_name ]->do_action( $args );
array_pop( $wp_current_filter );
}
/**
* Checks if any action has been registered for a hook.
*
* When using the `$callback` argument, this function may return a non-boolean value
* that evaluates to false (e.g. 0), so use the `===` operator for testing the return value.
*
* @since 2.5.0
*
* @see has_filter() has_action() is an alias of has_filter().
*
* @param string $hook_name The name of the action hook.
* @param callable|false $callback Optional. The callback to check for. Default false.
* @return bool|int If `$callback` is omitted, returns boolean for whether the hook has
* anything registered. When checking a specific function, the priority
* of that hook is returned, or false if the function is not attached.
*/
Arguments
/home
/tmubiotech
/public_html
/wp
/wp-includes
/class-wp.php
$this->query_vars['error'] = $error;
}
/**
* Filters the array of parsed query variables.
*
* @since 2.1.0
*
* @param array $query_vars The array of requested query variables.
*/
$this->query_vars = apply_filters( 'request', $this->query_vars );
/**
* Fires once all query variables for the current request have been parsed.
*
* @since 2.1.0
*
* @param WP $this Current WordPress environment instance (passed by reference).
*/
do_action_ref_array( 'parse_request', array( &$this ) );
}
/**
* Sends additional HTTP headers for caching, content type, etc.
*
* Sets the Content-Type header. Sets the 'error' status (if passed) and optionally exits.
* If showing a feed, it will also send Last-Modified, ETag, and 304 status if needed.
*
* @since 2.0.0
* @since 4.4.0 `X-Pingback` header is added conditionally after posts have been queried in handle_404().
*/
public function send_headers() {
$headers = array();
$status = null;
$exit_required = false;
if ( is_user_logged_in() ) {
$headers = array_merge( $headers, wp_get_nocache_headers() );
} elseif ( ! empty( $_GET['unapproved'] ) && ! empty( $_GET['moderation-hash'] ) ) {
// Unmoderated comments are only visible for 10 minutes via the moderation hash.
Arguments
"parse_request"
array:1 [
0 => WP {}
]
/home
/tmubiotech
/public_html
/wp
/wp-includes
/class-wp.php
nocache_headers();
} else {
status_header( 200 );
}
}
/**
* Sets up all of the variables required by the WordPress environment.
*
* The action {@see 'wp'} has one parameter that references the WP object. It
* allows for accessing the properties and methods to further manipulate the
* object.
*
* @since 2.0.0
*
* @param string|array $query_args Passed to parse_request().
*/
public function main( $query_args = '' ) {
$this->init();
$this->parse_request( $query_args );
$this->send_headers();
$this->query_posts();
$this->handle_404();
$this->register_globals();
/**
* Fires once the WordPress environment has been set up.
*
* @since 2.1.0
*
* @param WP $this Current WordPress environment instance (passed by reference).
*/
do_action_ref_array( 'wp', array( &$this ) );
}
}
Arguments
/home
/tmubiotech
/public_html
/wp
/wp-includes
/functions.php
}
return wp_remote_retrieve_body( $response );
}
/**
* Set up the WordPress query.
*
* @since 2.0.0
*
* @global WP $wp Current WordPress environment instance.
* @global WP_Query $wp_query WordPress Query object.
* @global WP_Query $wp_the_query Copy of the WordPress Query object.
*
* @param string|array $query_vars Default WP_Query arguments.
*/
function wp( $query_vars = '' ) {
global $wp, $wp_query, $wp_the_query;
$wp->main( $query_vars );
if ( ! isset( $wp_the_query ) ) {
$wp_the_query = $wp_query;
}
}
/**
* Retrieve the description for the HTTP status.
*
* @since 2.3.0
* @since 3.9.0 Added status codes 418, 428, 429, 431, and 511.
* @since 4.5.0 Added status codes 308, 421, and 451.
* @since 5.1.0 Added status code 103.
*
* @global array $wp_header_to_desc
*
* @param int $code HTTP status code.
* @return string Status description if found, an empty string otherwise.
*/
function get_status_header_desc( $code ) {
Arguments
/home
/tmubiotech
/public_html
/wp
/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
/home
/tmubiotech
/public_html
/index.php
<?php
/**
* WordPress View Bootstrapper
*/
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
Arguments
"/home/tmubiotech/public_html/wp/wp-blog-header.php"