Ticket #46586: plugin-a.php
| File plugin-a.php, 398 bytes (added by , 7 years ago) |
|---|
| Line | |
|---|---|
| 1 | <?php declare(strict_types=1); // -*- coding: utf-8 -*- |
| 2 | |
| 3 | /** |
| 4 | * Plugin Name: Plugin A |
| 5 | */ |
| 6 | |
| 7 | add_action( |
| 8 | 'plugins_loaded', |
| 9 | function() { |
| 10 | add_filter( |
| 11 | 'determine_current_user', |
| 12 | function($user_id) { |
| 13 | // Do something here with $user_id. |
| 14 | return $user_id; |
| 15 | } |
| 16 | ); |
| 17 | $user = wp_get_current_user(); |
| 18 | }, |
| 19 | 5 |
| 20 | ); |
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)