$prop ) { ?> call_plugin_api( $plugin ); // Skip if info is a WP_Error object if ( is_wp_error( $info ) ) { continue; } // Safely access properties with fallbacks $icons = isset( $info->icons ) && is_array( $info->icons ) ? $info->icons : array(); $icon = $this->check_for_icon( $icons ); $active = $this->check_active( $plugin ); $url = $this->create_action_link( $active['needs'], $plugin ); $name = isset( $info->name ) ? $info->name : $plugin; $version = isset( $info->version ) ? $info->version : ''; $author = isset( $info->author ) ? $info->author : ''; $label = ''; switch ( $active['needs'] ) { case 'install': $class = 'install-now button'; $label = __( 'Install', 'activello' ); break; case 'activate': $class = 'activate-now button button-primary'; $label = __( 'Activate', 'activello' ); break; case 'deactivate': $class = 'deactivate-now button'; $label = __( 'Deactivate', 'activello' ); break; } ?>
plugin box image |