Forum Replies Created

Viewing 7 replies - 46 through 52 (of 52 total)
  • @pe-pernet, I’m also using Google fonts and GTmetrix and what I did with my google fonts is I downloaded them from google and then minified them them all into one file, that also results in less requests.

    I’m dying to try this out, just wondering if I should wait to see if its going to be updated to be compatible with WordPress 3.6

    it definitely is the capabilities.php page that generates the error message – it can be found at roundabout line 918 in wp-includes/capabilities.php

    function has_cap( $cap ) {
    		if ( is_numeric( $cap ) ) {
    			_deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
    			$cap = $this->translate_level_to_cap( $cap );
    		}

    I was just saying, I dont use Postie, and I can absolutely guarantee you that neither my theme or plugins even as much as contain the words has_cap except the pages mentioned above and I also get the error msg – so I dont think that in all cases it’s due to themes or plugins ??

    thx for replying though ^_^

    Forum: Plugins
    In reply to: [Zotpress] WP_Debug Errors

    also this on the same page – wp-includes/capabilities.php – from this code we can see where the error msg is being generated.

    /**
    	 * Whether user has capability or role name.
    	 *
    	 * This is useful for looking up whether the user has a specific role
    	 * assigned to the user. The second optional parameter can also be used to
    	 * check for capabilities against a specific object, such as a post or user.
    	 *
    	 * @since 2.0.0
    	 * @access public
    	 *
    	 * @param string|int $cap Capability or role name to search.
    	 * @return bool True, if user has capability; false, if user does not have capability.
    	 */
    	function has_cap( $cap ) {
    		if ( is_numeric( $cap ) ) {
    			_deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
    			$cap = $this->translate_level_to_cap( $cap );
    		}
    
    		$args = array_slice( func_get_args(), 1 );
    		$args = array_merge( array( $cap, $this->ID ), $args );
    		$caps = call_user_func_array( 'map_meta_cap', $args );
    
    		// Multisite super admin has all caps by definition, Unless specifically denied.
    		if ( is_multisite() && is_super_admin( $this->ID ) ) {
    			if ( in_array('do_not_allow', $caps) )
    				return false;
    			return true;
    		}
    
    		// Must have ALL requested caps
    		$capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args );
    		$capabilities['exist'] = true; // Everyone is allowed to exist
    		foreach ( (array) $caps as $cap ) {
    			if ( empty( $capabilities[ $cap ] ) )
    				return false;
    		}
    
    		return true;
    	}
    Forum: Plugins
    In reply to: [Zotpress] WP_Debug Errors

    I think this is a WP bug – I found the following function in wp-includes/capabilities.php

    function has_cap( $cap ) {
    		$capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name );
    		if ( !empty( $capabilities[$cap] ) )
    			return $capabilities[$cap];
    		else
    			return false;
    	}
    
    }

    I wonder if that has_cap should not be role_has_cap – I did make the change and uploaded the file and still getting same error – hv done seaches on all plugins and my theme and the words has_cap doesnt appear in any except the wp-includes/capabilities.php of WP3.5.1

    I actually found this in WordPress 3.5.1/wp-includes/capabilities.php – and I did a search in every single file for the has_cap function – I removed a theme that had it and I was still getting the error

    /**
    	 * Whether role has capability.
    	 *
    	 * The capabilities is passed through the 'role_has_cap' filter. The first
    	 * parameter for the hook is the list of capabilities the class has
    	 * assigned. The second parameter is the capability name to look for. The
    	 * third and final parameter for the hook is the role name.
    	 *
    	 * @since 2.0.0
    	 * @access public
    	 *
    	 * @param string $cap Capability name.
    	 * @return bool True, if user has capability. False, if doesn't have capability.
    	 */
    	function has_cap( $cap ) {
    		$capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name );
    		if ( !empty( $capabilities[$cap] ) )
    			return $capabilities[$cap];
    		else
    			return false;
    	}
    
    }
Viewing 7 replies - 46 through 52 (of 52 total)