#34208 closed defect (bug) (invalid)
is_rtl() does not work in Plugin with own Themes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3.1 |
Component: | Plugins | Keywords: | |
Focuses: | rtl | Cc: |
Description
RTL support in themes is achieved through the creation of an rtl.css file, which is loaded (if it exists) in the wp-includes/theme.php change "if ( is_rtl() )" to "if ( function_exists( 'is_rtl' ) && is_rtl() )".
Thank you.
Change History (11)
#2
in reply to:
↑ 1
@
10 years ago
Replying to mark-k:
@AppFIX-DE, Why is it needed? is_rtl is part of core code and should always be there when theme and plugin code is being executed..
yes is_rtl is part of core but we have use different theme for mobile and at here is_rtl function is not found in theme because its declared at wp-includes/locale.php and we couldn't include at our plugin
#3
follow-up:
↓ 4
@
10 years ago
- Keywords reporter-feedback added
Why is is_rtl()
not available in your mobile theme? Can you provide some code to reproduce the issue?
#4
in reply to:
↑ 3
;
follow-up:
↓ 6
@
10 years ago
Replying to ocean90:
Why is
is_rtl()
not available in your mobile theme? Can you provide some code to reproduce the issue?
Can you give mehr your email, then i can send you the plugin for the sample code. Then maybe you see the problem.
#5
@
10 years ago
@ocean90
@mark-k
In this Plugin you can use two themes at the same time. If you put domain.de it show Theme A and if you put domain.de/?system=app it show Theme B. And if i install the Plugin the Plugin is working but he can't find the function is_rtl() and i get a white screen in the backend.
If i change the wp-includes/theme.php "if ( is_rtl() )" to "if ( function_exists( 'is_rtl' ) && is_rtl() )" it's work.
I think it's a Bug from Wordpress side.
#6
in reply to:
↑ 4
;
follow-up:
↓ 7
@
10 years ago
Replying to AppFIX-DE:
Can you give mehr your email, then i can send you the plugin for the sample code. Then maybe you see the problem.
dominikschilling at gmail dot com.
#8
follow-up:
↓ 9
@
10 years ago
- Keywords reporter-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
@AppFIX-DE: Please add add_editor_style()
into a callback for the after_setup_theme
hook.
function trac34208_after_setup_theme() { add_editor_style(); } add_action( 'after_setup_theme', 'trac34208_after_setup_theme' );
#9
in reply to:
↑ 8
@
10 years ago
Replying to ocean90:
@AppFIX-DE: Please add
add_editor_style()
into a callback for theafter_setup_theme
hook.
function trac34208_after_setup_theme() { add_editor_style(); } add_action( 'after_setup_theme', 'trac34208_after_setup_theme' );
Thanks for your help. I will check it.
#11
@
10 years ago
Please move this discussion to the support forums. Thanks!
@AppFIX-DE, Why is it needed? is_rtl is part of core code and should always be there when theme and plugin code is being executed..