ワードプレスでphpの使用法を見ているときによく見かける代替構文の使用法を誰かに説明してもらえますか。条件を例に取ります。
私は見ることを期待しています:
if(10==10)
echo 'this is true and will be shown';
代わりに、次のように表示されます。
if(10==10):
echo 'this is true and will be shown;
end if;
そして別の例:
! empty ( $classes_names )
and $class_names = ' class="'. esc_attr( $class_names ) . '"';
「:」は「end if;」とは何ですか? 最後の例の構文は、そのようにまとめたものではありません。