From fca3947ee4a877b4484312499b4b0e5a9244eccd Mon Sep 17 00:00:00 2001 From: Goce Mitevski Date: Tue, 10 May 2022 11:43:07 +0200 Subject: [PATCH 1/2] Remove getimagesize due to a PHP warning and remove unused variables --- functions.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/functions.php b/functions.php index 1c4b076..7a2b130 100644 --- a/functions.php +++ b/functions.php @@ -311,7 +311,7 @@ function okfn_is_post_rendered( $post ) { } function okfn_get_first_image_url_from_post_content() { - global $post, $posts; + global $post; $first_img_url = ''; $is_image_file = false; @@ -325,17 +325,7 @@ function okfn_get_first_image_url_from_post_content() { endif; - // Check if the image URL points to an actual image file - // --------------------------------------------------------------------------- - if ( function_exists( 'getimagesize' ) ) : - - if ( ! empty( $first_img_url ) ) : - $is_image_file = getimagesize( $first_img_url ); - endif; - - endif; - - if ( empty( $first_img_url ) || ! $is_image_file ) : + if ( empty( $first_img_url ) ) : // Reset value if no image is available $first_img_url = false; From 07f184b4d347f21519fae4e2939ada2673772742 Mon Sep 17 00:00:00 2001 From: Goce Mitevski Date: Tue, 10 May 2022 14:37:05 +0200 Subject: [PATCH 2/2] Fix Markdown inconsistencies in README --- README.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e75da70..7c38da8 100755 --- a/README.md +++ b/README.md @@ -1,31 +1,27 @@ -OKFN WordPress Theme -================= +# OKFN WordPress Theme OKFNWP is a WordPress theme built on Bootstrap. -Getting Started ---------------- +## Getting Started + **You'll need the following installed before continuing:** - * [Node.js](http://nodejs.org): Use the installer provided on the NodeJS website. - * [Grunt](http://gruntjs.com/): Run `[sudo] npm install -g grunt-cli` + +* [Node.js](http://nodejs.org): Use the installer provided on the NodeJS website. +* [Grunt](http://gruntjs.com/): Run `[sudo] npm install -g grunt-cli` To get started run: `npm install && grunt watch` +## Templates -Templates ---------- - -**Homepage** +### **Homepage** The homepage template is a regular full-width content page. Use the `[latestposts]` shortcode to display the latest blog posts. +## Shortcodes -Shortcodes ----------- - -**Latest Blog Posts** +### **Latest Blog Posts** To add a 3-column row of the latest blog posts, use: