Skip to main content
deleted 22 characters in body
Source Link
kaiser
  • 50.8k
  • 27
  • 150
  • 244

I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post.

I have tried this snippet but it throws : call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in D:\wamp\www\wordpress\wp-includes\plugin.php on line 173

      add_filter( 'post_row_actions',array(&$this, 'remove_row_actions', 10, 1));
 
      public function remove_row_actions($action){
            unset($action['view']);
             return $action;
       }

But it throws

call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in D:\wamp\www\wordpress\wp-includes\plugin.php on line 173

I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post.

I have tried this snippet but it throws : call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in D:\wamp\www\wordpress\wp-includes\plugin.php on line 173

      add_filter( 'post_row_actions',array(&$this, 'remove_row_actions', 10, 1));
 
      public function remove_row_actions($action){
            unset($action['view']);
             return $action;
       }

I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post.

I have tried this snippet

   add_filter( 'post_row_actions',array(&$this, 'remove_row_actions', 10, 1));
   public function remove_row_actions($action){
       unset($action['view']);
       return $action;
   }

But it throws

call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in D:\wamp\www\wordpress\wp-includes\plugin.php on line 173

Source Link
meWantToLearn
  • 239
  • 2
  • 3
  • 7

wordpress remove views from action links in a custom post

I have created a custom post type, but I want to remove the View link from actions, in the listing of the custom post.

I have tried this snippet but it throws : call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in D:\wamp\www\wordpress\wp-includes\plugin.php on line 173

      add_filter( 'post_row_actions',array(&$this, 'remove_row_actions', 10, 1));

      public function remove_row_actions($action){
            unset($action['view']);
             return $action;
       }