Changes between Version 3 and Version 4 of Ticket #40279, comment 2
- Timestamp:
- 03/27/2017 07:26:10 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #40279, comment 2
v3 v4 5 5 > If you have a plugin that is only useful for multisite installs you should check that appropriately and prevent an activation. 6 6 No, my plugin works in both ways, but it should work with multisite disabled, you SHOULD NOT have to write different code if multisite is enabled, otherwise it breaks the logic of PHP, OOP, and whatever what is called clean code, good programming, PSR-4/PSR-2 coding standards. It just a design error. At least no action blank function should be made for that. My plugin is made to have blog_id column in tables, and it allows easily manage cross-side data, but if the multisite is disabled, it just have "1" saved there, and all WP functions works, except that switch_to_blog. So that has to be fixed. I'm sure. 7 The great programming logic says - you have to keep the same interface, just switch the implementation. That is a basic of OOP, of any modern programming.7 The great programming logic says - you have to keep the same interface, just implementation can be different (so 'internal function code of WordPress functions based of enabled/disabled multisite, but the function should be there, just do nothing in WP non-multisite). That is a basic of OOP, of any modern programming.