{"id":27049,"date":"2014-01-03T20:46:36","date_gmt":"2014-01-03T20:46:36","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-ragadjust\/"},"modified":"2014-09-04T17:01:10","modified_gmt":"2014-09-04T17:01:10","slug":"wp-ragadjust","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/wp-ragadjust\/","author":3855071,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"4.0.38","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"WP ragadjust","header_author":"jameskoster","header_description":"","assets_banners_color":"5f5f5f","last_updated":"2014-09-04 17:01:10","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/jameskoster.co.uk\/tag\/wp-ragadjust\/","header_author_uri":"http:\/\/jameskoster.co.uk","rating":5,"author_block_rating":0,"active_installs":20,"downloads":2914,"num_ratings":5,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"5"},"assets_icons":[],"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":"832463","resolution":"1544x500","location":"assets"},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"832463","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"832466","resolution":"1","location":"assets"}},"screenshots":{"1":"Before \/ After ragadjust."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[29738,70447,70446,5126],"plugin_category":[43],"plugin_contributors":[77603],"plugin_business_model":[],"class_list":["post-27049","plugin","type-plugin","status-publish","hentry","plugin_tags-hyphenation","plugin_tags-preposition","plugin_tags-rag","plugin_tags-typography","plugin_category-customization","plugin_contributors-jameskoster","plugin_committers-jameskoster"],"banners":{"banner":"https:\/\/ps.w.org\/wp-ragadjust\/assets\/banner-772x250.jpg?rev=832463","banner_2x":"https:\/\/ps.w.org\/wp-ragadjust\/assets\/banner-1544x500.jpg?rev=832463","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-ragadjust_5f5f5f.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-ragadjust\/assets\/screenshot-1.png?rev=832466","caption":"Before \/ After ragadjust."}],"raw_content":"<!--section=description-->\n<p>WP ragadjust is an extremely simple plugin that includes ragadjust.js on your web pages. Ragadjust.js is a script written by @nathanford and envisaged by @markboulton which resolves several typographical violations relating to the rag that are common on the web:<\/p>\n\n<ul>\n<li>Line breaks immediately following a preposition<\/li>\n<li>Line breaks immediately following a dash<\/li>\n<li>Small words at the end of a line<\/li>\n<li>Consecutive hyphenation<\/li>\n<li>(Line) broken, short emphasised phrases<\/li>\n<\/ul>\n\n<p>Solving these issues improves the overall readability of your content.<\/p>\n\n<p><a href=\"http:\/\/24ways.org\/2013\/run-ragged\/\">Read the article behind the idea<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>wp-ragadjust<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Done!<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Which elements are _ragadjust_ed by default?<\/dt>\n<dd><p>By default ragajust is applied to <code>p<\/code> tags.<\/p><\/dd>\n<dt>Can I change which elemnts are adjusted?<\/dt>\n<dd><p>Yes, you can use the <code>wpr_elements<\/code> filter to make adjustments to the selectors.<\/p>\n\n<p>To add a new selector:<\/p>\n\n<pre><code>add_filter( 'wpr_elements', 'wpr_new_selectors' );\nfunction wpr_new_selectors( $elements ) {\n    $elements[] .= '.textwidget'; \/\/ Adjust text widgets in addition to p\n    return $elements;\n}\n<\/code><\/pre>\n\n<p>To remove a current selector:<\/p>\n\n<pre><code>add_filter( 'wpr_elements', 'wpr_remove_elements' );\nfunction wpr_remove_elements( $elements ) {\n    unset( $elements['0'] ); \/\/ Unset 'p'.\n    return $elements;\n}\n<\/code><\/pre>\n\n<p>To use your own, entirely unique selectors:<\/p>\n\n<pre><code>add_filter( 'wpr_elements', 'wpr_custom_elements' );\nfunction wpr_custom_elements( $elements ) {\n    $elements = array(\n            'article',\n            'footer',\n        );\n    return $elements;\n}\n<\/code><\/pre>\n\n<p>These snippets should go in your <a href=\"http:\/\/codex.wordpress.org\/Child_Themes\">child themes<\/a> functions.php file.<\/p><\/dd>\n<dt>Can I change the method used?<\/dt>\n<dd><p>Yes. By default all methods will be used to fix all violations. If however you only want to fix prepositions and ignore everything else you can do so via the <code>wpr_method<\/code> filter like so:<\/p>\n\n<pre><code>add_filter( 'wpr_method', 'wpr_custom_method' );\nfunction wpr_custom_method( $method ) {\n    $method = 'prepositions';\n    return $method;\n}\n<\/code><\/pre>\n\n<p>The method options are:<\/p>\n\n<ul>\n<li><em>emphasis<\/em> \u2013 Text of three or less words in bold or italics does not break across lines.<\/li>\n<li><em>small-words<\/em> \u2013 Breaks lines before words of three or less characters.<\/li>\n<li><em>prepositions<\/em> \u2013 Breaks lines before prepositions.<\/li>\n<li><em>dashes<\/em> \u2013 Breaks lines before hyphens and dashes.<\/li>\n<li><em>all<\/em> (default) - All of the above.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<p>Initial release.<\/p>","raw_excerpt":"Includes ragadjust.js to add subtle improvements to your typography.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/27049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=27049"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jameskoster"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=27049"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=27049"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=27049"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=27049"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=27049"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=27049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}