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-my-addon.php
Created March 26, 2016 20:25
Example of an add-on with Freemius that is activated only when the parent plugin is activated and loaded.
<?php
/*
Plugin Name: My Add-on
Version: 1.0.0
Author: Vova Feldman
Author URI: http://freemius.com
License: GPL2
*/
// Exit if accessed directly
@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 / functions.php
Last active April 20, 2023 14:54
Freemius - weDocs KB Breadcrumbs Rich-Snipets
<?php
/**
* Override weDocs breadcrumb to add schema.org rich snippets metadata.
*
* @author Vova Feldman (@svovaf)
*
* @return void
*/
function freemius_wedocs_breadcrumbs() {
global $post;
@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 27, 2021 14:05
Freemius - weDocs Permalinks
<?php
/**
* Customize docs permalinks parsing.
*
* @author Vova Feldman
*/
function freemius_docs_permastruct_rewrite() {
if ( post_type_exists( 'docs' ) ) {
// Modify root slug to "help" instead of docs.
@vovafeldman
vovafeldman / _sections-header.scss
Last active October 27, 2021 14:01
Freemius - weDocs Pretty Sections
// Header search
.page-header
{
.wedocs-search-form
{
position: relative;
input
{
@include placeholder(#999);
@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 / functions.php
Last active January 25, 2022 04:23
Freemius - WP Markdown Editor, Exporting
<?php
/**
* When exporting using WP default export tool, use the
* markdown version when exist.
*
* @author Vova Feldman
*
* @param string $content
*
* @return string
@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 / _callouts.scss
Last active October 19, 2016 21:52
Freemius - Callouts Shortcodes
.wedocs-single-wrap
{
.wedocs-single-content
{
article
{
.entry-content
{
blockquote