Ashish Mohta and Mark R. Henderson's Remove Forum Topic plugin. Version: 4.2 Author: mr_pelle Author URI: mailto:francesco.pelle@gmail.com */ /** * @license CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/ */ /** * Define constants */ define( 'NICER_PERMALINKS_ID', 'nicer-permalinks' ); define( 'NICER_PERMALINKS_NAME', 'Nicer Permalinks' ); // Create text domain for translations bb_load_plugin_textdomain( NICER_PERMALINKS_ID, dirname( __FILE__ ) . '/languages' ); if ( bb_is_admin() ) // Load admin.php if on admin area require_once( 'includes/admin.php' ); if ( true === (bool) nicer_permalinks_enabled() ) { // Load plugin core if plugin is enabled require_once( 'includes/nicer-filters.php' ); // Add plugin filters add_filter( 'get_forum_link', 'get_forum_link_nicer_filter', 10, 2 ); add_filter( 'bb_get_forum_bread_crumb', 'bb_get_forum_bread_crumb_nicer_filter', 10, 2 ); add_filter( 'get_topic_link', 'get_topic_link_nicer_filter', 10, 2 ); add_filter( 'get_post_link', 'get_post_link_nicer_filter', 10, 3 ); } // Call uninstaller on plugin deactivation bb_register_plugin_deactivation_hook( __FILE__, 'nicer_permalinks_uninstall' ); /** * Functions */ /** * Check if plugin is enabled * * @uses bb_get_option() * * @return boolean */ function nicer_permalinks_enabled() { return (bool) bb_get_option( 'nicer_permalinks_enabled' ); }