|
@@ 347-351 (lines=5) @@
|
| 344 |
|
public function register_inline_script( $handle, $file, $plugin_file, $deps = false, $ver = false, $in_footer = false ) { |
| 345 |
|
$registered = wp_register_script( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $in_footer ); |
| 346 |
|
|
| 347 |
|
if ( $registered ) { |
| 348 |
|
$file_full_path = dirname( $plugin_file ) . '/' . $file; |
| 349 |
|
wp_script_add_data( $handle, 'jetpack-inline', true ); |
| 350 |
|
wp_script_add_data( $handle, 'jetpack-inline-file', $file_full_path ); |
| 351 |
|
} |
| 352 |
|
|
| 353 |
|
return $registered; |
| 354 |
|
} |
|
@@ 364-368 (lines=5) @@
|
| 361 |
|
public function register_inline_style( $handle, $file, $plugin_file, $deps = array(), $ver = false, $media = 'all' ) { |
| 362 |
|
$registered = wp_register_style( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $media ); |
| 363 |
|
|
| 364 |
|
if ( $registered ) { |
| 365 |
|
$file_full_path = dirname( $plugin_file ) . '/' . $file; |
| 366 |
|
wp_style_add_data( $handle, 'jetpack-inline', true ); |
| 367 |
|
wp_style_add_data( $handle, 'jetpack-inline-file', $file_full_path ); |
| 368 |
|
} |
| 369 |
|
} |
| 370 |
|
} |
| 371 |
|
|