@@ -66,7 +66,7 @@ private function get_repository_info()
66
66
]);
67
67
68
68
$ response = curl_exec ($ curl );
69
-
69
+ //write_log($response);
70
70
// print_r($response);
71
71
// exit;
72
72
@@ -112,6 +112,8 @@ public function modify_transient($transient)
112
112
'package ' => $ new_files ,
113
113
'new_version ' => $ this ->github_response ['tag_name ' ]
114
114
];
115
+ write_log ($ plugin );
116
+ write_log ($ this ->plugin );
115
117
116
118
$ transient ->response [$ this ->basename ] = (object ) $ plugin ;
117
119
}
@@ -123,32 +125,34 @@ public function modify_transient($transient)
123
125
124
126
public function plugin_popup ($ result , $ action , $ args )
125
127
{
128
+ write_log ("called " );
126
129
if ($ action !== 'plugin_information ' ) {
127
130
return false ;
128
131
}
129
-
130
132
if (!empty ($ args ->slug )) {
131
133
if ($ args ->slug == current (explode ('/ ' , $ this ->basename ))) {
132
134
$ this ->get_repository_info ();
133
-
135
+ $ slug = current ( explode ( ' / ' , $ this -> basename ));
134
136
$ plugin = [
135
- 'name ' => $ this ->plugin ['Name ' ],
136
- 'slug ' => $ this -> basename ,
137
+ 'name ' => isset ( $ this ->plugin ['Name ' ]) ? $ this -> plugin [ ' Name ' ] : '' ,
138
+ 'slug ' => $ slug ,
137
139
'requires ' => '5.3 ' ,
138
140
'tested ' => '5.4 ' ,
139
141
'version ' => $ this ->github_response ['tag_name ' ],
140
- 'author ' => $ this ->plugin ['AuthorName ' ],
142
+ 'author ' => $ this ->plugin ['Author ' ],
141
143
'author_profile ' => $ this ->plugin ['AuthorURI ' ],
142
144
'last_updated ' => $ this ->github_response ['published_at ' ],
143
145
'homepage ' => $ this ->plugin ['PluginURI ' ],
144
- 'short_description ' => $ this ->plugin ['Description ' ],
146
+ 'short_description ' => isset ( $ this ->plugin ['Description ' ]) ? $ this -> plugin [ ' Description ' ] : '' ,
145
147
'sections ' => [
146
- 'Description ' => $ this ->plugin ['Description ' ],
147
- 'Updates ' => $ this ->github_response ['body ' ],
148
+ 'Description ' => isset ( $ this ->plugin ['Description ' ]) ? $ this -> plugin [ ' Description ' ] : '' ,
149
+ 'Updates ' => isset ( $ this ->github_response ['body ' ]) ? $ this -> github_response [ ' body ' ] : '' ,
148
150
],
149
151
'download_link ' => $ this ->github_response ['zipball_url ' ]
150
152
];
151
153
154
+ write_log ($ plugin );
155
+
152
156
return (object ) $ plugin ;
153
157
}
154
158
}
0 commit comments