[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: sharing.php
<?php /** * Block Editor - Sharing feature. * * @package automattic/jetpack */ namespace Automattic\Jetpack\Extensions\Sharing; use Automattic\Jetpack\Modules; use Jetpack_Gutenberg; /** * Register Sharing plugin. * * @return void */ function register_plugins() { /* * The extension is available even when the module is not active, * so we can display a nudge to activate the module instead of the block. * However, since non-admins cannot activate modules, we do not display the empty block for them. */ if ( ! ( new Modules() )->is_active( 'sharedaddy' ) && ! current_user_can( 'jetpack_activate_modules' ) ) { return; } Jetpack_Gutenberg::set_extension_available( 'sharing' ); } add_action( 'jetpack_register_gutenberg_extensions', __NAMESPACE__ . '\register_plugins' ); /** * The Sharing panel is only displayed for post types that support sharing. * The sharing module declares support for sharing for all the public post types. * Let's do the same thing when the module isn't active yet. */ add_action( 'rest_api_init', function () { if ( ! ( new Modules() )->is_active( 'sharedaddy' ) ) { $post_types = get_post_types( array( 'public' => true ) ); foreach ( $post_types as $post_type ) { register_rest_field( $post_type, 'jetpack_sharing_enabled', array( 'get_callback' => function ( array $post ) { if ( ! isset( $post['id'] ) ) { return false; } return (bool) ! get_post_meta( $post['id'], 'sharing_disabled', true ); }, 'schema' => array( 'description' => __( 'Are sharing buttons enabled?', 'jetpack' ), 'type' => 'boolean', ), ) ); add_post_type_support( $post_type, 'jetpack-sharing-buttons' ); } } } );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium707.web-hosting.com
Server IP: 198.177.120.115
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium707.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.26 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
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 (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: urbaoubp
User ID (UID): 1252
Group ID (GID): 1257
Script Owner UID: 1252
Current Dir Owner: 1252