Skip to content

Instantly share code, notes, and snippets.

View volodymyrpekh's full-sized avatar

Vlad Pekh volodymyrpekh

View GitHub Profile
@volodymyrpekh
volodymyrpekh / GIF-Screencast-OSX.md
Last active August 30, 2017 03:58 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF | mov to gif

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@volodymyrpekh
volodymyrpekh / hidden_comment_form.php
Created June 23, 2017 04:55 — forked from beastaugh/hidden_comment_form.php
Plugin to hide the WordPress comment form until the user clicks a link to reveal it.
<?php
/*
Plugin Name: Hidden Comment Form
Plugin URI: http://tarskitheme.com/help/hooks/example-plugins/
Description: Hide the comment form until the user clicks a link to reveal it.
Author: Benedict Eastaugh
Version: 1.1
Author URI: http://extralogical.net/
*/

How to get Composer running on SiteGround shared

  1. Download getcomposer.org/composer.phar to your account's home directory — /home/username.
  2. Edit .bashrc file in same directory by adding alias composer='/usr/local/php56/bin/php-cli ~/composer.phar' line. Update php56 part to current relevant version, if necessary.
  3. Restart SSH session or run source ~/.bashrc to reload config.
  4. Use composer command!
<?php
// filter the Gravity Forms button type
add_filter("gform_submit_button_1", "form_submit_button", 10, 2);
function form_submit_button($button, $form){
return "<button class='button' id='gform_submit_button_{$form["id"]}'><span><i class='fa fa-share fa-2x'></i> Send </span></button>";
}
//Change hook of gform_submit_button_X to the form that you are using
//Change <span><i class='fa fa-share fa-2x'></i> Send </span> to Font awesome and text of your choice
@volodymyrpekh
volodymyrpekh / footer.php
Created January 11, 2017 05:51 — forked from rali14/footer.php
Enable footer on the Job Listings Archive (Listify)
@volodymyrpekh
volodymyrpekh / footer.php
Created January 11, 2017 05:49 — forked from rali14/footer.php
Hide CTA for logged in users
@volodymyrpekh
volodymyrpekh / functions.php
Created January 11, 2017 05:38 — forked from rali14/functions.php
Set default cover image for all listings
function custom_default_listify_cover_image( $image, $args ) {
global $post;
if ( $post->post_type == 'job_listing' ) {
return ""; //You can add URL to a default image here or leave it blank if you do not want a background for listings
}
}
add_filter( 'listify_cover_image', 'custom_default_listify_cover_image', 10, 2 );
@volodymyrpekh
volodymyrpekh / archive-job_listings.php
Created January 11, 2017 05:33 — forked from rali14/archive-job_listings.php
Display term descriptions on the listing archive pages. (Listify)
<?php
/**
* Customized version of the template for displaying Job Listings which includes the term descriptions
*
* Also used for all job listing taxonomy archives.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package Listify
*/
@volodymyrpekh
volodymyrpekh / functions.php
Created January 11, 2017 05:31 — forked from rali14/functions.php
Display the username instead of first name on Account menu item
function custom_menu_item_name () {
$current_user = wp_get_current_user();
return $current_user->user_login;
}
add_filter( 'listify_acount_menu_user_label', custom_menu_item_name, 99 );
@volodymyrpekh
volodymyrpekh / content-aso.php
Created January 11, 2017 05:29 — forked from rali14/content-aso.php
Enable Shortcodes on As Seen On Section Listify
<?php
/**
* The template for displaying the call to action
*/
$title = listify_theme_mod( 'as-seen-on-title' );
$logos = listify_theme_mod( 'as-seen-on-logos' );
if ( '' == $logos ) {
return;
}
?>