AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Is it safe to use WPFORO_THEME_DIR constant?

2 Posts
2 Users
0 Reactions
1,048 Views
Posts: 8
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@docdunning)
Active Member
Joined: 2 years ago
[#56485]

I'd like to use the WPFORO_THEME_DIR constant, because it is already set up with the path to the plugin's theme directory. 

I'm putting some code in the wpforo directory in my own theme, to override / customise a template or two.  I mentioned this in another post.  It enables me to add a bit of code that switches "guest" users to the login page so that they see nothing of the forum.

Now I'd like to use PHP "include" to use one of the plugin's theme files.  The WPFORO_THEME_DIR constant will be useful ... but is it safe to use?  I don't want to risk it disappearing in some future release.


1 Reply
Sofy
Posts: 5777
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi,

First of all, please note that we don't recommend changing the files within the wpForo folder directly. It's preferable to utilize update-safe methods for customization. For detailed instructions on how to customize wpForo themes in an update-safe manner, please refer to this documentation: https://wpforo.com/docs/wpforo-v2/forum-themes/theme-customization/

Additionally, we recommend you reading this document: https://wpforo.com/docs/wpforo-v2/forum-themes/theme-files/  

Regarding the WPFORO_THEME_DIR constant, while it can be used, we recommend exploring alternative methods for customization.


Reply
Share: