Skip to content

Instantly share code, notes, and snippets.

View palmiak's full-sized avatar
😎
Working

Maciek Palmowski palmiak

😎
Working
View GitHub Profile
@palmiak
palmiak / .htaccess
Created April 18, 2017 18:43
Bedrock .htaccess for shared hosting
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /web/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ index.php [L]
@palmiak
palmiak / basic.php
Created October 26, 2015 12:08
Podpięcie pod [select] w contact form 7 taxonomii użytych przy wpisie
<?php
function ses_add_select_to_contact_form ( $tag, $unused ) {
global $post;
//deklarujemy nazwę selecta dla którego mają być zaciągnięte dodatkowe wartości
if( $tag['name'] == 'wymiary'){
//nazwa taxonomii
$taxonomy = 'wymiary';
//nazwy dla pierwszego option w select - tego domyślnego
$tag['raw_values'][] = '';