Skip to content

Instantly share code, notes, and snippets.

View vovafeldman's full-sized avatar
🔥
Making sh*t happen

Vova Feldman vovafeldman

🔥
Making sh*t happen
View GitHub Profile
@vovafeldman
vovafeldman / fs-highlight-top-level-menu.php
Created October 6, 2016 15:18
Highlight admin top level and submenu when viewing freemius pages.
<?php
/**
* Highlight admin top level and submenu when viewing freemius pages
*/
function iconic_ecifw_menu_highlight() {
global $plugin_page, $submenu_file;
if( iconic_ecifw_is_settings_page() ) {
$submenu_file = 'iconic-ecifw-settings';
@vovafeldman
vovafeldman / docs.scss
Last active October 13, 2016 05:01
Freemius - weDocs Breadcrumbs SASS
.wedocs-single-wrap
{
.wedocs-single-content
{
.wedocs-breadcrumb
{
list-style: none;
margin-bottom: 10px;
padding-left: 0;
@vovafeldman
vovafeldman / functions.php
Last active October 19, 2016 21:48
Freemius - WP Markdown Editor
<?php
/**
* Update markdown supported post types.
*
* @author Vova Feldman
*/
function freemius_update_supported_markdown_posts() {
if ( ! class_exists( 'WPCom_Markdown' ) ) {
// WP Markdown isn't installed.
return;
@vovafeldman
vovafeldman / _callouts.scss
Last active October 19, 2016 21:52
Freemius - Callouts Shortcodes
.wedocs-single-wrap
{
.wedocs-single-content
{
article
{
.entry-content
{
blockquote
@vovafeldman
vovafeldman / _responsive-container.scss
Last active October 19, 2016 21:52
Freemius - YouTube and Vimeo Shortocdes
$video-max-width: 640px;
$video-max-height: 360px;
.responsive-container {
max-width: $video-max-width;
max-height: $video-max-height;
overflow: hidden;
.responsive-container
{
@vovafeldman
vovafeldman / functions.php
Last active October 19, 2016 23:12
Freemius - Changing Search Permastruct
<?php
/**
* Customize docs search permastruct for search caching.
*
* @author Vova Feldman
*/
function freemius_docs_search_permastruct_rewrite() {
if ( post_type_exists( 'docs' ) ) {
/**
* We want the search pages to be cached.
@vovafeldman
vovafeldman / functions.php
Last active October 31, 2016 22:44
Freemius - WordPress Head Cleanup
<?php
// Disable emoji.
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
// Cleanup RPC.
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
// Cleanup oembed.
@vovafeldman
vovafeldman / dump-edd-key.php
Created November 17, 2016 16:45
Dump EDD license key.
<?php
function fs_dump_edd_key() {
if (is_admin()) {
$license_key = trim( get_option( 'my_edd_license_key' ) );
?>
<div class="notice notice-error is-dismissible">
<p>license key <?php echo $license_key ?></p>
</div>
<?php
}
@vovafeldman
vovafeldman / freemius-api-client.rb
Created December 19, 2016 23:25 — forked from cyberhobo/freemius-api-client.rb
Basis for a Ruby Freemius HTTP API client.
module Freemius
API_HOST = 'api.freemius.com'
SANDBOX_HOST = 'sandbox-api.freemius.com'
class Base
# Options taken from http://docs.freemius.apiary.io/#introduction/the-authentication-header
# * host Default is api.freemius.com
# * api_version Default is v1
# * scope_entity Default is 'plugin'. Could also be 'developer', 'install', 'site', 'user'
# * scope_entity_id Required.

Contributor License Agreement

The following terms are used throughout this agreement:

You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.

Project - is an umbrella term that refers to any and all Freemius, Inc. open source projects.

Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work.

Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with Freemius, Inc., contributors or maintainers.