@@ 33-51 (lines=19) @@ | ||
30 | return; |
|
31 | } |
|
32 | ||
33 | if ( 'install' === $details['action'] ) { |
|
34 | $theme = $upgrader->theme_info(); |
|
35 | $theme_info = array( |
|
36 | 'name' => $theme->get('Name'), |
|
37 | 'version' => $theme->get('Version'), |
|
38 | 'uri' => $theme->get('ThemeURI'), |
|
39 | ); |
|
40 | ||
41 | /** |
|
42 | * Signals to the sync listener that a theme was installed and a sync action |
|
43 | * reflecting the installation and the theme info should be sent |
|
44 | * |
|
45 | * @since 4.9.0 |
|
46 | * |
|
47 | * @param string $theme->theme_root Text domain of the theme |
|
48 | * @param mixed $theme_info Array of abbreviated theme info |
|
49 | */ |
|
50 | do_action( 'jetpack_installed_theme', $theme->stylesheet, $theme_info ); |
|
51 | } |
|
52 | ||
53 | if ( 'update' === $details['action'] ) { |
|
54 | $theme = $upgrader->theme_info(); |
|
@@ 53-71 (lines=19) @@ | ||
50 | do_action( 'jetpack_installed_theme', $theme->stylesheet, $theme_info ); |
|
51 | } |
|
52 | ||
53 | if ( 'update' === $details['action'] ) { |
|
54 | $theme = $upgrader->theme_info(); |
|
55 | $theme_info = array( |
|
56 | 'name' => $theme->get('Name'), |
|
57 | 'version' => $theme->get('Version'), |
|
58 | 'uri' => $theme->get('ThemeURI'), |
|
59 | ); |
|
60 | ||
61 | /** |
|
62 | * Signals to the sync listener that a theme was updated and a sync action |
|
63 | * reflecting the update and the theme info should be sent |
|
64 | * |
|
65 | * @since 4.9.0 |
|
66 | * |
|
67 | * @param string $theme->theme_root Text domain of the theme |
|
68 | * @param mixed $theme_info Array of abbreviated theme info |
|
69 | */ |
|
70 | do_action( 'jetpack_updated_theme', $theme->stylesheet, $theme_info ); |
|
71 | } |
|
72 | } |
|
73 | ||
74 | public function init_full_sync_listeners( $callable ) { |