Coder Social home page Coder Social logo

ucf / ucf-rss-feed-plugin Goto Github PK

View Code? Open in Web Editor NEW
0.0 9.0 2.0 152 KB

Provides a shortcode and default styles for displaying RSS feeds within post content.

PHP 85.16% JavaScript 11.18% SCSS 3.66%
wordpress wordpress-plugin ucf-cm hacktoberfest

ucf-rss-feed-plugin's Introduction

UCF RSS Feed Plugin

Provides a shortcode and default styles for displaying RSS feeds within post content.

Description

Provides a shortcode and default styles for displaying RSS feeds within post content.

Documentation

Head over to the UCF RSS Feed Plugin wiki for detailed information about this plugin, installation instructions, and more.

Changelog

1.0.4

Enhancements:

  • Added composer file.

1.0.3

Bug Fixes:

  • Corrected a bug where the cache_expiration option would be returned as an empty string, causing an invalid string to integer operation to occur when the conversion from hours to seconds was calculated.

1.0.2

Enhancements:

  • Added plugin version number to enqueued stylesheet for cache busting.
  • Added CONTRIBUTING.md doc, Github issue/PR templates, and linter configs to the project.

1.0.1

Bug Fixes:

  • Fixed Strict Standards PHP notice

1.0.0

  • Initial release

Upgrade Notice

n/a

Development

Note that compiled, minified css and js files are included within the repo. Changes to these files should be tracked via git (so that users installing the plugin using traditional installation methods will have a working plugin out-of-the-box.)

Enabling debug mode in your wp-config.php file is recommended during development to help catch warnings and bugs.

Requirements

  • node
  • gulp-cli

Instructions

  1. Clone the UCF-RSS-Feed-Plugin repo into your local development environment, within your WordPress installation's plugins/ directory: git clone https://github.com/UCF/UCF-RSS-Feed-Plugin.git

  2. cd into the new UCF-RSS-Feed-Plugin directory, and run npm install to install required packages for development into node_modules/ within the repo

  3. Optional: If you'd like to enable BrowserSync for local development, or make other changes to this project's default gulp configuration, copy gulp-config.template.json, make any desired changes, and save as gulp-config.json.

    To enable BrowserSync, set sync to true and assign syncTarget the base URL of a site on your local WordPress instance that will use this plugin, such as http://localhost/wordpress/my-site/. Your syncTarget value will vary depending on your local host setup.

    The full list of modifiable config values can be viewed in gulpfile.js (see config variable).

  4. Run gulp default to process front-end assets.

  5. If you haven't already done so, create a new WordPress site on your development environment to test this plugin against.

  6. Activate this plugin on your development WordPress site.

  7. Configure plugin settings from the WordPress admin under "UCF RSS Feeds".

  8. Run gulp watch to continuously watch changes to scss and js files. If you enabled BrowserSync in gulp-config.json, it will also reload your browser when plugin files change.

Other Notes

  • This plugin's README.md file is automatically generated. Please only make modifications to the README.txt file, and make sure the gulp readme command has been run before committing README changes. See the contributing guidelines for more information.

Contributing

Want to submit a bug report or feature request? Check out our contributing guidelines for more information. We'd love to hear from you!

ucf-rss-feed-plugin's People

Contributors

cjg89 avatar jmbarne3 avatar mcatech avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ucfcdl mikesetzer

ucf-rss-feed-plugin's Issues

PHP 8 - `cache_expiration` option not being cast as int properly

Describe the bug

PHP 8.x starts throwing a fatal error in includes/ucf-rss-common.php on line 51:

PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in ucf-rss-feed-plugin/includes/ucf-rss-common.php:51

The line in question points to UCF_RSS_Common::get_cache_expiration():

/**
* Returns the cache expiration for RSS feeds.
*
* @author Jo Dickson
* @since 1.0.0
* @return int | expiration, in seconds
**/
public static function get_cache_expiration() {
return UCF_RSS_Config::get_option_or_default( 'cache_expiration' ) * HOUR_IN_SECONDS;
}

which suggests that the cache_expiration is not being properly cast as an int (see https://github.com/UCF/UCF-RSS-Feed-Plugin/blob/master/includes/ucf-rss-config.php#L153-L161)

Steps to Reproduce

n/a (reported on Teams)

Expected Behavior

cache_expiration should be an integer, and we should be able to multiply its value by HOUR_IN_SECONDS.

Possible Fix

n/a

Your environment:

WP 5.6, PHP 8, Plugin version 1.0.2

Additional context

Relevant discussion: https://teams.microsoft.com/l/message/19:[email protected]/1617983433732?tenantId=bb932f15-ef38-42ba-91fc-f3c59d5dd1f1&groupId=5e3e72e2-3599-47b3-bcfc-bb3d5b579f12&parentMessageId=1617983433732&teamName=UCFTeam-CAMPUS-Wordpress&channelName=help-plugins&createdTime=1617983433732

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.