Changes between Initial Version and Version 1 of Ticket #38048
- Timestamp:
- 09/14/2016 01:10:52 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #38048
- Property Focuses ui accessibility administration removed
-
Property
Component
changed from
General
toPlugins
-
Ticket #38048 – Description
initial v1 5 5 6 6 Wishlist adds a function to the list of hooks for wp_login in its main file wpm.php like so 7 add_action('wp_login', array(&$WishListMemberInstance, 'Login')); 8 7 {{{ 8 add_action('wp_login', array(&$WishListMemberInstance, 'Login')); 9 }}} 9 10 I turned off all plugins that were not needed for this and only kept the required ones, e.g. wishlist. woocommerce e.g. 10 11 11 12 I put a line at the end of my functions.php with a marker file like so: 13 {{{ 12 14 add_action('wp', function(){ error_log("HERE_HERE_HERE_HERE"); error_log(print_r($GLOBALS['wp_filter']['wp_login'],1)); exit; } ); 13 15 }}} 14 16 I then basically accessed the "my_account" page. 15 The php log file did NOT show an entry of wishlist in the wp_loginaction hook array.17 The php log file did NOT show an entry of wishlist in the `wp_login` action hook array. 16 18 17 19 I then disabled every action hook for wp_login, even mine. 18 The php log file STILL did NOT show an entry of wishlist in the wp_loginaction hook array.20 The php log file STILL did NOT show an entry of wishlist in the `wp_login` action hook array. 19 21 20 22 Then I changed in the file wpm.php from 21 add_action('wp_login', array(&$WishListMemberInstance, 'Login')); 23 {{{ 24 add_action('wp_login', array(&$WishListMemberInstance, 'Login')); 25 }}} 22 26 to 23 add_action('wp_login', array(&$WishListMemberInstance, 'Login'),20,2); 27 {{{ 28 add_action('wp_login', array(&$WishListMemberInstance, 'Login'),20,2); 29 }}} 24 30 25 31 and sure enough it showed up, and the login time for the members changed. … … 28 34 29 35 So is this a bug? 30 Is this because of the sheer size of &$WishListMemberInstancethat add_action does not want to do it?36 Is this because of the sheer size of `&$WishListMemberInstance` that add_action does not want to do it? 31 37 32 However, just before the class definition of WishlistMember I added a function called "MyTestFunction" and replaced the "array(&$WishListMemberInstance,'Login')" with 'MyTestFunction'and looked at the debug output and sure enough the function was added to the list of wp_login hooks.38 However, just before the class definition of WishlistMember I added a function called `MyTestFunction` and replaced the `array(&$WishListMemberInstance,'Login')` with `MyTestFunction` and looked at the debug output and sure enough the function was added to the list of wp_login hooks. 33 39 34 40 I added a ticket to wishlist as well.