The hPlugins.php helper in Osclass offers a comprehensive set of functions that manage the plugin system. These functions allow you to run hooks and filters, add or remove custom functions, and handle plugin registration and configuration. They are essential for extending Osclass functionality without modifying core files.
osc_run_hook($hook) – Run a hook.
osc_apply_filter($hook, $content) – Apply a filter to a given text.
osc_add_hook($hook, $function, $priority = 5) – Add a hook.
osc_add_filter($hook, $function, $priority = 5) – Add a filter.
osc_remove_hook($hook, $function) – Remove a hook’s function.
osc_remove_filter($hook, $function) – Remove a filter’s function.
osc_is_this_category($name, $id) – Determines if the plugin is attached to the specified category.
osc_plugin_get_info($plugin) – Returns the plugin’s information.
osc_plugin_check_update($plugin) – Checks if there is a new version of the plugin.
osc_register_plugin($path, $function) – Registers a plugin file to be loaded.
osc_get_plugins() – Retrieves the list of plugins.
osc_plugin_is_installed($plugin) – Determines if a plugin is installed.
osc_plugin_is_enabled($plugin) – Determines if a plugin is enabled.
osc_plugin_configure_view($plugin) – Displays the default configuration view for a plugin (typically used to attach plugins to categories).
osc_plugin_resource($file) – Retrieves the path to a plugin’s resource file.
osc_plugin_configure_url($plugin) – Retrieves the plugin’s configuration URL.
osc_ajax_plugin_url($file = '') – Retrieves the URL for AJAX operations related to plugins.
osc_admin_configure_plugin_url($file = '') – Retrieves the administration configuration URL for plugins.
osc_admin_render_plugin_url($file = '') – Retrieves the URL for custom plugin administration options.
osc_admin_render_plugin($file = '') – Displays a custom plugin administration file.