[Plugin: Posts 2 Posts] Cannot access protected variables in filter passed arguments
-
I needed to modify the arguments for the box rendering and tried doing so using the “p2p_connectable_args” filter, however the second argument passed (the instance of the P2P_Directed_Connection_Type object itself) has all of its variables set to protected (and it’s ctype property also does), so this whole argument doesn’t seem to do anything at all. The same issue would apply to the “p2p_connected_args” filter as well.
I managed to modify the arguments by using some of the global variables in WordPress (global $post, and some of the existing arguments), however I believe this is an issue that need to be taken into consideration, as in other cases there might not be alternatives.
- The topic ‘[Plugin: Posts 2 Posts] Cannot access protected variables in filter passed arguments’ is closed to new replies.