Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter olivier89

    (@olivier89)

    Sorry if my questions are basic. But as i stated in my first post i’d like to write plugin, using best practice, in WP of course, but also in oop (php5) too, with security concerns (attribute types).

    Thread Starter olivier89

    (@olivier89)

    ouch ! No I know how deep i lack knowledge with oop ??

    Of course you’re right, and my knowledge of wp syntax is poor too. So as i asked : is it forbidden in WP syntax to use public/private (php5 attributes) in a WP plugin declaration ? Or is this question just useless, and i should always use no attribute or static ?

    Thread Starter olivier89

    (@olivier89)

    Thanks a lot for your answer, i’m going to check your plugin in detail.
    But you say i use static declarations, but in the link from the codex i wrote in the first post, static seems mandatory for some methods :

    If your plugin is desgined as a class write as follow:
    class MyPlugin {
         static function install() {
                // do not generate any output here
         }
    }
    register_activation_hook( __FILE__, array('MyPlugin', 'install') );

    But isn’t a no attribute before a method equivalent to static?

    Can’t i use private methods and properties to tighten up the security ?

    Anyway, i’ll study your plugin and contact you if i have any question.
    Thanks.

Viewing 3 replies - 16 through 18 (of 18 total)