Skip to content

Commit 556275d

Browse files
authored
Update README.md
1 parent c24835f commit 556275d

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,8 @@ Please see [WooCommerce Stubs](https://github.com/php-stubs/woocommerce-stubs)
7272
- Write clean OOP code: 1 class per file, no other code in class files outside `class Name { ... }`
7373
- Structure your code: uniform class names (WPCS or PSR-4), keep classes in a separate directory `inc/`
7474
- Add proper PHPDoc blocks to classes, properties, methods, functions
75-
- Handle these only in your [main plugin file](https://github.com/kingkero/wordpress-demoplugin/blob/master/wordpress-demoplugin.php).
76-
Here is another [main plugin file](https://github.com/pryley/site-reviews/blob/v5.0.1/site-reviews.php) example.
77-
- Define constants, e.g. `MYPLUGIN_PATH`
78-
- Call `register_activation_hook()`, `register_deactivation_hook()`, `register_uninstall_hook()`
79-
- Load class autoloader
80-
- Load translations
81-
- Support WP-CLI
82-
- Decide [what to load](https://github.com/szepeviktor/Toolkit4WP/blob/master/src/Is.php#L64-L73)
83-
- Start your plugin in a hook (`plugins_loaded`) - without direct execution
84-
- Avoid using core constants, use core functions or `MYPLUGIN_PATH`
75+
- Choose your [main plugin file parts](https://github.com/szepeviktor/small-project/blob/master/MAIN-FILE-PARTS.md).
76+
- Avoid using core constants, use core functions
8577
- Avoid bad parts of PHP
8678
- functions: `eval`, `extract`, `compact`, `list`
8779
- [type juggling](https://www.php.net/manual/en/language.types.type-juggling.php): `$a = '15'; if ($a) ...`

0 commit comments

Comments
 (0)