Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Module_Script_Data_Trait | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| module_script_data | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Front-end script data for the Divi 5 VideoPress module. |
| 4 | * |
| 5 | * @package automattic/jetpack-videopress |
| 6 | */ |
| 7 | |
| 8 | declare( strict_types = 1 ); |
| 9 | |
| 10 | namespace Automattic\Jetpack\VideoPress\Divi5\Traits; |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit( 0 ); |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Registers the module's front-end script data, mirroring the Visual Builder |
| 18 | * script data component. |
| 19 | */ |
| 20 | trait Module_Script_Data_Trait { |
| 21 | |
| 22 | /** |
| 23 | * Registers the module's script data. |
| 24 | * |
| 25 | * @param array $args The script data callback arguments. |
| 26 | * |
| 27 | * @return void |
| 28 | */ |
| 29 | public static function module_script_data( $args ) { |
| 30 | $elements = $args['elements']; |
| 31 | |
| 32 | $elements->script_data( |
| 33 | array( |
| 34 | 'attrName' => 'module', |
| 35 | ) |
| 36 | ); |
| 37 | } |
| 38 | } |