Add latest commit info on login footer using login_footer hook
On the command line, I tried to run git log –git-dir=”[dir].git’ -1 –work-tree=”[dir]” and it gave me an error. When I ran git –git-dir=”[dir].git” –work-tree=”[dir]” log -1, it worked as expected. So your code should probably be echo shell_exec( “git –git-dir=”$E4AFZ_PLUGIN_ROOT_DIR.git” –pretty=format:’%h – %s (%ci)’ –abbrev-commit –work-tree=”$E4AFZ_PLUGIN_ROOT_DIR” log -1 ); Also: PHP expands variables inside … Read more