Why doesn’t the “Press This” bookmarklet work on GitHub?

This is due to the Content Security Policy (CSP) that Github rolled out in April 2013. CSP shouldn’t cause problems with bookmarklets, but it does in practice. The issue isn’t specific to PressThis either. It causes problems with bookmarklets from Pinboard, Pocket and Instapaper. In Chrome you can hit F12 to open the developer tools … Read more

Initial wordpress deploy via git

I set up every environment with a fresh WordPress installation. Then I do an initial commit from my local dev and start working there with Gitflow Workflow. Then I deploy the develop branch to the staging environment and the master branch to the live site. I ignore all the uploads in wp-content/uploads. Every instance will … Read more

Version control with a team of non-developers

You can try using Source Tree https://www.sourcetreeapp.com/, no need to learn heavily the command line git, all the non coders need to do is copy their files to your repo, then commit and push if there are no complications that will arise. The only bad side of this is if there will be merge issues … Read more

Git beginner: Keeping track of on-server changes

Can i, with Git, checkout the most current repo from my live server to my local machine? No, unless you also add the wp-content folder under version control. You can instead look at other tools, such as rsync. As for the database, you could make the live server accept remote MySQL connections, so that you … Read more

Why do the Roots theme CSS files not load (404)?

I took a risk and activated the theme to see what might happen. Roots needs to complete theme activation to add the rules into .htaccess. Until this happens none of the CSS / JS will load and the theme preview lacks stylesheets. It turns the stock .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase … Read more

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

Workflow for working with git and WordPress

The problem with the linked article in your question is that it is suggesting to download WordPress and then create your own git repo – but then this cannot be easily updated. Instead you can have WordPress itself in git. Rather than the default subversion, there is an offical Github repository of WordPress, and in … Read more