Log in to your Managed Hosting Server via SSH
Add these two lines to .bashrc:
| # These steps will get nginx installed on your Mac for local development and | |
| # testing purposes, to be used alongside MAMP (which already includes Apache). | |
| # The following steps assume that you're running MAMP and that you already | |
| # have php-cgi in /Applications/MAMP/bin/php/php5.4.10/bin/php-cgi. | |
| # The start-nginx and stop-nginx scripts created at the end do not | |
| # start or stop MySQL because it is assumed that you normally run MAMP | |
| # with Apache + MySQL turned on and that you occasionally want to switch | |
| # your web server to Nginx for testing purposes and that you leave MySQL running. | |
| # This process was tested successfully on OS X 10.9. |
##Create an alias to MAMP's PHP installation
To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.
Within the terminal, run:
nano ~/.bash_profile
This will open nano with the contents, at the top in a blank line add the following line:
| jQuery(document).ready(function($) { | |
| $.post(ajaxurl, {action:'random_image_widget'}, function(feedback){ | |
| image = jQuery.parseJSON(feedback); | |
| img = $('<img src="'+image.thumb+'" />'); | |
| $('.widget_equesrandomimagewidget').append(img); | |
| $(img).wrap('<a href="'+image.full[0]+'" width="'+image.full[1]+'" height="'+image.full[2]+'"></a>'); | |
| Shadowbox.setup(img.parent()); | |
| }); | |
| }); |