Skip to main content

Plastic collecting space launching robot PCSLR (An idea to remove plastic waste permanently from oceans).

Hello there, I have an idea to build a robot that uses machine learning (and machine learning can do some pretty impressive things). One of the impressive things machine learning is capable of is producing art using webcam footage. But what else can a machine learn to do, can we teach a machine to analyse water contaminants in the ocean as it sails and then collect any contaminated water molecules it detects? Once it is finished collecting (at full capacity), could it use a solar powered engine and GPS awareness to return to base and store all of the plastic waste ready for the GPS controlled space rocket to automatically launch it into space and send it on a trajectory towards the sun? We do need to keep that furnace burning after all?

How to add columns to a Wordpress custom post type

When creating custom post types we tend to need to insert additional columns in our Wordpress admin backend to improve post management. We can add and unset any columns we wish, by using custom filters and actions. Say we created a custom post type called services, to get our custom column headers we would need to create a filter called 'manage_services_posts_column' and bind it to a function that takes the default columns as a parameter. It's important to include the word 'services in the filter name. Next, we can unset columns (as they're an associative array) and create new columns by adding a new key => value to the array.

add_filter( 'manage_services_posts_columns', 'set_custom_edit_services_columns' ); 

function set_custom_edit_services_columns($columns) {  
$columns['service_type'] = __('Service type');  
return $columns; 
Now we need to insert the data for this new column that we've called 'service_type' => 'Service type'. We do this by creating a new action and binding it to a function which takes the columns array and the post id of the current row as parameters. This function is where we need to check for our 'service_type' array key, and when it has its turn, we can echo whatever information we need.
add_action( 'manage_services_posts_custom_column' , 'custom_services_column', 10, 2 ); 

function custom_services_column( $column, $post_id ) { 

 switch ( $column ) { 

  case 'service_type' : 

   // echo get_field('service_type', $post_id); 

   echo 'hello this is a test'; 




And that's all that we need to do!