|
@@ 333-337 (lines=5) @@
|
| 330 |
|
public function register_inline_script( $handle, $file, $plugin_file, $deps = false, $ver = false, $in_footer = false ) { |
| 331 |
|
$registered = wp_register_script( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $in_footer ); |
| 332 |
|
|
| 333 |
|
if ( $registered ) { |
| 334 |
|
$file_full_path = dirname( $plugin_file ) . '/' . $file; |
| 335 |
|
wp_script_add_data( $handle, 'jetpack-inline', true ); |
| 336 |
|
wp_script_add_data( $handle, 'jetpack-inline-file', $file_full_path ); |
| 337 |
|
} |
| 338 |
|
|
| 339 |
|
return $registered; |
| 340 |
|
} |
|
@@ 350-354 (lines=5) @@
|
| 347 |
|
public function register_inline_style( $handle, $file, $plugin_file, $deps = array(), $ver = false, $media = 'all' ) { |
| 348 |
|
$registered = wp_register_style( $handle, plugins_url( $file, $plugin_file ), $deps, $ver, $media ); |
| 349 |
|
|
| 350 |
|
if ( $registered ) { |
| 351 |
|
$file_full_path = dirname( $plugin_file ) . '/' . $file; |
| 352 |
|
wp_style_add_data( $handle, 'jetpack-inline', true ); |
| 353 |
|
wp_style_add_data( $handle, 'jetpack-inline-file', $file_full_path ); |
| 354 |
|
} |
| 355 |
|
} |
| 356 |
|
} |
| 357 |
|
|