ClassicPress Development with GitHub: Delete Repository

GitHubWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with GitHub.

Over the last few posts, I’ve shown how to create and use the GutHub website for managing repositories. I’ve found that every so often when working with GitHub, I need to delete a repository. This is fairly simple to do, but only delete ones which you are sure are no longer needed, as there is no undo delete function.

To delete a repository, load it on the GitHub website and click the Settings button:

Repository webpage

Continue reading “ClassicPress Development with GitHub: Delete Repository”

ClassicPress Development with GitHub: Commit Files

GitHubWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with GitHub.

With a repository created, we can now upload the existing project files. Do this by visiting the repository page and click the Upload files button:

GitHub repository page

Continue reading “ClassicPress Development with GitHub: Commit Files”

ClassicPress Development with GitHub: Create Repository

GitHubWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with GitHub.

With us now signed up for GitHub, we can create our first repository. From your dashboard (which is https://github.com/ followed by your username), click the New repository button:

Create a new repository on GitHub

Continue reading “ClassicPress Development with GitHub: Create Repository”

azurecurve ClassicPress Plugins: All plugins now auto-update

ClassicPress PluginsThis is part of the azurecurve ClassicPress Plugins which introduces the plugins I have available for ClassicPress.

I have 35 plugins now published for ClassicPress which have required a manual update whenever I released a new version. Well, CodePotent has developed an Update Manager plugin which can be used to automatically update plugins.

This has been integrated into the latest version of all of my plugins; this means if you manually update to the latest version, all future updates will come down as an automatic update which is applied in the same way as the WordPress plugin updates.

It’s been pointed out to me that I should clarify that by “automatic update” I mean it is available as an update in the same way as a standard plugin updated from the WordPress Repository, and in future from the ClassicPress Directory, not that it will update without an admin logging into the dashboard and hitting the update button.

All future plugins I create will include this automatic update functionality as well, until such time as the ClassicPress Plugin Directory is launched.

Click to show/hide the azurecurve ClassicPress Plugins Series Index

Updated at 2128 on 31/01/2020 to clarify what I mean by auto-update.

azurecurve ClassicPress Plugins: To Twitter

ClassicPress PluginsThis is part of the azurecurve ClassicPress Plugins which introduces the plugins I have available for ClassicPress.

The plugin I am going to cover in this post, is a brand new one written for ClassicPress; To Twitter.

Functionality

Allows posts to be automatically tweeted when they are published.

Mark the Post tweet on publish/update? checkbox to post tweet when the post is published (works for both immediately and scheduled posts.

Set hashtags in the hashtags box; these appear after the tweet.

Save a draft of the post to see auto-generated default tweet and amend if necessary; to regenerate default tweet, clear Tweet field and save draft; post URL is represented by a %s placeholder.

Integrates with my URL Shortener for URL in tweet.

This plugin is multisite compatible with each site having it’s own settings.

Download

The plugin can be downloaded via my Development site.

Click to show/hide the azurecurve ClassicPress Plugins Series Index

azurecurve ClassicPress Plugins: Markdown

ClassicPress PluginsThis is part of the azurecurve ClassicPress Plugins which introduces the plugins I have available for ClassicPress.

The plugin I am going to cover in this post, is a brand new one written for ClassicPress; Markdown.

Functionality

This plugin allows a [markdown]shortcode[/markdown] to be applied which will translate markdown into HTML markup for display.

Demo

Markdown is installed on my Development site with all of the plugin pages, including the one for this plugin are written in markdown.

Download

The plugin can be downloaded via my Development site.

Click to show/hide the azurecurve ClassicPress Plugins Series Index

azurecurve ClassicPress Plugins: Add Open Graph Tags

ClassicPress PluginsThis is part of the azurecurve ClassicPress Plugins which introduces the plugins I have available for ClassicPress.

The plugin I am going to cover in this post, is a brand new one written for ClassicPress; Add Open Graph Tags.

Functionality

Add Open Graph Tags to attach rich photos to social media posts to Facebook or LinkedIn, helping to drive traffic to your website.

Options allow:

  • Excerpt or first 200 characters of post added to card.
  • Thumbnail or first post image will be added to card.
  • Integrate with Floating Featured Images for card image.

This plugin is multisite compatible; each site will need settings to be configured in the admin dashboard.

Demo

If you select a post on this blog containing images, the first one will be sent to LinkedIn or Facebook when you share the post.

Download

The plugin can be downloaded via my Development site.

Click to show/hide the azurecurve ClassicPress Plugins Series Index

ClassicPress Development with GitHub: Sign up for GitHub

GitHubWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with GitHub.

The first step to using GitHub for developing with ClasssicPress, is to create a GitHub account; navigate to the landing page, enter a Username, Email and Password and click the large green Sign up for Github button:

Sign up for GitHub

Continue reading “ClassicPress Development with GitHub: Sign up for GitHub”

ClassicPress Development with GitHub: Series Index

GitHubI have been using ClassicPress to run this blog, and several other sites, since early last year. I have also created new versions of all of my plugins for ClassicPress.

When I was working with plugins for WordPress, I used their Plugin Repository for source control which was based off SVN. This wasn’t really the ideal way of doing things, as I should have had my own source control for development purposes.

At the start of 2019, GitHub announced new unlimited repositories (amongst some other changes) which made GitHub a viable source control tool for me.

The added bonus of using GitHub is that ClassicPress mean to use it for their Plugin Directory which is scheduled for inclusion in version 2. Development of this is in the early stages now, but using GitHub for my own development means I am at least part way to being compatible with the directory when it is launched.

I have over a hundred repositories now on GitHub (although you’ll see a much smaller number as quite a few are private). I took some screenshots when I started and meant to blog about it and then got sidetracked. In this series of posts I am going back to my intended posts, in which I am going to cover the basics of using GitHub for development of ClassicPress plugins.

This is a weekend series of posts with new posts going live over the next few weeks. If you’re reading this on azurecurve|Ramblings of a Dynamics GP Consultant the index will update automatically.

Separately compress all sub folders

7-ZipI started using WordPress for this blog when it launched in June 2011 until last year when, with Gutenberg on the horizon, I migrated to ClassicPress. This migration was easy as ClassicPress is a hard-fork of WordPress 4.9. As part od the migration I opted to rewrite all of my plugins to improve them and make them more secure.

I have 32 publically available plugins for ClassicPress. I’ve recently made changes to all of the plugins which means I need to make a release of them.

This partly done by committing the changes to Git Hub and making a tag, but you also need to add a zip file. There are commands to do this automatically on GitHub, but I am quote new so am opting to create the zips myself and upload them.

To do this I wanted to automatically compress all of the plugin folders, but exclude any hidden folders (such as the .git folder). I did some exploring and found the required command on Stack Overflow using 7-zip:

for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -xr!.git\ -xr!*~ "%%X.zip" "%%X\"

The question which had previously been asked was this one and the two answers I used were this and this.