I have set up a plugin that because of the amount of data being used I set up a custom table and have extended the WP_List_Table class. I know that is not recommended, but Custom Post Types just won't offer what I need. I plan on including a copy of the WP_List_Table class when releasing this project to prevent any unwanted bugs... Anyhow, I have the following code and have went through a lot of tutorials on extending the WP_List_Table …
I want to add a row action to ALL custom taxonomies. This is for use in a plugin so I want this to apply to whatever taxonomies exist rather than adding a filter for each taxonomy manually like below. I can't figure out a simple way to do this. add_filter( 'category_row_actions', 'category_row_actions', 10, 2 );
I know how to remove quick edit and/or other page actions for all pages in the WordPress Pages list. Now, I need to be more specific and remove certain actions from specific pages. I can hide actions for specific pages using CSS, but would prefer to remove the source code entirely. The following code will remove the quick edit, edit and beaver builder page action. It is not unique and referenced many times in other responses: add_filter( 'page_row_actions', 'remove_page_row_actions', 10, …
I have little problem how implement deleting data from database using row actions. I have my custom list which includes data from database table. function column_name( $item ) { $delete_nonce = wp_create_nonce(); $title = '<strong>' . $item['article_name'] . '</strong>'; $actions = [ 'edit' => sprintf('<a href="?page=%s&id=%s">Edit</a>', 'edytuj-artykul', $item['article_id']), 'delete' => sprintf('<a href="?page=%s&action=%s&article_id=%s&_wpnonce=%s">Delete</a>', esc_attr( $_REQUEST['page'] ), 'delete', absint($item['article_id']), $delete_nonce) ]; return $title. $this->row_actions( $actions ); } function delete_article($item){ $article_id = $item['article_id']; global $wpdb; $table = 'wp_copywriter_articles'; $wpdb->query("DELETE FROM $table WHERE article_id …
I would like to modify the row actions of an existing WP_List_Table. For example, in the Users section in the back end, I would like to remove the "Edit" option from each user. I would like to also add new actions, such as "Books", which would list the books read by this user (this works with another plugin). I have a feeling it is some sort of filter, but could not find anything in documentation. Please note that I am …
Fristly, sorry for my bad english. Secondly, I can't find a solution for my problem since 2 weeks. It's a simple things but I can't find how to do it. I explain my problem : I got 2 custom taxonomies call in a function "my_custom_init" : register_taxonomy( 'directors', 'video', array( 'hierarchical' => true, 'label' => 'Directors', 'query_var' => true, 'rewrite' => true ) ); register_taxonomy( 'clients', 'video', array( 'hierarchical' => true, 'label' => 'Clients', 'query_var' => true, 'rewrite' => true …
I'm working on a plugin where I have a Custom Post Type (CPT) registered and I need to add custom row actions to that particular post type. But could not make the following code hooked to post_row_actions work: function ttest_copy_button( $actions, $post ) { // var_dump($actions); if( 'ttest' === $post->post_type ) { // pass nonce to check and verify false request $nonce = wp_create_nonce( 'copy_content' ); // add our button $actions['copy_content'] = '<a data-nonce="'. $nonce .'" href="javascript:" role="button">'. esc_html__( 'Copy …
I am using Visual Composer plugin. I've found a snippet to remove row actions in post list table in word press. add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 ); function remove_row_actions( $actions ) { if( get_post_type() === 'my_cpt' ) unset( $actions['view'] ); return $actions; } but I could not found the row action name for the Edit with Visual Composer I want to remove or edit the link into the Row Action "". Have a look on screenshot
How can I remove bulk actions section from post and page lists pages on wordpress I tried with following code in functions.php as suggested on another thread but it does nothing add_action( 'wp_loaded', 'wpse_53371_remove_bulk_actions' ); function wpse_53371_remove_bulk_actions() { add_filter( 'bulk_actions-edit-post', '__return_empty_array' ); add_filter( 'bulk_actions-upload', '__return_empty_array' ); } Should I hide it will css ?
My problem is that I can't refresh the page after a form action into a loop. In my case I have a listing post page where I can delete, archive, deliver posts through a modal form, row by row. After asking a previous question here I've known that I should perform the form action through the init hook to make it run before headers are sent. I've tried without success like this: In my functions.php add_action('init', 'init_deliver'); //trying to run …
I've been developing a plugin where I wanted to create a table, styled and working just like Wordpress's native Post/Page tables. Following the guide below, I was able to create the table and load my database. The only thing I cannot figure out to do is how to make one of the row contents "clickable". http://wpengineer.com/2426/wp_list_table-a-step-by-step-guide/ IE - making the "name" column clickable. I have the "edit, delete" buttons below the name, but that is not enough. Any and all …
I searched in various places and am battling to find the correct place or terms used for the following. I am only using posts as an example. When you view all posts in wp-admin you get the title of the post and below it the Edit, Quick Edit, Trash and Preview links. By using the post_row_actions action hook I can change the links below the title but not the link on the title itself. Are there an alternate way to …
I would like to simply rename "Delete permanently" to "Delete", without having to mess with the Wordpress core files. It's worth knowing that I'm using a translated version of Wordpress. So the "Delete permanently" action is already translated but the translated string is too long to fit my needs. How can I do that from functions.php? Any help would be appreciated.
I have added an action row link to users.php so that when its clicked it links to a list table. To generate the data for the clicked user in my custom list table, I need to capture the user ID. I have all the code working but I don't know how to access the user ID of the user that was clicked. I am passing the user ID as user via the link so its show in my custom list …
The scenario is this: I have a CPT called Job. I've set custom row actions for this CPT, and most of them are linked to external or custom settings pages. They work fine. Now I've set a new row action, called as 'mark-special', and I've set the href for the link as the same posts list page with my own params as: edit.php?post_type=job&action=mark-special&job_id=123&_wpnonce=<custom nonce> I'm handling the action in a function hooked with init. The problem is, when I click …