Adding buttons to wp-admin/edit-comments

You can use two filters for that: manage_edit-comments_columns – to add a column header on comments table manage_comments_custom_column – to add the content of each row for that column So you would have something like this: function myplugin_comment_columns( $columns ) { $columns[‘my_custom_column’] = __( ‘My Category’ ); return $columns; } add_filter( ‘manage_edit-comments_columns’, ‘myplugin_comment_columns’ ); function … Read more

Can’t hover on Submenu

Reading through your question, your submenu is on class,normally your hover style is working on.. so we can use a filter “nav_menu_css_class” on your functions.php file. add_filter(‘nav_menu_css_class’ , ‘special_nav_class’ , 10 , 2); function special_nav_class ($classes, $item) { if (in_array(‘current-menu-item’, $classes) ){ $classes[] = ‘active ‘; } return $classes; } it would be more easy … Read more

Creating a “walled garden” of comments

Some suggestions, added as comments: function filter_the_comments( $array ) { $comment_IDs = array(); foreach ( $array as $key => $val ) { //assuming the comments are sorted by date in ascending order, a parent has to come before the child comment, so there is no need to wait till all subsequent IDs have been added … Read more

Order comments in admin by custom date

I found the solution and happy to share the code: function cws_pre_get_comments( $comments ) { $comments->query_vars[‘meta_key’] = ‘datum_van_uitvoering’; $comments->query_vars[‘orderby’] = ‘meta_value_num’; $comments->query_vars[‘order’] = ‘DESC’; $comments->meta_query->parse_query_vars( $comments->query_vars ); } add_action( ‘pre_get_comments’, ‘cws_pre_get_comments’ );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)