diff --git a/administrator/components/com_admin/sql/updates/mysql/6.2.0-2026-06-10.sql b/administrator/components/com_admin/sql/updates/mysql/6.2.0-2026-06-10.sql new file mode 100644 index 0000000000000..438f9228e400b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/6.2.0-2026-06-10.sql @@ -0,0 +1,14 @@ +-- +-- Insert back previously unlocked schemaorg and task core plugins if they have been uninstalled +-- +INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) +SELECT 0, 'plg_schemaorg_localbusiness', 'plugin', 'localbusiness', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0 +WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'localbusiness' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0); + +-- +-- Update present unlocked schemaorg and task core plugins +-- +UPDATE `#__extensions` SET `locked` = 1 + WHERE `type` = 'plugin' AND `folder` = 'schemaorg' + AND `element` IN ('article', 'blogposting', 'book', 'event', 'jobposting', 'localbusiness', 'organization', 'person', 'recipe', 'custom') + AND `locked` <> 1; diff --git a/administrator/components/com_admin/sql/updates/postgresql/6.2.0-2026-06-10.sql b/administrator/components/com_admin/sql/updates/postgresql/6.2.0-2026-06-10.sql new file mode 100644 index 0000000000000..438f9228e400b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/6.2.0-2026-06-10.sql @@ -0,0 +1,14 @@ +-- +-- Insert back previously unlocked schemaorg and task core plugins if they have been uninstalled +-- +INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) +SELECT 0, 'plg_schemaorg_localbusiness', 'plugin', 'localbusiness', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0 +WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'localbusiness' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0); + +-- +-- Update present unlocked schemaorg and task core plugins +-- +UPDATE `#__extensions` SET `locked` = 1 + WHERE `type` = 'plugin' AND `folder` = 'schemaorg' + AND `element` IN ('article', 'blogposting', 'book', 'event', 'jobposting', 'localbusiness', 'organization', 'person', 'recipe', 'custom') + AND `locked` <> 1; diff --git a/administrator/language/en-GB/plg_schemaorg_localbusiness.ini b/administrator/language/en-GB/plg_schemaorg_localbusiness.ini new file mode 100644 index 0000000000000..06440a4e37671 --- /dev/null +++ b/administrator/language/en-GB/plg_schemaorg_localbusiness.ini @@ -0,0 +1,20 @@ +; Joomla! Project +; (C) 2026 Open Source Matters, Inc. +; License GNU General Public License version 2 or later; see LICENSE.txt +; Note : All ini files need to be saved as UTF-8 + +PLG_SCHEMAORG_LOCALBUSINESS="Schema.org - LocalBusiness" +PLG_SCHEMAORG_LOCALBUSINESS_DESCRIPTION_LABEL="More information on the Schema.org LocalBusiness Type can be found at https://schema.org/LocalBusiness" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_ADDRESS_LABEL="Address" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_EMAIL_LABEL="Email" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_GENERIC_FIELD_LABEL="Generic Field" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_GENERIC_TITLE_LABEL="Title" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_GENERIC_VALUE_LABEL="Value" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_LOCALITY_LABEL="Locality" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_LOGO_LABEL="Logo" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_NAME_LABEL="Name" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_POSTAL_CODE_LABEL="Postal Code" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_STREET_ADDRESS_LABEL="Street Address" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_TELEPHONE_LABEL="Telephone" +PLG_SCHEMAORG_LOCALBUSINESS_FIELD_URL_LABEL="URL" +PLG_SCHEMAORG_LOCALBUSINESS_XML_DESCRIPTION="Adds LocalBusiness as a new schema type in existing schemas." diff --git a/administrator/language/en-GB/plg_schemaorg_localbusiness.sys.ini b/administrator/language/en-GB/plg_schemaorg_localbusiness.sys.ini new file mode 100644 index 0000000000000..c3c3eda3f576d --- /dev/null +++ b/administrator/language/en-GB/plg_schemaorg_localbusiness.sys.ini @@ -0,0 +1,7 @@ +; Joomla! Project +; (C) 2026 Open Source Matters, Inc. +; License GNU General Public License version 2 or later; see LICENSE.txt +; Note : All ini files need to be saved as UTF-8 + +PLG_SCHEMAORG_LOCALBUSINESS="Schema.org - LocalBusiness" +PLG_SCHEMAORG_LOCALBUSINESS_XML_DESCRIPTION="Adds LocalBusiness as a new schema type in existing schemas." diff --git a/installation/sql/mysql/base.sql b/installation/sql/mysql/base.sql index 30f4512ce59c0..237328d598e55 100644 --- a/installation/sql/mysql/base.sql +++ b/installation/sql/mysql/base.sql @@ -344,10 +344,11 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, (0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 3, 0), (0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 4, 0), (0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 5, 0), -(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 6, 0), -(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 7, 0), -(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 8, 0), -(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 9, 0), +(0, 'plg_schemaorg_localbusiness', 'plugin', 'localbusiness', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 6, 0), +(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 7, 0), +(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 8, 0), +(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 9, 0), +(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 10, 0), (0, 'plg_system_accessibility', 'plugin', 'accessibility', 'system', 0, 0, 1, 0, 1, '', '{}', '', 1, 0), (0, 'plg_system_actionlogs', 'plugin', 'actionlogs', 'system', 0, 1, 1, 0, 1, '', '{}', '', 2, 0), (0, 'plg_system_cache', 'plugin', 'cache', 'system', 0, 0, 1, 0, 1, '', '{"browsercache":"0","cachetime":"15"}', '', 3, 0), diff --git a/installation/sql/postgresql/base.sql b/installation/sql/postgresql/base.sql index 0d8786e809902..aba07923e237a 100644 --- a/installation/sql/postgresql/base.sql +++ b/installation/sql/postgresql/base.sql @@ -350,10 +350,11 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", (0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 3, 0), (0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 4, 0), (0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 5, 0), -(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 6, 0), -(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 7, 0), -(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 8, 0), -(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 9, 0), +(0, 'plg_schemaorg_localbusiness', 'plugin', 'localbusiness', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 6, 0), +(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 7, 0), +(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 8, 0), +(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 9, 0), +(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 10, 0), (0, 'plg_system_accessibility', 'plugin', 'accessibility', 'system', 0, 0, 1, 0, 1, '', '{}', '', 1, 0), (0, 'plg_system_actionlogs', 'plugin', 'actionlogs', 'system', 0, 1, 1, 0, 1, '', '{}', '', 2, 0), (0, 'plg_system_cache', 'plugin', 'cache', 'system', 0, 0, 1, 0, 1, '', '{"browsercache":"0","cachetime":"15"}', '', 3, 0), diff --git a/libraries/src/Extension/ExtensionHelper.php b/libraries/src/Extension/ExtensionHelper.php index 9d52b7dc900be..65ee17aec3838 100644 --- a/libraries/src/Extension/ExtensionHelper.php +++ b/libraries/src/Extension/ExtensionHelper.php @@ -291,6 +291,7 @@ class ExtensionHelper ['plugin', 'custom', 'schemaorg', 0], ['plugin', 'event', 'schemaorg', 0], ['plugin', 'jobposting', 'schemaorg', 0], + ['plugin', 'localbusiness', 'schemaorg', 0], ['plugin', 'organization', 'schemaorg', 0], ['plugin', 'person', 'schemaorg', 0], ['plugin', 'recipe', 'schemaorg', 0], diff --git a/plugins/schemaorg/localbusiness/forms/schemaorg.xml b/plugins/schemaorg/localbusiness/forms/schemaorg.xml new file mode 100644 index 0000000000000..433a9ec708c6d --- /dev/null +++ b/plugins/schemaorg/localbusiness/forms/schemaorg.xml @@ -0,0 +1,130 @@ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+
+
+ diff --git a/plugins/schemaorg/localbusiness/localbusiness.xml b/plugins/schemaorg/localbusiness/localbusiness.xml new file mode 100644 index 0000000000000..ac51b4c0ce2d7 --- /dev/null +++ b/plugins/schemaorg/localbusiness/localbusiness.xml @@ -0,0 +1,43 @@ + + + plg_schemaorg_localbusiness + Joomla! Project + 2026-04 + (C) 2026 Open Source Matters, Inc. + GNU General Public License version 2 or later; see LICENSE.txt + admin@joomla.org + www.joomla.org + __DEPLOY_VERSION__ + PLG_SCHEMAORG_LOCALBUSINESS_XML_DESCRIPTION + Joomla\Plugin\Schemaorg\LocalBusiness + + services + src + + + language/en-GB/plg_schemaorg_localbusiness.ini + language/en-GB/plg_schemaorg_localbusiness.sys.ini + + + +
+ + +
+
+
+
diff --git a/plugins/schemaorg/localbusiness/services/provider.php b/plugins/schemaorg/localbusiness/services/provider.php new file mode 100644 index 0000000000000..13101887a31b1 --- /dev/null +++ b/plugins/schemaorg/localbusiness/services/provider.php @@ -0,0 +1,44 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +\defined('_JEXEC') or die; + +use Joomla\CMS\Extension\PluginInterface; +use Joomla\CMS\Factory; +use Joomla\CMS\Plugin\PluginHelper; +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use Joomla\Plugin\Schemaorg\LocalBusiness\Extension\LocalBusiness; + +return new class () implements ServiceProviderInterface { + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * + * @since __DEPLOY_VERSION__ + */ + public function register(Container $container) + { + $container->set( + PluginInterface::class, + function (Container $container) { + $plugin = new LocalBusiness( + (array) PluginHelper::getPlugin('schemaorg', 'localbusiness') + ); + $plugin->setApplication(Factory::getApplication()); + + return $plugin; + } + ); + } +}; diff --git a/plugins/schemaorg/localbusiness/src/Extension/LocalBusiness.php b/plugins/schemaorg/localbusiness/src/Extension/LocalBusiness.php new file mode 100644 index 0000000000000..3e695ff413d5b --- /dev/null +++ b/plugins/schemaorg/localbusiness/src/Extension/LocalBusiness.php @@ -0,0 +1,45 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +namespace Joomla\Plugin\Schemaorg\LocalBusiness\Extension; + +use Joomla\CMS\Plugin\CMSPlugin; +use Joomla\CMS\Schemaorg\SchemaorgPluginTrait; +use Joomla\Event\SubscriberInterface; + +// phpcs:disable PSR1.Files.SideEffects +\defined('_JEXEC') or die; +// phpcs:enable PSR1.Files.SideEffects + +/** + * Schemaorg Plugin + * + * @since __DEPLOY_VERSION__ + */ +final class LocalBusiness extends CMSPlugin implements SubscriberInterface +{ + use SchemaorgPluginTrait; + + /** + * Load the language file on instantiation. + * + * @var boolean + * @since __DEPLOY_VERSION__ + */ + protected $autoloadLanguage = true; + + /** + * The name of the schema form + * + * @var string + * @since __DEPLOY_VERSION__ + */ + protected $pluginName = 'LocalBusiness'; +}