WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #21601


Ignore:
Timestamp:
08/16/12 00:59:08 (3 years ago)
Author:
scribu
Comment:

Magic methods aren't something you can arbitrarily create. They're a predefined set of special constructs in the PHP language. __hasval() is not one of them: http://php.net/manual/en/language.oop5.magic.php

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21601 – Description

    initial v1  
    33So, keeping that functionality for checking even custom properties, I thought it may be beneficial to add a magic method for checking whether a property is set ( WP_User::has_prop( $key ) ) and has a value ( WP_User::get( $key ) ). 
    44 
    5 Thus, this ticket desires to add two methods: has_prop_val() & __hasval() 
     5Thus, this ticket desires to add two methods: `has_prop_val()` & `__hasval()`