wp_delete_post() deletes post instead of moving it to trash

Following the line of code https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/post.php#L2467 if ( ! $force_delete && ( ‘post’ === $post->post_type || ‘page’ === $post->post_type ) && ‘trash’ !== get_post_status( $postid ) && EMPTY_TRASH_DAYS ) { return wp_trash_post( $postid ); } the $force_delete just work with ‘post’ and ‘page’, it not work with custom post type

If your blog was an app on Facebook

My number 1 feature would be to have the ability to use WordPress to manage a fan page. It would have to have the ability to use a WordPress page to create a Facebook page application tab. Published posts would auto publish to the Facebook wall and comments would sync between WordPress and Facebook.

Force display name as full name

This is set during user registration. You can change the value per filter ‘user_register’. Sample code, not tested: /* Plugin Name: First name plus last name as default display name. */ add_action( ‘user_register’, ‘wpse_67444_first_last_display_name’ ); function wpse_67444_first_last_display_name( $user_id ) { $data = get_userdata( $user_id ); // check if these data are available in your real … Read more

How can I remove the sitename or homepage title from all page titles?

By default WordPress use _wp_render_title_tag to hook wp_head ( see here ) add_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 ); This function is wrapper of wp_get_document_title to show title tag on theme if add_theme_support( ‘title-tag’ ); added in theme file functions.php ( commonly ). https://core.trac.wordpress.org/browser/tags/4.4.2/src/wp-includes/general-template.php#L944 If you see filter document_title_parts on function wp_get_document_title(), we can filter parameters that … Read more

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