Skip to content

Instantly share code, notes, and snippets.

View celticwebdesign's full-sized avatar

Darren Stevens celticwebdesign

View GitHub Profile
@celticwebdesign
celticwebdesign / Gravity Forms confirmation styling
Created December 5, 2015 13:59
Gravity Forms confirmation styling
#gforms_confirmation_message_1 {
border-bottom: 1px solid #a5c199;
border-top: 1px solid #a5c199;
margin: 40px auto;
}
#gform_confirmation_wrapper_1 {
padding: 10px 0;
background: #dff0d8 none repeat scroll 0 0;
}
#gform_confirmation_message_1 {
@celticwebdesign
celticwebdesign / WordPress remove admin bar
Created December 9, 2015 09:12
WordPress remove admin bar
// Remove Admin bar
function remove_admin_bar()
{
// return true;
if (!current_user_can('administrator') && !is_admin()) {
return false;
} else {
return true;
}
}
add_filter( 'wp_login_errors', 'wpse_161709', 10, 2 );
function wpse_161709( $errors, $redirect_to )
{
if( isset( $errors->errors['confirm'] ) ) {
// echo "<pre>";
// print_r($errors->errors);
// echo "</pre>";
// echo $errors->errors['confirm'][0];
$errors->errors['confirm'][0] = "Please wait for and email, you don't need to do anything right now.";
@celticwebdesign
celticwebdesign / gist:3080f1eb91a0842a439d
Created December 11, 2015 17:12
WordPress - change the login new password text (http://www.xxx.net/wp/wp-login.php?action=rp)
Add to functions.php
add_action( 'login_enqueue_scripts', 'enqueue_my_script' );
function enqueue_my_script( $page ) {
wp_enqueue_script( 'my-script', 'http://www.xxx.net/wp/wp-content/themes/xxx/js/myjs-file.js', null, null, true );
}
Add to new .js file in theme
@celticwebdesign
celticwebdesign / Facebook share pop-up
Last active December 21, 2015 10:36
Facebook share pop-up
JS ----
$('a.share_facebook').click(function(e) {
e.preventDefault();
var url = $('a.share_facebook').data('url');
var title = $('a.share_facebook').data('title');
var descr = $('a.share_facebook').data('descr');
var image = $('#slideshow_thumbnails li.thumbnail1 img').attr('src');
var winWidth = 520;
var winHeight = 350;
var winTop = (screen.height / 2) - (winHeight / 2);
@celticwebdesign
celticwebdesign / Twitter share pop-up
Created December 21, 2015 10:37
Twitter share pop-up
JS ----
$('a.share_twitter').click(function(e) {
e.preventDefault();
var width = 520,
height = 350,
left = ($(window).width() - width) / 2,
top = ($(window).height() - height) / 2,
url = this.href,
opts = 'status=1' +
@celticwebdesign
celticwebdesign / Pinterest share pop-up
Created December 21, 2015 11:21
Pinterest share pop-up
JS ----
$('a.share_pinterest').click(function(e) {
e.preventDefault();
var url = $('a.share_pinterest').data('url');
var title = $('a.share_pinterest').data('title');
var descr = $('a.share_pinterest').data('descr');
var image = $('#slideshow_thumbnails li.thumbnail1 img').attr('src');
var winWidth = 750;
var winHeight = 540;
var winTop = (screen.height / 2) - (winHeight / 2);
@celticwebdesign
celticwebdesign / WordPress Facebook Widget
Created January 9, 2016 19:38
WordPress Facebook Widget
-- Functions.php
// http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-wordpress-widget/
// Creating the widget
class meor_widget_facebook extends WP_Widget {
function __construct() {
parent::__construct(
// Base ID of your widget
'meor_widget_facebook',
@celticwebdesign
celticwebdesign / WordPress Posts Widget
Created January 9, 2016 19:40
WordPress Posts Widget
-- Functions.php
// http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-wordpress-widget/
// Creating the widget
class meor_widget_posts extends WP_Widget {
function __construct() {
parent::__construct(
// Base ID of your widget
'meor_widget_posts',
@celticwebdesign
celticwebdesign / Slide-Down Panel
Created January 23, 2016 14:59
Slide-Down Panel
HTML
<div class="treatments-view-all">
<a href='#'>View all ></a>
</div>
CSS