[wp-hackers] How to use $wpdb in plugins

Guus (IFS) guus at inspiration-for-success.com
Thu Jan 16 06:16:37 UTC 2014


Thanks, didn't know that the warning could be bypassed with the static 
declaration.

--------------------------------------------------
From: "Gabriel Acosta" <gabo.acosta624 at gmail.com>
Sent: Wednesday, January 08, 2014 12:58 AM
To: <wp-hackers at lists.automattic.com>
Subject: Re: [wp-hackers] How to use $wpdb in plugins

> It's not:
> http://www.php.net/manual/en/language.oop5.static.php
>
> Calling non-static methods statically generates an *E_STRICT* level 
> warning.
>
> That is completely different than "PHP 5.4 and higher or something gives
> notices on static calls."
>
>
> On Tue, Jan 7, 2014 at 9:44 AM, Guus (IFS) 
> <guus at inspiration-for-success.com
>> wrote:
>
>> Hehehehe.
>>
>> It is legit though :).
>>
>> -----Original Message----- From: Gabriel Acosta
>> Sent: Tuesday, January 07, 2014 11:52 PM
>>
>> To: wp-hackers at lists.automattic.com
>> Subject: Re: [wp-hackers] How to use $wpdb in plugins
>>
>> "and higher or something" yup, sounds legit, lol
>>
>>
>> On Tue, Jan 7, 2014 at 8:15 AM, Leo Baiano <ljunior2005 at gmail.com> wrote:
>>
>>  Not if you declare the method as static.
>>>
>>>
>>> 2014/1/7 Guus (IFS) <guus at inspiration-for-success.com>
>>>
>>> > PHP 5.4 and higher or something gives notices on static calls.
>>> >
>>> > -----Original Message----- From: Leo Baiano Sent: Tuesday, January 07,
>>> > 2014 10:41 PM To: wp-hackers at lists.automattic.com Subject: Re:
>>> > [wp-hackers] How to use $wpdb in plugins
>>> > I believe you are mistaken Guus, it makes little sense to discourage 
>>> > the
>>> > use of Static calls
>>> >
>>> >
>>> > 2014/1/7 Gabriel Acosta <gabo.acosta624 at gmail.com>
>>> >
>>> >  Static calls are discouraged? will be disallowed? o my god this list
>>> does
>>> >> gets hilarious from time to time. What is actually discouraged, not 
>>> >>  >>
>>> from
>>> >> the PHP standard but from other methodologies like OOP is the use of
>>> >> globals, but clearly that's just the way WP is so...
>>> >>
>>> >>
>>> >> On Tue, Jan 7, 2014 at 7:30 AM, Chris Williams <chris at clwill.com>
>>> wrote:
>>> >>
>>> >> > Evidence please?
>>> >> >
>>> >> > On 1/7/14 1:09 AM, "Guus (IFS)" <guus at inspiration-for-success.com>
>>> >> wrote:
>>> >> >
>>> >> > >In newer PHP versions static calls are discouraged. Guess in 
>>> >> > >future
>>> >> > >versions
>>> >> > >even disallowed.
>>> >> >
>>> >> > _______________________________________________
>>> >> > wp-hackers mailing list
>>> >> > wp-hackers at lists.automattic.com
>>> >> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>>> >> >
>>> >> _______________________________________________
>>> >> wp-hackers mailing list
>>> >> wp-hackers at lists.automattic.com
>>> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Amplexos,
>>> >
>>> > Leo Baiano
>>> > Web Developer
>>> > _______________________________________________
>>> > wp-hackers mailing list
>>> > wp-hackers at lists.automattic.com
>>> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>>> > _______________________________________________
>>> > wp-hackers mailing list
>>> > wp-hackers at lists.automattic.com
>>> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>>> >
>>>
>>>
>>>
>>> --
>>> Amplexos,
>>>
>>> Leo Baiano
>>> Web Developer
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>>  _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers 



More information about the wp-hackers mailing list