Skip to content

Instantly share code, notes, and snippets.

View wowthemesnet's full-sized avatar

WowThemes.net wowthemesnet

View GitHub Profile
@wowthemesnet
wowthemesnet / functions.php
Created May 4, 2020 11:56
Getting download link from EDD store using URL variable
<?php
function add_query_vars_filter( $vars ){
$vars[] = "item";
return $vars;
}
add_filter( 'query_vars', 'add_query_vars_filter' );
get_query_var('item');
@wowthemesnet
wowthemesnet / functions.php
Created June 1, 2020 16:45
Get Media Embedded in Content WordPress
<?php $audio_media = get_media_embedded_in_content(
apply_filters( 'the_content', get_the_content() ), array( 'audio')
);
if ( has_post_format( 'audio' )) {
foreach ($audio_media as $audio_med) {
echo $audio_med;
}
}
?>
@wowthemesnet
wowthemesnet / docker-compose.yml
Last active August 8, 2020 23:49
WordPress Development in Docker which actually works - outputs all WordPress (wp-content, wp-admin, wp-includes, wp-config.php etc) with debug enabled. Use it to create something nice!
version: '3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@wowthemesnet
wowthemesnet / terminal
Created October 26, 2020 19:30
steps to first publish repo
git init
git add .
git commit -m "first"
git remote add origin "xxxxxxxxxxx.git"
git push --set-upstream origin master