Title: WP_Plugin_Install_List_Table::no_items
Published: April 25, 2014
Last modified: August 20, 2026

---

# WP_Plugin_Install_List_Table::no_items()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/no_items/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/no_items/?output_format=md#related)

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/no_items/?output_format=md#source)󠁿

    ```php
    public function no_items() {
    	if ( isset( $this->error ) ) {
    		$error_message  = '<p>' . $this->error->get_error_message() . '</p>';
    		$error_message .= '<p class="hide-if-no-js"><button class="button try-again">' . __( 'Try Again' ) . '</button></p>';
    		wp_admin_notice(
    			$error_message,
    			array(
    				'additional_classes' => array( 'inline', 'error' ),
    				'paragraph_wrap'     => false,
    			)
    		);
    		?>
    	<?php } else { ?>
    		<div class="no-plugin-results"><?php _e( 'No plugins found. Try a different search.' ); ?></div>
    		<?php
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-plugin-install-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/class-wp-plugin-install-list-table.php#L291)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/class-wp-plugin-install-list-table.php#L291-L307)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/no_items/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_admin_notice()](https://developer.wordpress.org/reference/functions/wp_admin_notice/)`wp-includes/functions.php` |

Outputs an admin notice.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [_e()](https://developer.wordpress.org/reference/functions/_e/)`wp-includes/l10n.php` |

Displays translated text.

  |

[Show 1 more](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/no_items/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/no_items/?output_format=md#)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_plugin_install_list_table%2Fno_items%2F)
before being able to contribute a note or feedback.