質問編集履歴

1

\$thisを参照渡ししている記述を発見したプラグインのリンクと、その場所を追記しました。

2017/03/16 15:01

投稿

Iya712
Iya712

スコア158

test CHANGED
File without changes
test CHANGED
@@ -23,3 +23,29 @@
23
23
  ###自分の考え
24
24
 
25
25
  意味はなく、php4の時代になんでも&をつけてやりとりしていた頃の名残りだと思います。
26
+
27
+
28
+
29
+ ###参考プラグイン
30
+
31
+ 発見したのは、以下のプラグインです。
32
+
33
+ [shortcodes-ultimateプラグイン](https://ja.wordpress.org/plugins/shortcodes-ultimate/)
34
+
35
+
36
+
37
+ shortcodes-ultimate/inc/vendor/sunrise.php のL50付近にその記述があります。
38
+
39
+
40
+
41
+ ###追記
42
+
43
+ add_actionの定義部から追ってみましたが、引数の配列の第1要素である$thisは、最終的に
44
+
45
+ spl_object_hash関数に渡されて、対象オブジェクトのオブジェクトIDを取得するのに使われていただけでした。
46
+
47
+ wp-includes/plugin.php中
48
+
49
+
50
+
51
+ これだけ見ると、やはり意味がないように思えます。