PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 15.9
Jetpack – WP Security, Backup, Speed, & Growth v15.9
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / src / class-jetpack-script-data.php

class-jetpack-script-data.php in Jetpack – WP Security, Backup, Speed, & Growth 15.9, at src/class-jetpack-script-data.php

49 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Jetpack_Script_Data.
4 *
5 * Adds Jetpack-plugin-specific data to the consolidated JetpackScriptData object.
6 *
7 * @package automattic/jetpack
8 */
9
10 namespace Automattic\Jetpack\Plugin;
11
12 /**
13 * Jetpack_Script_Data class.
14 */
15 class Jetpack_Script_Data {
16
17 /**
18 * Configure script data.
19 */
20 public static function configure() {
21 add_filter( 'jetpack_admin_js_script_data', array( __CLASS__, 'set_admin_script_data' ), 10, 1 );
22 }
23
24 /**
25 * Add Jetpack-plugin-specific data to the consolidated JetpackScriptData object.
26 *
27 * @since 15.6
28 *
29 * @param array $data The script data.
30 * @return array
31 */
32 public static function set_admin_script_data( $data ) {
33 /**
34 * Whether to show the Jetpack branding in editor panels (e.g., SEO, AI Assistant).
35 *
36 * @since 15.6
37 *
38 * @param bool $show Whether to show the Jetpack editor panel branding. Defaults to true.
39 */
40 $data['jetpack'] = array(
41 'flags' => array(
42 'showJetpackBranding' => (bool) apply_filters( 'jetpack_show_editor_panel_branding', true ),
43 ),
44 );
45
46 return $data;
47 }
48 }
49