mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-12 03:13:29 +01:00
1ff03c9d6e
Post type objects are reponsible for mapping their capabilities to core caps. As a result, when the post type is no longer registered, the caps are no longer mapped. This causes problems when a post is left in the database after the post type is no longer present, and WP does an 'edit_post' or other cap check against it: a PHP notice is thrown, and the cap check always fails. As a more graceful fallback, we map all post-type-dependent caps onto 'edit_others_posts', which allows highly privileged users to be able to access orphaned content (such as comments belonging to disabled post types), while minimizing the possibility of unintended privilege escalation. We also add a `_doing_it_wrong()` notice, so that developers and site administrators are aware that the cap mapping is failing in the absence of the registered post type. Props mitchoyoshitaka, DrewAPicture, imath, codeelite, boonebgorges, nofearinc, SergeyBiryukov, jorbin, dlh. Fixes #16956. Built from https://develop.svn.wordpress.org/trunk@34091 git-svn-id: http://core.svn.wordpress.org/trunk@34059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
36 lines
629 B
PHP
36 lines
629 B
PHP
<?php
|
|
/**
|
|
* The WordPress version string
|
|
*
|
|
* @global string $wp_version
|
|
*/
|
|
$wp_version = '4.4-alpha-34091';
|
|
|
|
/**
|
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
|
*
|
|
* @global int $wp_db_version
|
|
*/
|
|
$wp_db_version = 34030;
|
|
|
|
/**
|
|
* Holds the TinyMCE version
|
|
*
|
|
* @global string $tinymce_version
|
|
*/
|
|
$tinymce_version = '4205-20150908';
|
|
|
|
/**
|
|
* Holds the required PHP version
|
|
*
|
|
* @global string $required_php_version
|
|
*/
|
|
$required_php_version = '5.2.4';
|
|
|
|
/**
|
|
* Holds the required MySQL version
|
|
*
|
|
* @global string $required_mysql_version
|
|
*/
|
|
$required_mysql_version = '5.0';
|