This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*idea to develop further would be, add a text box that the user can input the quote in | |
this then gets added to the DB and passed to the $quotes array. From here the results get | |
output the same way*/ | |
/* | |
Plugin Name: Random Quotes | |
Plugin URI: xxx | |
Description: This Plugin randomly generates Quotes input by the user. | |
Version: 0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_rewrite_rule('^workshops/([^/]+)(/[0-9]+)?/([^/]+)/([^/]+)', 'index.php?&workshop=$matches[4]&page=', 'top'); | |
add_rewrite_rule('^workshops/([^/]+)(/[0-9]+)?/([^/]+)', 'index.php?pagename=workshops&cat=$matches[1]&subcat=$matches[3]', 'top'); | |
add_rewrite_rule('^workshops/([^/]+)/?', 'index.php?pagename=workshops&cat=$matches[1]', 'top'); | |
add_rewrite_tag('%subcat%', '([^&]+)'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Plugin Name: CLI Export Multisite | |
*/ | |
if ( ! defined( 'WP_CLI' ) ) return; | |
use \WP_CLI\Utils; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Plugin Name: CLI Export Multisite | |
*/ | |
if ( ! defined( 'WP_CLI' ) ) return; | |
use \WP_CLI\Utils; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'user_has_cap', array( __CLASS__, 'allow_rest_to_read_single_archived_module' ), 10, 3 ); | |
/*** | |
* Modify the capabilities of the REST API to view a single | |
* "module" post if requested with its post ID. | |
* | |
* @param $allcaps | |
* @param $cap | |
* @param $args | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wp core download --version=4.5 | |
wp core config --dbname=$1 --dbuser=root --dbhost=127.0.0.1 | |
wp db create | |
wp core install --skip-email --title="$1" --admin_user="shawn" --admin_password="shawn" [email protected] --url=http://wcroc.dev/ | |
wp theme install simone --activate | |
wp plugin delete hello | |
wp plugin install any-ipsum; | |
wp plugin install advanced-custom-fields --version=4.4.0 --activate | |
wp plugin install tinymce-advanced --activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wp db export | |
wp core update | |
wp plugin update --all | |
wp theme update --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="post-related col-xs-12 no-padding"> | |
<div class="relatedposts col-md-10 col-md-offset-1"> | |
<h3 class="relatedposts-title text-center">You might also like...</h3> | |
<?php | |
global $gemMightAlsoLike; | |
$recommended_posts = $gemMightAlsoLike->get_posts( get_the_ID() ); | |
foreach ($recommended_posts as $recommended_post): ?> | |
<div class="relatedposts-item col-xs-12 col-sm-4 col-md-4"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function()%7Bvar%20elems%20%3D%20document.querySelectorAll(%22.drawer.wide%22)%3B%5B%5D.forEach.call(elems%2C%20function(el)%20%7B%20el.classList.remove(%22wide%22)%3B%20%7D)%3Belems%20%3D%20document.querySelectorAll(%22body%20%3E%20div.application.js-app.is-condensed.hide-detail-view-inline%20%3E%20div.js-app-content.app-content.is-open%22)%3B%5B%5D.forEach.call(elems%2C%20function(el)%20%7B%20el.style.transform%20%3D%20%22translateX(270px)%22%3B%20el.style.marginRight%20%3D%20%22270px%22%3B%20%7D)%7D)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
root /var/www/public; | |
listen 80; | |
location / { | |
index index.php; | |
try_files $uri $uri/ /index.php?$args; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass app:9000; | |
fastcgi_index index.php; |
OlderNewer