Skip to content

Instantly share code, notes, and snippets.

@mzdebo
mzdebo / default-author.php
Created September 25, 2020 11:50 — forked from chrisguitarguy/default-author.php
Set a default author for posts on your WordPress site.
<?php
/*
Plugin Name: Default Author
Plugin URI: http://pmg.co
Description: Set a default author for all posts and pages
Version: 1.0
Text Domain: default-author
Author: Christopher Davis
Author URI: http://christopherdavis.me
License: GPL2
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
<?php
/**
* Plugin Name: [Smush] - Bulk Delete Bak Images
* Plugin URI: https://premium.wpmudev.org/
* Description: Deletes all .bak images
* Author: Panos Lyrakis @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*/
@mzdebo
mzdebo / coronavirus_map_from_api.xml
Created April 6, 2020 15:15 — forked from carmoreira/coronavirus_map_from_api.xml
Export World Map with live info about covid-19 for Interactive Geo Maps WordPress plugin
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();