Creating a "send" button in WordPress
-
I’m working on a newsletter plugin for wordpress. I want to use a post button for sending the posts. But how can i achieve this? The code that i have right now is as follows:
add_action('manage_nieuwsbrief_posts_custom_column', 'nwsbrf_custom_nieuwsbrief_column', 10, 2); function nwsbrf_custom_nieuwsbrief_column($column, $post_id) { global $wpdb; $getcategories = $wpdb->get_results( $wpdb->prepare("SELECT * FROM wp_nwsbrf_couple INNER JOIN wp_nwsbrf_categories WHERE wp_nwsbrf_couple.category_id = wp_nwsbrf_categories.category_id AND ID = %d", $post_id) ); foreach ($getcategories as $categorie) { switch ($column) { case 'cat': echo $categorie->category_name; break; } } switch ($column){ case 'send'; echo '<input type="submit" class="button button-secondary button-small" name="send_post" value="Verzenden">'; break; } }As you can see i’m using send_post as the name for my button. I want to use this button for sending my mails. Can someone please explain me how i can make a handler for it?
The topic ‘Creating a "send" button in WordPress’ is closed to new replies.