This sheet goes along with this SSH YouTube tutorial
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
(function($) { | |
function find_page_number( element ) { | |
element.find('span').remove(); | |
return parseInt( element.html() ); | |
} | |
$(document).on( 'click', '.nav-links a', function( event ) { | |
event.preventDefault(); |
define( 'WP_REDIS_DISABLED', true ); |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
<div><!-- social media share buttons --> | |
<a href="http://www.facebook.com/" onclick="window.location = 'http://www.facebook.com/share.php?u=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/aLnZg.png" alt="Share on Facebook" border="0" /></a> | |
<a href="http://twitter.com/" onclick="window.location = 'http://twitter.com/home/?status=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/oFrLG.png" alt="Tweet This" border="0" /></a> | |
<a href="http://www.linkedin.com/" onclick="window.location = 'http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/mwHNU.png" alt="Share on LinkedIn" border="0" /></a> | |
<a href="https://plus.google.com/" onclick="window.location = 'https://plus.google.com/share?url=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/tzMMp.png" alt="Share on Google+" border="0" /></a> |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
<?php | |
/* | |
Lets you display a forgot/reset password page within your theme. | |
Eg, create a page called 'Forgot Password'; save this file as page-forgot-password.php | |
Adapted from code posted here: http://wordpress.stackexchange.com/questions/14692/check-for-correct-username-on-custom-login-form/14696#14696 | |
*/ |
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST
-Request to the wp/v2/media
route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:
<?php | |
namespace App\Http\Controllers\Api; | |
use App\Model; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Pagination\LengthAwarePaginator as Paginator; | |