| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | function send_theme_info() { |
||
| 14 | global $_wp_theme_features; |
||
| 15 | |||
| 16 | $theme_support = array(); |
||
| 17 | |||
| 18 | foreach ( Jetpack_Sync_Defaults::$default_theme_support_whitelist as $theme_feature ) { |
||
|
|
|||
| 19 | $has_support = current_theme_supports( $theme_feature ); |
||
| 20 | if ( $has_support ) { |
||
| 21 | $theme_support[ $theme_feature ] = $_wp_theme_features[ $theme_feature ]; |
||
| 22 | } |
||
| 23 | |||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Fires when the client needs to sync theme support info |
||
| 28 | * Only sends theme support attributes whitelisted in Jetpack_Sync_Defaults::$default_theme_support_whitelist |
||
| 29 | * |
||
| 30 | * @since 4.2.0 |
||
| 31 | * |
||
| 32 | * @param object the theme support hash |
||
| 33 | */ |
||
| 34 | do_action( 'jetpack_sync_current_theme_support', $theme_support ); |
||
| 35 | return 1; // The number of actions enqueued |
||
| 36 | } |
||
| 37 | } |
This check looks for access to properties that are not accessible from the current context.
If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.