Skip to content

Instantly share code, notes, and snippets.

Avatar

Martin Miller m-miller

View GitHub Profile
@m-miller
m-miller / .babelrc
Created Aug 3, 2018 — forked from igorbenic/.babelrc
Integrating Gutenberg Blocks in Existing WordPress Plugins | https://www.ibenic.com/integrating-gutenberg-blocks-in-plugins
View .babelrc
{
"presets": [
[
"env",
{
"modules": false
}
]
],
"plugins": [
@m-miller
m-miller / conditional_metabox.js
Created Sep 26, 2017
Wordpress conditional metabox on checked category
View conditional_metabox.js
jQuery(document).ready(function() {
function metabox_category() {
// conditional show/hide metaboxes on checked category
var label = null;
var onemeta = jQuery('#id_of_custommetabox.postbox');
// get checked checkboxes
var ischecked = jQuery('#taxonomy_name_categorychecklist input[type="checkbox"]:checked');
var label = ischecked.parent().text().trim();
//console.log(label);
//console.log(ischecked.length);
@m-miller
m-miller / google_search_console_daily.R
Created Jun 3, 2017 — forked from ryanpraski/google_search_console_daily.R
Download Google Search Console data (formerly webmaster tools) to R using searchConsoleR package. This script downloads data for the most recent day of search console data which is 3 days ago. Tutorial describing how to automate daily Google Search Console pulls using this script: http://www.ryanpraski.com/google-search-console-api-r-guide-to-ge…
View google_search_console_daily.R
## A script to download and archive Google search console analytics (formerly webmaster tools)
##
## searchConsoleR package created by Mark Edmondson (http://markedmondson.me)
##
## This script downloads and writes data to .csv for the most recent day of search console data (3 days ago)
## load the required libraries
## (Download them with install.packages("googleAuthR") and install.packages("searchConsoleR") if necessary
library(googleAuthR)
library(searchConsoleR)
@m-miller
m-miller / nav-menu-exporter-importer.php
Created Jan 25, 2017 — forked from hissy/nav-menu-exporter-importer.php
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin.
View nav-menu-exporter-importer.php
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@m-miller
m-miller / soliloquy-remove-slideshow-button.php
Last active Jun 3, 2017
WordPress remove soliloquy slider button
View soliloquy-remove-slideshow-button.php
<?php
/*
Plugin Name: Remove Soliloquy slider button from editor
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Martin Miller
* Author URI: https://www.govdelivery.com
* Description: Remove the Add Slideshow button from all Visual Editors in WordPress
*/
You can’t perform that action at this time.