{"id":239289,"date":"2025-07-12T06:37:55","date_gmt":"2025-07-12T06:37:55","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/smart-rtl-post\/"},"modified":"2026-04-09T13:59:14","modified_gmt":"2026-04-09T13:59:14","slug":"smart-rtl-post","status":"publish","type":"plugin","link":"https:\/\/pap-aw.wordpress.org\/plugins\/smart-rtl-post\/","author":23316748,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.5.1","stable_tag":"1.5.1","tested":"7.0","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"Smart RTL Post","header_author":"Luqman Safay","header_description":"Change your post layout direction to right-to-left for languages like Pashto, Arabic, and Urdu \u2014 with just one click.","assets_banners_color":"f3f8fa","last_updated":"2026-04-09 13:59:14","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/poetrypashto.com\/smart-rtl-post\/","header_author_uri":"https:\/\/profiles.wordpress.org\/luqmansafay\/","rating":5,"author_block_rating":0,"active_installs":20,"downloads":553,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"luqmansafay","date":"2025-09-11 13:12:44"},"1.5.1":{"tag":"1.5.1","author":"luqmansafay","date":"2026-04-09 13:59:14"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3362410,"resolution":"128x128","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3502499,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.5.1"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Block Editor sidebar panel showing LTR \/ RTL options.","2":"Classic Editor meta box showing LTR \/ RTL options.","3":"Settings page with font, font size, and line-height options."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1113,48079,10370,5811,36466],"plugin_category":[],"plugin_contributors":[244850],"plugin_business_model":[],"class_list":["post-239289","plugin","type-plugin","status-publish","hentry","plugin_tags-arabic","plugin_tags-pashto","plugin_tags-right-to-left","plugin_tags-rtl","plugin_tags-urdu","plugin_contributors-luqmansafay","plugin_committers-luqmansafay"],"banners":{"banner":"https:\/\/ps.w.org\/smart-rtl-post\/assets\/banner-772x250.png?rev=3502499","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/smart-rtl-post\/assets\/icon-128x128.png?rev=3362410","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Smart RTL Post allows you to easily apply RTL styling to selected posts, pages, and custom post types.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Enable RTL per post<\/li>\n<li>Gutenberg editor support<\/li>\n<li>Custom post types support<\/li>\n<li>Lightweight plugin<\/li>\n<li>Clean uninstall<\/li>\n<li>No performance impact<\/li>\n<li><p>Custom fonts support<\/p><\/li>\n<li><p>Works on Posts and Pages (and any post type via filter hook)<\/p><\/li>\n<li>Native Block Editor (Gutenberg) sidebar panel \u2014 no Classic Editor required<\/li>\n<li>Settings page to choose default direction, font, font size, and line height<\/li>\n<li>Shortcode <code>[rtl]your text[\/rtl]<\/code> for inline RTL content inside any post<\/li>\n<li>Google Fonts support: Noto Nastaliq Urdu, Scheherazade New, Amiri, Lateef<\/li>\n<li>CSS only loaded when actually needed (performance friendly)<\/li>\n<li>RTL styles scoped to content area only \u2014 navigation and header stay unaffected<\/li>\n<li>Developer-friendly: <code>smart_rtl_supported_post_types<\/code> filter to add custom post types<\/li>\n<li>Clean uninstall \u2014 removes all options and post meta when deleted<\/li>\n<\/ul>\n\n<h4>Shortcode Usage<\/h4>\n\n<p>Use inside any post or page:\n    [rtl]Your text here[\/rtl]<\/p>\n\n<h4>Add Custom Post Type Support<\/h4>\n\n<p>Add this to your theme's functions.php:<\/p>\n\n<pre><code>add_filter( 'smart_rtl_supported_post_types', function( $types ) {\n    $types[] = 'product';\n    return $types;\n} );\n<\/code><\/pre>\n\n<p>`<\/p>\n\n<h3>License<\/h3>\n\n<p>This program is free software; you can redistribute it and\/or modify it under the terms of the GNU General Public License version 2 or later.\nFor more details, visit: https:\/\/www.gnu.org\/licenses\/gpl-2.0.html<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>smart-rtl-post<\/code> folder to <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Activate the plugin from the <strong>Plugins<\/strong> page in WordPress<\/li>\n<li>Go to <strong>Settings &gt; Smart RTL Post<\/strong> to configure defaults<\/li>\n<li>Edit any post or page and select the direction from the sidebar<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20work%20with%20the%20block%20editor%20%28gutenberg%29%3F\"><h3>Does this work with the Block Editor (Gutenberg)?<\/h3><\/dt>\n<dd><p>Yes. A native sidebar panel appears in the Document Settings for both Classic Editor and Block Editor.<\/p><\/dd>\n<dt id=\"can%20i%20use%20it%20on%20woocommerce%20product%20pages%3F\"><h3>Can I use it on WooCommerce product pages?<\/h3><\/dt>\n<dd><p>Not by default, but you can easily add any custom post type using the <code>smart_rtl_supported_post_types<\/code> filter (see Description).<\/p><\/dd>\n<dt id=\"will%20this%20slow%20down%20my%20site%3F\"><h3>Will this slow down my site?<\/h3><\/dt>\n<dd><p>No. The CSS file is only loaded on pages where RTL direction is actually enabled.<\/p><\/dd>\n<dt id=\"which%20fonts%20are%20available%3F\"><h3>Which fonts are available?<\/h3><\/dt>\n<dd><p>Noto Nastaliq Urdu, Scheherazade New, Amiri, Lateef, and a System Serif (no Google Fonts) option.<\/p><\/dd>\n<dt id=\"does%20changing%20direction%20break%20my%20site%20navigation%3F\"><h3>Does changing direction break my site navigation?<\/h3><\/dt>\n<dd><p>No. Since v1.3.0 the RTL direction is scoped to post content areas only. Your header, navigation menus, and footer are not affected.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens when I delete the plugin?<\/h3><\/dt>\n<dd><p>All options and post meta are automatically removed from the database.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.5.1<\/h4>\n\n<ul>\n<li>Fixed: CSS inline values (font_size, line_height) explicitly re-sanitized before injection \u2014 absint() and range clamp added<\/li>\n<li>Fixed: WordPress.org submission zip now uses correct folder name 'smart-rtl-post' (no version suffix)<\/li>\n<li>Confirmed: WP_UNINSTALL_PLUGIN check present in uninstall.php<\/li>\n<li>Confirmed: Plugin slug, Text Domain, and load_plugin_textdomain are all 'smart-rtl-post' \u2014 consistent<\/li>\n<li>Confirmed: No raw variable outputs \u2014 all echo uses esc_html\/esc_attr\/esc_url\/wp_kses_post<\/li>\n<\/ul>\n\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>Added: register_activation_hook \u2014 sets default options on clean install using add_option() with autoload=no<\/li>\n<li>Added: autoload=false on all register_setting() calls (WP 6.0+) \u2014 prevents options loading on every page, improves performance<\/li>\n<li>Added: readme.txt tags now include 'direction' and 'gutenberg' for better WordPress.org search visibility<\/li>\n<li>Confirmed: WP_UNINSTALL_PLUGIN security check already present in uninstall.php<\/li>\n<li>Confirmed: CSS loads conditionally \u2014 only on RTL posts or when [rtl] shortcode detected<\/li>\n<\/ul>\n\n<h4>1.4.2<\/h4>\n\n<ul>\n<li>Fixed: transition_post_status condition tightened \u2014 now only fires when status changes exactly TO publish FROM non-publish (avoids publish\u2192draft, publish\u2192trash edge cases)<\/li>\n<li>Fixed: Multisite uninstall now uses batch processing (100 sites per loop) \u2014 prevents server hang on large networks<\/li>\n<li>Fixed: Added wp-block-code to CSS RTL selectors<\/li>\n<li>Fixed: Version bumped in rtl-style.css, block-editor.js, and SMART_RTL_VERSION constant \u2014 all in sync<\/li>\n<li>Fixed: .pot file updated to version 1.4.2; all 20 strings verified with correct text-domain<\/li>\n<li>Fixed: readme.txt Stable tag matches plugin Version header \u2014 WordPress.org consistency<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Fixed: Version comments in rtl-style.css and block-editor.js updated to 1.4.1<\/li>\n<li>Fixed: wp_insert_post replaced with transition_post_status hook \u2014 default direction now only saves on actual publish\/schedule, not on every draft save<\/li>\n<li>Fixed: Multisite support added to uninstall.php \u2014 all sub-sites cleaned up on network delete<\/li>\n<li>Fixed: Added missing Gutenberg block selectors: wp-block-table, wp-block-group, wp-block-columns, wp-block-column, wp-block-cover, wp-block-media-text<\/li>\n<li>Added: languages\/smart-rtl-post.pot translation template file for Urdu\/Pashto\/Arabic translators<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Fixed: Default direction now saved to database on first publish (was only shown in UI before)<\/li>\n<li>Fixed: Gutenberg detection now uses reliable use_block_editor_for_post_type() instead of get_current_screen()<\/li>\n<li>Fixed: line-height setting was registered but never actually applied \u2014 now works correctly<\/li>\n<li>Fixed: Shortcode CSS now loads even in LTR posts (has_shortcode() detection added)<\/li>\n<li>Fixed: Google Fonts now properly enqueued via wp_enqueue_style (font was named but never loaded)<\/li>\n<li>Fixed: Shortcode [rtl] inline styles replaced with CSS class for better SEO and performance<\/li>\n<li>Fixed: .smart-rtl-inline now inherits font-family, font-size, line-height from settings<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Improved <code>get_current_screen()<\/code> safety check to prevent rare admin errors<\/li>\n<li>Improved <code>auth_callback<\/code> to use post-specific <code>edit_post<\/code> capability (WordPress review standard)<\/li>\n<li>Added <code>wp_style_is()<\/code> check before <code>wp_add_inline_style()<\/code> for safer CSS injection<\/li>\n<li>Added explicit <code>load_plugin_textdomain()<\/code> for non-WordPress.org distributions<\/li>\n<li>Added Settings link in Plugins list page for easier access<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Added native Block Editor (Gutenberg) sidebar panel via <code>PluginDocumentSettingPanel<\/code><\/li>\n<li>Added Font Size setting (14 \u2013 32px, default 18px) \u2014 useful for Urdu\/Pashto readability<\/li>\n<li>Fixed shortcode: now uses saved font setting instead of hardcoded font families<\/li>\n<li>Fixed CSS scope: RTL direction no longer applied to full body (navigation\/header unaffected)<\/li>\n<li>Added <code>uninstall.php<\/code> \u2014 cleans up all options and post meta on plugin deletion<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Added support for Pages (not just Posts)<\/li>\n<li>Added Settings page (default direction, font chooser, line height)<\/li>\n<li>Added <code>[rtl]...[\/rtl]<\/code> shortcode for inline RTL text<\/li>\n<li>CSS now loads conditionally \u2014 only on RTL pages<\/li>\n<li>Google Fonts support (Noto Nastaliq Urdu, Scheherazade New, Amiri, Lateef)<\/li>\n<li>Improved CSS to target common block editor content wrappers<\/li>\n<li>Added <code>smart_rtl_supported_post_types<\/code> filter for developers<\/li>\n<li>Added <code>Requires PHP: 7.4<\/code> header<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Apply RTL styling to selected posts, pages, and custom post types with Gutenberg support.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/239289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=239289"}],"author":[{"embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/luqmansafay"}],"wp:attachment":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=239289"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=239289"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=239289"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=239289"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=239289"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=239289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}