PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
← All changes | includes/setup-wizard/class-plugin-integration-helper.php +22 -1 4.5.2 → 4.5.6 View file →
@@ -18,9 +18,9 @@
18 18 *
19 19 * @return array Plugin configurations
20 20 */
21 21 public static function get_predefined_plugins() {
22 - return [
22 + $plugins = [
23 23 'bdthemes-element-pack-lite' => [
24 24 'recommended' => true,
25 25 'fallback' => [
26 26 'name' => 'Element Pack',
@@ -141,8 +141,29 @@
141 141 // 'active_installs' => '200+'
142 142 // ]
143 143 // ]
144 144 ];
145 +
146 + // Point every fallback at the logo bundled with this plugin. These entries are
147 + // what render when the wordpress.org data is unavailable, so without this the
148 + // cards would fall back to a placeholder instead of the real branding. Keys may
149 + // be either a bare slug or "slug/file.php", so normalise to the directory first.
150 + if ( class_exists( __NAMESPACE__ . '\\Remote_Data_Handler' ) ) {
151 + foreach ( $plugins as $key => $config ) {
152 + if ( ! empty( $config['fallback']['logo'] ) ) {
153 + continue;
154 + }
155 +
156 + $slug = ( false !== strpos( $key, '/' ) ) ? dirname( $key ) : $key;
157 + $logo = Remote_Data_Handler::get_local_plugin_logo( $slug );
158 +
159 + if ( '' !== $logo ) {
160 + $plugins[ $key ]['fallback']['logo'] = $logo;
161 + }
162 + }
163 + }
164 +
165 + return $plugins;
145 166 }
146 167
147 168 /**
148 169 * Build plugin data array with API data and fallbacks