mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 08:10:04 +00:00
Bring out the shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@17228 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -356,7 +356,7 @@ function _get_admin_bar_pref( $context, $user = 0 ) {
|
||||
$pref = get_user_option( "show_admin_bar_{$context}", $user );
|
||||
if ( false === $pref )
|
||||
return 'admin' != $context || is_multisite();
|
||||
|
||||
|
||||
return 'true' === $pref;
|
||||
}
|
||||
|
||||
|
||||
@@ -1313,11 +1313,11 @@ function antispambot($emailaddy, $mailto=0) {
|
||||
function _make_url_clickable_cb($matches) {
|
||||
$url = $matches[2];
|
||||
$suffix = '';
|
||||
|
||||
|
||||
/** Include parentheses in the URL only if paired **/
|
||||
while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {
|
||||
$suffix = strrchr( $url, ')' ) . $suffix;
|
||||
$url = substr( $url, 0, strrpos( $url, ')' ) );
|
||||
$suffix = strrchr( $url, ')' ) . $suffix;
|
||||
$url = substr( $url, 0, strrpos( $url, ')' ) );
|
||||
}
|
||||
|
||||
$url = esc_url($url);
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
}
|
||||
|
||||
#wp-link ol,
|
||||
#wp-link ul {
|
||||
#wp-link ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wp-link input[type="text"] {
|
||||
|
||||
@@ -251,14 +251,14 @@ var wpLink;
|
||||
// We're about to toggle visibility; it's currently the opposite
|
||||
visible = !panel.is(':visible'),
|
||||
win = $(window);
|
||||
|
||||
|
||||
$(this).toggleClass('toggle-arrow-active', visible);
|
||||
|
||||
|
||||
inputs.dialog.height('auto');
|
||||
panel.slideToggle( 300, function() {
|
||||
setUserSetting('wplink', visible ? '1' : '0');
|
||||
inputs[ visible ? 'search' : 'url' ].focus();
|
||||
|
||||
|
||||
// Move the box if the box is now expanded, was opened in a collapsed state,
|
||||
// and if it needs to be moved. (Judged by bottom not being positive or
|
||||
// bottom being smaller than top.)
|
||||
@@ -266,7 +266,7 @@ var wpLink;
|
||||
top = widget.offset().top,
|
||||
bottom = top + widget.outerHeight(),
|
||||
diff = bottom - win.height();
|
||||
|
||||
|
||||
if ( diff > scroll ) {
|
||||
widget.animate({'top': diff < top ? top - diff : scroll }, 200);
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ wpList = {
|
||||
process: function(el) {
|
||||
var list = this,
|
||||
$el = $(el || document);
|
||||
|
||||
|
||||
$el.delegate( "form[class^=add:" + list.id + ":]", 'submit', function(){
|
||||
return list.wpList.add(this);
|
||||
});
|
||||
@@ -331,7 +331,7 @@ wpList = {
|
||||
$el.delegate( "[class^=add:" + list.id + ":]:not(form)", 'click', function(){
|
||||
return list.wpList.add(this);
|
||||
});
|
||||
|
||||
|
||||
$el.delegate( "[class^=delete:" + list.id + ":]", 'click', function(){
|
||||
return list.wpList.del(this);
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*
|
||||
* [kses strips evil scripts!]
|
||||
*
|
||||
* Added wp_ prefix to avoid conflicts with existing kses users
|
||||
|
||||
@@ -274,8 +274,8 @@ function _get_page_link( $id = false, $leavename = false, $sample = false ) {
|
||||
$draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
|
||||
|
||||
$link = $wp_rewrite->get_page_permastruct();
|
||||
|
||||
if ( !empty($link) && ( ( isset($post->post_status) && !$draft_or_pending ) || $sample ) ) {
|
||||
|
||||
if ( !empty($link) && ( ( isset($post->post_status) && !$draft_or_pending ) || $sample ) ) {
|
||||
if ( ! $leavename ) {
|
||||
$link = str_replace('%pagename%', get_page_uri($id), $link);
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ function wpmu_admin_redirect_add_updated_param( $url = '' ) {
|
||||
* This function checks against the Banned Email Domains list
|
||||
* at wp-admin/network/settings.php. The check is only run on
|
||||
* self-registrations; user creation at wp-admin/network/users.php
|
||||
* bypasses this check.
|
||||
* bypasses this check.
|
||||
*
|
||||
* @since MU
|
||||
*
|
||||
@@ -612,7 +612,7 @@ function wpmu_validate_user_signup($user_name, $user_email) {
|
||||
* $user parameter to the function, where $user is the other user, is
|
||||
* effectively an override of this limitation.
|
||||
*
|
||||
* Filter 'wpmu_validate_blog_signup' if you want to modify
|
||||
* Filter 'wpmu_validate_blog_signup' if you want to modify
|
||||
* the way that WordPress validates new site signups.
|
||||
*
|
||||
* @since MU
|
||||
@@ -1577,11 +1577,11 @@ function upload_is_user_over_quota( $echo = true ) {
|
||||
/**
|
||||
* Check an array of MIME types against a whitelist.
|
||||
*
|
||||
* WordPress ships with a set of allowed upload filetypes,
|
||||
* WordPress ships with a set of allowed upload filetypes,
|
||||
* which is defined in wp-includes/functions.php in
|
||||
* get_allowed_mime_types(). This function is used to filter
|
||||
* that list against the filetype whitelist provided by Multisite
|
||||
* Super Admins at wp-admin/network/settings.php.
|
||||
* that list against the filetype whitelist provided by Multisite
|
||||
* Super Admins at wp-admin/network/settings.php.
|
||||
*
|
||||
* @since MU
|
||||
*
|
||||
@@ -1806,7 +1806,7 @@ function maybe_redirect_404() {
|
||||
*
|
||||
* @since MU
|
||||
* @uses add_existing_user_to_blog()
|
||||
*/
|
||||
*/
|
||||
function maybe_add_existing_user_to_blog() {
|
||||
if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
|
||||
return false;
|
||||
@@ -1832,9 +1832,9 @@ function maybe_add_existing_user_to_blog() {
|
||||
*
|
||||
* @since MU
|
||||
* @uses add_user_to_blog()
|
||||
*
|
||||
*
|
||||
* @param array $details
|
||||
*/
|
||||
*/
|
||||
function add_existing_user_to_blog( $details = false ) {
|
||||
global $blog_id;
|
||||
|
||||
@@ -1849,11 +1849,11 @@ function add_existing_user_to_blog( $details = false ) {
|
||||
* Add a newly created user to the appropriate blog
|
||||
*
|
||||
* @since MU
|
||||
*
|
||||
*
|
||||
* @param int $user_id
|
||||
* @param string $email
|
||||
* @param array $meta
|
||||
*/
|
||||
*/
|
||||
function add_new_user_to_blog( $user_id, $email, $meta ) {
|
||||
global $current_site;
|
||||
if ( $meta[ 'add_to_blog' ] ) {
|
||||
@@ -1869,7 +1869,7 @@ function add_new_user_to_blog( $user_id, $email, $meta ) {
|
||||
* Correct From host on outgoing mail to match the site domain
|
||||
*
|
||||
* @since MU
|
||||
*/
|
||||
*/
|
||||
function fix_phpmailer_messageid( $phpmailer ) {
|
||||
global $current_site;
|
||||
$phpmailer->Hostname = $current_site->domain;
|
||||
@@ -1884,7 +1884,7 @@ function fix_phpmailer_messageid( $phpmailer ) {
|
||||
*
|
||||
* @param string $username
|
||||
* @return bool
|
||||
*/
|
||||
*/
|
||||
function is_user_spammy( $username = 0 ) {
|
||||
if ( $username == 0 ) {
|
||||
$user_id = get_current_user_id();
|
||||
@@ -1907,7 +1907,7 @@ function is_user_spammy( $username = 0 ) {
|
||||
* @param int $old_value
|
||||
* @param int $value The new public value
|
||||
* @return bool
|
||||
*/
|
||||
*/
|
||||
function update_blog_public( $old_value, $value ) {
|
||||
global $wpdb;
|
||||
do_action('update_blog_public');
|
||||
@@ -1922,7 +1922,7 @@ add_action('update_option_blog_public', 'update_blog_public', 10, 2);
|
||||
* @uses get_blog_details()
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
*/
|
||||
function get_dashboard_blog() {
|
||||
if ( $blog = get_site_option( 'dashboard_blog' ) )
|
||||
return get_blog_details( $blog );
|
||||
@@ -1940,7 +1940,7 @@ function get_dashboard_blog() {
|
||||
* @param int $user_id Optional. Defaults to current user.
|
||||
* @param int $blog_id Optional. Defaults to current blog.
|
||||
* @return bool
|
||||
*/
|
||||
*/
|
||||
function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
|
||||
global $wpdb;
|
||||
|
||||
@@ -1964,7 +1964,7 @@ function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
|
||||
* @since MU
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
*/
|
||||
function users_can_register_signup_filter() {
|
||||
$registration = get_site_option('registration');
|
||||
if ( $registration == 'all' || $registration == 'user' )
|
||||
@@ -1981,7 +1981,7 @@ add_filter('option_users_can_register', 'users_can_register_signup_filter');
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
*/
|
||||
*/
|
||||
function welcome_user_msg_filter( $text ) {
|
||||
if ( !$text ) {
|
||||
return __( 'Dear User,
|
||||
|
||||
@@ -426,7 +426,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||
'taxonomy' == $parent_item->type &&
|
||||
isset( $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
|
||||
in_array( $parent_item->object_id, $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
|
||||
(
|
||||
(
|
||||
! isset( $queried_object->term_id ) ||
|
||||
$parent_item->object_id != $queried_object->term_id
|
||||
)
|
||||
|
||||
@@ -619,9 +619,9 @@ function get_page_statuses( ) {
|
||||
* public - Whether posts of this status should be shown in the front end of the site. Defaults to true.
|
||||
* exclude_from_search - Whether to exclude posts with this post status from search results. Defaults to true.
|
||||
* show_in_admin_all_list - Whether to include posts in the edit listing for their post type
|
||||
* show_in_admin_status_list - Show in the list of statuses with post counts at the top of the edit
|
||||
* show_in_admin_status_list - Show in the list of statuses with post counts at the top of the edit
|
||||
* listings, e.g. All (12) | Published (9) | My Custom Status (2) ...
|
||||
*
|
||||
*
|
||||
* Arguments prefixed with an _underscore shouldn't be used by plugins and themes.
|
||||
*
|
||||
* @package WordPress
|
||||
|
||||
@@ -2912,7 +2912,7 @@ function get_the_taxonomies($post = 0, $args = array() ) {
|
||||
|
||||
$args = wp_parse_args( $args, array(
|
||||
'template' => '%s: %l.',
|
||||
) );
|
||||
) );
|
||||
extract( $args, EXTR_SKIP );
|
||||
|
||||
$taxonomies = array();
|
||||
|
||||
@@ -1754,7 +1754,7 @@ function add_theme_support( $feature ) {
|
||||
$_wp_theme_features[$feature] = true;
|
||||
else
|
||||
$_wp_theme_features[$feature] = array_slice( func_get_args(), 1 );
|
||||
|
||||
|
||||
if ( $feature == 'post-formats' && is_array( $_wp_theme_features[$feature][0] ) )
|
||||
$_wp_theme_features[$feature][0] = array_intersect( $_wp_theme_features[$feature][0], array_keys( get_post_format_slugs() ) );
|
||||
}
|
||||
|
||||
@@ -1457,10 +1457,10 @@ function wp_insert_user($userdata) {
|
||||
|
||||
if ( empty($user_registered) )
|
||||
$user_registered = gmdate('Y-m-d H:i:s');
|
||||
|
||||
|
||||
if ( empty($show_admin_bar_front) )
|
||||
$show_admin_bar_front = 'true';
|
||||
|
||||
|
||||
if ( empty($show_admin_bar_admin) )
|
||||
$show_admin_bar_admin = is_multisite() ? 'true' : 'false';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user