Wordpress plugins
wpuntexturize

wpuntexturize

Version : 1.6.1
Tested up to : 4.7.6
Number of download : 6144
Author : Scott Reilly
Average rating : 5 / 5 on 4 votes 4 votes, 5 avg.rating

Screenshots

wpuntexturize
wpuntexturize
wpuntexturize
wpuntexturize

By default, WordPress converts single and double quotation marks into their curly alternatives. This plugin prevents that from happening, so you can enjoy your quotation marks in their non-curly glory. Note: Despite the unfortunately misleading name, this plugin is NOT the antithesis of WordPress’s wptexturize() function. This ONLY prevents WordPress from making HTML entity code substitutions of single and double quotation marks with their curly alternatives and does NOT prevent wptexturize() from making any other character and string substitutions. See the FAQ for details on the filters processed by the plugin. Links: Plugin Homepage | Plugin Directory Page | Author Homepage Filters The plugin is further customizable via three hooks. Typically, these customizations would be put into your active theme’s functions.php file, or used by another plugin. c2c_wpuntexturize (filter) The ‘c2c_wpuntexturize’ filter allows you to use an alternative approach to safely invoke c2c_wpuntexturize() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site. This only applies if you use the function directly, which is not typical usage for most users. Arguments: none Example: Instead of: <?php echo c2c_wpuntexturize( $mytext ); ?> Do: <?php echo apply_filters( 'c2c_wpuntexturize', $mytext ); ?> wpuntexturize_filters (filter) The ‘wpuntexturize_filters’ filter allows you to customize what filters to hook to be filtered with wpuntexturize. See the Description section for a complete list of all filters that are filtered by default. Arguments: array $filters : the default array of filters Example: /** * Add additional filters to get wpuntexturize'd. * * @param array $filters Filters that will receive the wpuntexturize treatement. * @return array */ function more_wpuntexturize_filters( $filters ) { $filters[] = 'event_description'; return $filters; } add_filter( 'wpuntexturize_filters', 'more_wpuntexturize_filters' ); c2c_wpuntexturize_replacements (filter) The ‘c2c_wpuntexturize_replacements’ filter allows you to customize the character replacements handled by the plugin. Arguments: array $replacements : Array where the keys are the characters to be replace, and the values are their respective replacements. Example: /** * Add and remove to/from default wpuntexturize replacements. * * @param array $replacements * @return array */ function c2c_change_wpuntexturize_replacements( $replacements ) { // Remove low 9 quotation mark replacements. unset( $replacements['‚'] ); unset( $replacements['„'] ); // Replace copyright. $replacements['&copy;'] = '(c)'; return $replacements; } add_filter( 'c2c_wpuntexturize_replacements', 'c2c_change_wpuntexturize_replacements' );

Download now