Is file_get_contents() the only way for plugins reading local files OR does WP_Filesystem_Direct::get_contents() even work?

$wp_filesystem->get_contents() $wp_filesystem->get_contents() replaced file_get_contents() perfectly as a drop-in replacement. Of course, it must be initiated with WP_Filesystem(); first. Here is a before and after example… Before: if ( (strpos ( file_get_contents ( $check_this_file ), $check_this_string ) === false) ) {…} After: WP_Filesystem(); if ( (strpos ( $wp_filesystem->get_contents ( $check_this_file ), $check_this_string ) === false) ) … Read more

How to add plugin version update option in plugin row action?

If I get you right, you want add custom text after plugin row. Example: $path = plugin_basename( __FILE__ ); add_action( “after_plugin_row_{$path}”, function ( $plugin_file, $plugin_data, $status ) { echo ‘<tr class=”active”><td>&nbsp;</td><td colspan=”2″><p style=”background-color: #d54e21; padding: 10px; color: #f9f9f9; margin-top: 10px”><strong>Important Notice!</strong></td></tr>’; }, 10, 3 );