<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									General question on hook triggers - General Discussions				            </title>
            <link>https://wpforo.com/community/general-discussions/general-question-on-hook-triggers/</link>
            <description>Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 15 Jul 2026 04:17:24 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: General question on hook triggers</title>
                        <link>https://wpforo.com/community/general-discussions/general-question-on-hook-triggers/#post-108404</link>
                        <pubDate>Wed, 07 Feb 2024 13:20:28 +0000</pubDate>
                        <description><![CDATA[Thanks @sofy and welcome back.]]></description>
                        <content:encoded><![CDATA[Thanks @sofy and welcome back.]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>fawp</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/general-question-on-hook-triggers/#post-108404</guid>
                    </item>
				                    <item>
                        <title>RE: General question on hook triggers</title>
                        <link>https://wpforo.com/community/general-discussions/general-question-on-hook-triggers/#post-108399</link>
                        <pubDate>Wed, 07 Feb 2024 10:36:41 +0000</pubDate>
                        <description><![CDATA[Yes, fawp, Everything is correct.]]></description>
                        <content:encoded><![CDATA[<p>Yes, fawp, Everything is correct. </p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>Sofy</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/general-question-on-hook-triggers/#post-108399</guid>
                    </item>
				                    <item>
                        <title>General question on hook triggers</title>
                        <link>https://wpforo.com/community/general-discussions/general-question-on-hook-triggers/#post-108383</link>
                        <pubDate>Tue, 06 Feb 2024 18:11:04 +0000</pubDate>
                        <description><![CDATA[I have some checks (e.g. in functions.php) to ensure that if a plugin (e.g. wpForo) is disabled, any custom code related to that plugin won&#039;t break the site.
In these cases a typical functi...]]></description>
                        <content:encoded><![CDATA[<p>I have some checks (e.g. in <em>functions.php</em>) to ensure that if a plugin (e.g. wpForo) is disabled, any custom code related to that plugin won't break the site.</p>
<p>In these cases a typical function will look like this (example with wpForo-related check):</p>
<pre contenteditable="false">function my_custom_wpforo_function() {
	if( function_exists('WPF') ) {
	    // do something
	}
}
add_action('my_hook', 'my_custom_wpforo_function');
</pre>
<p> </p>
<p>but there will be cases where the code in question is inside a specific wpForo event. For example, <em>wpforo_loop_hook</em> is triggered only inside a wpForo loop, so <span style="text-decoration: underline">if the plugin is disabled, this event should never be triggered.</span></p>
<p><strong>Am I right in thinking that in these types of events (that are only triggered if the plugin is active) I don't need to add a plugin check, and that I can simply leave the code as it is (example below) because it will never be executed if the plugin is disabled?</strong></p>
<pre contenteditable="false">function my_custom_wpforo_event_function(){
        // do something
}
add_action( 'wpforo_loop_hook', 'my_custom_wpforo_event_function' );</pre>
<p> </p>
<p>Thank you.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/general-discussions/">General Discussions</category>                        <dc:creator>fawp</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/general-discussions/general-question-on-hook-triggers/#post-108383</guid>
                    </item>
							        </channel>
        </rss>
		