GithubHelp home page GithubHelp logo

flowdee / ohdear Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 1.1 MB

Oh Dear WordPress Plugin

Home Page: https://wordpress.org/plugins/ohdear/

CSS 1.67% PHP 96.81% JavaScript 1.52%
wordpress wordpress-plugin ohdear

ohdear's Introduction

Hey, I'm Florian 👋

I'm a passionated web developer from Germany 🇩🇪 who loves to build software and online services. 💻

Follow me on Twitter @flowdee 🐦

ohdear's People

Contributors

flowdee avatar owenvoke avatar webdj-agency avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ohdear's Issues

Scheduled Tasks / WP Cron

Would love to add support for OhDear's scheduled tasks and track WP cron execution, so you can monitor if it runs properly on your site.

Bildschirm­foto 2023-03-13 um 18 36 35

When you set up a "Scheduled Task" in OhDear, they give you a "Ping URL" which needs to be called frequently.

Besides that, you can set up the frequency how often the URL should be called (Grace period is unimportant for our implementation).

So the idea is, that on our settings page, we add a new section "Scheduled Tasks (WP Cron)", as well as the following settings:

  • Ping URL (url field)
  • Frequency (number field; values from 1 to 60; no comma)

When Ping url or frequency are empty, our plugin does not do anything here at all.

Once input is available, our plugin sets a custom cron interval based on the settings given: https://developer.wordpress.org/plugins/cron/understanding-wp-cron-scheduling/

For the event function, we just call the entered ohdear ping url.

Here's a example I currently used for our sites:

/*
 * Setup cron interval
 */
add_filter( 'cron_schedules', function ( $schedules ) {
   $schedules['fdmedia_cron_check'] = array(
       'interval' => 300,
       'display' => __( 'Every 5 Minutes' )
   );
   return $schedules;
} );

/*
 * Schedule cron event
 */
if ( ! wp_next_scheduled( 'fdmedia_site_cron_check' ) ) {
    wp_schedule_event( time(), 'fdmedia_cron_check', 'fdmedia_site_cron_check' );
}

/*
 * Cron check function
 */
add_action('fdmedia_site_cron_check', function() {
	// Call OhDear API
	$response = wp_remote_get( 'https://ping.ohdear.app/d0a8ea91-dd58-400b-8a3a-1835a6126f4e' );
	// Do nothing.
});

Prefix admin view HTML ids and classes

After the release we should optimize the views as follows:

All classes/ids should be prefixed with ohdear-. Otherwise, we risk overwriting global classes in the admin area, which we don't want on purpose.

Afterward, the CSS file must be updated as well.

FR: add MUWP support

Hi! Thanks for providing this handy plugin. Just started installing it.

I have a feature request. I'm running multiple Wordpress sites, based on 1 single install, using the multisite feature of wordpress.
I noticed I had to configure each website separately, which makes sense when separate websites are managed by separate people, who might have or not separate Oh Dear accounts.

It might perhaps make sense, to centralize configuration, for multisite setups, in a "Network Admin" admin page of said install?
Also, Multisite wordpress, also allows to define a domain alias for the site, so one can have "www.mylittleshop.com" instead of "littleshop.mymultisitewp.net". You might want to look at that and try to automap sites in WP with urls in Oh Dear.

Thank you for considering this. If you need testing, I'll gladly help.

Redesign of their website

We must apply the redesign to the plugin by switching the logo/icon and also to the WP org header + logo graphics

Release 1.0.2

Could you please prepare & release version 1.0.2?

  • Update version number in main plugin file + readme.txt
  • readme.txt: Tested up to & stable tag
  • readme.txt: Changelog
  • Push to master
  • Create and push tag 1.0.2
  • Check if auto-deploy to wporg went through properly

Setup Airbrake for your PHP application

Installation

Install Airbrake using Composer by running the following command from your project's directory:

composer require airbrake/phpbrake

Configuration

Copy the following configuration snippet into your PHP app. It shows how to initialize Airbrake and register the instance as an error handler:

$notifier = new Airbrake\Notifier(array(
    'projectId' => 283568,
    'projectKey' => 'fc19f3848f145ddf8d713512df2a1085'
));

Airbrake\Instance::set($notifier);

$handler = new Airbrake\ErrorHandler($notifier);
$handler->register();

To send a test error, you can call Airbrake directly like in this try/catch example:

try {
    throw new Exception('hello from phpbrake');
} catch(Exception $e) {
    Airbrake\Instance::notify($e);
}

Framework integrations

Full documentation

Check out our official GitHub repo for info on additional features like:

Dashboard Widgets

Wouldn't it be awesome if we could provide 3 Oh Dear dashboard widgets which you can drag & drop and show/hide if you need them?

  • Uptime Widget
  • Performance Widget
  • Broken Links Widget

Bildschirmfoto 2020-07-26 um 16 07 06

I would only show the widgets, after you entered an API key and a site was selected, of course.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.