JSの中にPHPって書けるのね
すごい当たり前のことだけど、気づくのに時間がかかったという話。
PHPってそもそもHTMLに埋め込めるんだから、もちろんscriptタグの中、つまりJavascriptの中にPHP関数書いてても、そりゃ展開されまし、その展開後のファイルをブラウザが読むので、Javascriptの挙動には影響がないです。
当たり前だorz
<script> $(function(){ get_social_count_facebook("<?php the_permalink(); ?>", "socialarea_facebook"); get_social_count_hatebu("<?php the_permalink(); ?>", "socialarea_hatebu"); get_social_count_twitter("<?php the_permalink(); ?>", "socialarea_twitter"); }) </script>