Skip to content

Instantly share code, notes, and snippets.

View barbwiredmedia's full-sized avatar

Barbara Talbot barbwiredmedia

View GitHub Profile
#https://www.makeuseof.com/tag/5-ways-to-print-folder-and-directory-contents-in-windows/
dir>print.txt
@barbwiredmedia
barbwiredmedia / .htaccess
Last active April 6, 2017 18:55
Htaccess WordPress permissions to lock down wp-login.php and other files
#Files
Options All -Indexes
<files .htaccess>
Order allow,deny
Deny from all
</files>
#WordPress
<files wp-login.php>
order deny,allow
@barbwiredmedia
barbwiredmedia / scriptfix.js
Last active December 6, 2016 00:53
Magnific Popup uses the watch URL format for its popup. By default it does not accept URL parameters I.E. Do not show related videos, Autoplay and Youtube branding -- ?rel=0&autoplay=1&showinfo=0 Adding the JS fixes this. Solution credit:Josue @ http://www.kriesi.at/support/topic/youtube-video-not-working-in-ligthbox/#post-288867
<script>
/*Substitute your id in src*/
jQuery(window).load(function(){
jQuery('a[href*="youtube.com/watch"]').magnificPopup({
type: 'iframe',
iframe: {
patterns: {
youtube: {
index: 'youtube.com',
id: 'v=',
@barbwiredmedia
barbwiredmedia / terms-and-conditional.html
Created November 11, 2016 01:53
Terms and conditional boilerplate. Replace "placeholder" content
<p><strong>What information do we collect?</strong></p>
<p>We collect information from you when you subscribe to our newsletter or fill out a form.</p>
<p>When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address or phone number. You may, however, visit our site anonymously.</p>
<p>Google, as a third party vendor, uses cookies to serve ads on your site. Google’s use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet. Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy.</p>
<p><strong>What do we use your information for?</strong></p>
<p>Any of the information we collect from you may be used in one of the following ways:</p>
<p><em>• To contact you following the form you filled out.</em><br>
Your information, whether public or private, will not be sold, exchanged, transferred, or given to any other company for any reason whatsoever
@barbwiredmedia
barbwiredmedia / privacy-policy.html
Last active November 11, 2016 01:50
Privacy Policy Standard. Only change needed is change to the contact-us URL
<h1>Privacy Policy</h1>
<p><em>What information do we collect?</em></p>
<p>We collect information from you when you subscribe to our newsletter or fill out a form.</p>
<p>When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address or phone number. You may, however, visit our site anonymously.</p>
<p>Google, as a third party vendor, uses cookies to serve ads on your site. Google’s use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet. Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy.</p>
<p><em>What do we use your information for?</em></p>
<p>Any of the information we collect from you may be used in one of the following ways:</p>
<ul>
<li>To contact you following the form you filled out. &nbsp;Your information, whether public or private, will not be sold, exchanged, transferred, or given to any other company for any r
@barbwiredmedia
barbwiredmedia / gist:a6f2bcd0128e74e9fe5a6de568496e05
Created August 24, 2016 20:27
Gitignore wpengine and others
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
# wordpress specific
wp-config.php
@barbwiredmedia
barbwiredmedia / admin-functions.php
Last active July 6, 2018 17:46
Edit and Hide Admin menu items admin_menu & admin_bar_menu. Also hide items from the item bar
function remove_acf_menu()
{
// provide a list of usernames who can edit custom field definitions here
$admins = array(
'admin',
'levy-admin',
'barb'
);
@barbwiredmedia
barbwiredmedia / hosts
Last active August 29, 2017 21:50
Godaddy cPanel WordPress site testing. For apache hosts file. Spoofs URL for checking a sites functionality/working before switching DNS. IP will be from cPanel. Domain in database must match.
# To test Godaddy cPanel WordPress site:
#1) Add cPanel IP then domain
#2) ipconfig /flushdns
#3) ping yourdomain.com to check that it is forwarding
# EXAMPLE:
23.229.216.195 thorcon.net
23.229.216.195 www.thorcon.net
<?php edit_post_link('edit', '<p>', '</p>'); ?>
@barbwiredmedia
barbwiredmedia / img-responsive.sass
Created April 22, 2016 21:41
WP responsive image within WYSIWYG content
.main {
img[class*="wp-image"] {
@include img-responsive;
}
@include bp-md-max {
@include center-block;
float:none;
}
}