调用WordPress mu站点群中的所有站点的最新文章(自定义类型)

函数代码: function recent_posts_mu($posttype = 'post',$number = 20) { global $wpdb; $blogs = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs WHERE public = '1' AND blog_id !='1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' …

修改WordPress 4.7.1对文件上传(.ico)类型的限制

将以下函数加到主题目录下function.php或插件的函数文件中。 function file_type_471( $data, $file, $filename, $mimes ) { $wp_filetype = wp_check_filetype( $filename, $mimes ); $ext = $wp_filetype['ext']; $type = $wp_filetype['type']; $proper_filename = $data['proper_filename']; …