This is a simple breakdown of how I deploy Bedrock+Sage using RunCloud and Envoyer.
cd {{ release }}/web/app/themes/sage
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="BladeInjectionConfiguration" default="false"> | |
<directives> | |
<!-- Sage Directives - WordPress - https://log1x.github.io/sage-directives-docs/usage/wordpress.html--> | |
<data directive="@query" injection="true" prefix="(" suffix=")"/> | |
<data directive="@posts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@hasposts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@noposts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@titl"/> |
# Export site database using wp db export | |
wp db export /wp-content/wordpress-dump.sql --all-tablespaces --single-transaction --quick --lock-tables=false | |
# Gzip compress the recent database export | |
gzip wordpress-dump.sql | |
# Export sites database using wp db export and gzip compress | |
wp db export --all-tablespaces --single-transaction --quick --lock-tables=false - | gzip -9 - > wordpress-dump.sql.gz |
Preferences | Appearance | Tabs | Theme > Dark
dstr > ttf
, install all font files by double clicking)Preferences | Profiles | Text
Font
to 14pt Fira code regular
and Check Use Ligatures
checkboxNon ASCII Font
to 14pt Fira mono
and Check Use Ligatures
checkboxPreferences | Profiles | Color Presets > Snazzy
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
<?php | |
/** | |
* Wordpress: Contact form 7, Add form tag (shortcode) current url example | |
*/ | |
add_action( 'wpcf7_init', 'wpcf7_add_form_tag_current_url' ); | |
function wpcf7_add_form_tag_current_url() { | |
// Add shortcode for the form [current_url] | |
wpcf7_add_form_tag( 'current_url', | |
'wpcf7_current_url_form_tag_handler', | |
array( |
VPS OVH | Ubuntu 16.04.3 LTS | LAMP | SYMFONY 4
git
et hébergé (Github, Bitbucket...).wp search-replace --network --url=website.dev website.dev website.tld --precise --all-tables |
//Custom Autocomplete | |
add_action('wp_ajax_nopriv_get_listing_names', 'ajax_listings'); | |
add_action('wp_ajax_get_listing_names', 'ajax_listings'); | |
function ajax_listings() { | |
global $wpdb; //get access to the WordPress database object variable | |
//get names of all taxonomy terms | |
$name = '%'.$wpdb->esc_like(stripslashes($_GET['name'])).'%'; //escape for use in LIKE statement | |
$sql = "SELECT term.term_id as id, term.name as post_title, term.slug as guid, tax.taxonomy FROM $wpdb->term_taxonomy tax |