Skip to content

Instantly share code, notes, and snippets.

@thartl
thartl / functions.php
Last active September 29, 2019 01:52
<?php
if ( ! function_exists( 'plugin_basename_main_file' ) ) {
/**
* Gets plugin folder and main file.
* Example result: Core-Functionality/core-functionality.php
*
* `plugin_basename()` returns main plugin file only when called from that file.
* This function works from within any plugin file.
*
#!/bin/bash
# Prints a list of wp cron schedules on servers set up by SpinupWP.
# Includes only standard wp cron events, nothing custom.
#
# Setup:
# cd /usr/bin/
# sudo vim get_cron_schedules.sh
# -- paste in the contents of this file and save
# sudo chmod 755 get_cron_schedules.sh
#