Code Monkey home page Code Monkey logo

ebps-meetings's Introduction

Herb Miller

  • I'm planning on retiring when I reach State Penson Age.
  • I'm working on reducing unnecessary tasks.
  • I'm in the process of closing down WP-a2z

I'm still working on a number of WordPress related projects

  • oik-ai - my AI tool

  • But I've reduced the list of plugins and themes that I'm currently working on

WordPress Full Site Editing themes:

  • SB - Second Byte: Seriously Bonkers' experimental Full Site Editing theme.
  • Written - An experimental FSE theme to replace Genesis-hm
  • tt4ai - Child theme of Twenty Twenty-Four for writing about AI

WordPress plugins:

  • oik-bwtrace - Debug trace for WordPress - improvements for performance measurements
  • SB-Chart-block - A single block plugin to display Charts from CSV content.
  • Slog - An addon to my oik-bwtrace plugin to analyse daily trace summary reports and compare results.
  • SB-field-block - Field block to edit and display post meta data.
  • oik-unloader - WordPress Must Use plugin to unload unnecessary plugins on demand
  • gbcptedit - Gutenberg Custom Post Type edit
  • field-block-for-acf-pro - ACF Field block

Updated 28th May 2024

ebps-meetings's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar

ebps-meetings's Issues

Develop `[ebps-meetings]` shortcode to replace the Events calendar upcoming meetings widget

The purpose of this plugin is to improve the overall performance of the EBPS website.
One proposal is to deactivate the Events Calendar plugin on every page that doesn't really need it
and replace the Upcoming Events widget with equivalent code that's faster and uses fewer resources.

Requirements

Code to replace the widget that looks like this
image

Proposed solution

  • Implemented as a shortcode: [ebps-meetings]
  • Similar logic to the Events Calendar widget
  • But without the overhead of JavaScript
  • Use transients to cache the output of the middle section
  • Updates cached content each day
  • Styled the same as the Events Calendar widget
  • cache busting when events change

Nice to have

  • Implemented as a Widget
  • Implemented as a Gutenberg block

Permalinks to events should include `/event/` rather than `/tribe_events/`

In v0.1.0 of the ebps-meetings plugin the permalinks generated for the events are of the form
https://home-url/tribe_events/post-name
eg https://s.b/ebps/tribe_events/n-autumn-zoom-meeting/

they should be https://home-url/event/post-name

It appears that the rewrite attribute passed on the registration is being ignored.

  • Investigate why it's not being used by get_permalink()
  • implement an efficient solution to the problem.

[ebps-meetings] dependent upon `add_filter( 'widget_text', 'do_shortcode' )`

For the [ebps-meetings] shortcode to be expanded in widgets the do_shortcode() function needs to be run.

This is done by default for the Text widget but not the Custom HTML widget.
It's also done for the Block widget, a new one to me.

Several plugins that are activated in ebps.org.uk include the following code

add_filter( 'widget_text', 'do_shortcode' );

these include: jquery-collapse-o-matic, user-submitted-posts and wordpress-simple-paypal-shopping-cart

If oik-unloader deactivates all of these plugins then the shortcodes are not expanded in Custom HTML widgets.

One solution would be to call the code ourselves.
Another would be to always use the Text widget.
If that's the case the CSS for styling the View calendar link needs to be changed ( see #2 )
Do this anyway.

For some more information see bobbingwide/oik#83

eBPS meetings shortcode should be styled the same as the Events Calendar widget

One of the tasks in #1 is to ensure that the output of the [ebps-meetings] shortcode is

Styled the same as the Events Calendar widget

In this first version the generated HTML almost exactly reflects the HTML produced by the Events List widget.
When The Events Calendar is deactivated its CSS isn't enqueued.
We need to copy some of the CSS used the style the output and enqueue it ourselves.

Proposed solution

  • Enqueue CSS in a file called css/ebps-meetings.css
  • Code enough CSS to make it look the same.
  • Take into account that there's also some CSS in the twentyfourteen-child theme.
  • Investigate performance benefits of enqueing the CSS inline
  • Only enqueue CSS when the tribe_events post type needs to be registered.

Need to register `tribe_events_cat` custom category for the menu to work

When The Events Calendar plugin ( TEC) was deactivated there were two problems with the menu.

  1. The main menu item "Meetings" with custom link https://ebps.org.uk/?post_type=tribe_events didn't work
  2. The Meetings > Meetings submenu was missing.

The first problem was a known issue with oik-unloader. bobbingwide/oik-unloader#5 (comment)

The second was because the custom category tribe_events_cat wasn't registered.

Solution

The tribe_eventspost type and tribe_events_cat taxonomy need to registered,.
The registration needs to be done earlier than currently; in response to init.

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.