e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

news shortcodes moved to plugin #5066

Closed Jimmi08 closed 9 months ago

Jimmi08 commented 10 months ago

Motivation and Context

](https://github.com/e107inc/e107/issues/5065) ### Description just moved the shortcode file and changed way how they are called ### How Has This Been Tested? Real example ### Types of Changes

Checklist

CaMer0n commented 9 months ago

@Jimmi08 I understand the motivation, but this is a breaking change. Every theme or plugin in existence which either calls the shortcodes via e107::getScBatch(), or loads them the old way with a require_once(e_CORE."shortcodes/batch/news_shortcodes.php"); would cease to function correctly. So, at the very least, a placeholder file would need to be left at e_CORE."shortcodes/batch/news_shortcodes.php.

Jimmi08 commented 9 months ago

In public static function getScBatch($className, $pluginName = null, $overrideClass = null)

/* legacy fix */ 
if($className == "news") $pluginName = true;

and add debug warning about using outdated code.

Nevermind, you can close this. I finished separating news from the core (including URLs) so I am too forward to need this anymore.