generated from maldersIO-LLC/Plugin-Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnon-breaking-space-fix.php
53 lines (47 loc) · 1.78 KB
/
non-breaking-space-fix.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Plugin Name: NSBP Fix
* Plugin URI: https://github.com/FreshyMichael/non-breaking-space-fix
* Description: Fixes the random non breaking spaces conflict by replacing them with a single space.
* Version: 1.0.0
* Author: FreshySites
* Author URI: https://freshysites.com/
* License: GNU v3.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die();
}
/* PluginName Start */
//______________________________________________________________________________
function fs_replace_content($content) {
$content = htmlentities($content, null, 'utf-8');
$content = str_replace(" ", " ", $content);
$content = html_entity_decode($content);
return $content;
}
add_filter('the_content','fs_replace_content', 999999999);
//______________________________________________________________________________
// All About Updates
// Begin Version Control | Auto Update Checker
require 'plugin-update-checker/plugin-update-checker.php';
$myUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
// ***IMPORTANT*** Update this path to New Github Repository Master Branch Path
'https://github.com/FreshyMichael/non-breaking-space-fix',
__FILE__,
// ***IMPORTANT*** Update this to New Repository Master Branch Path
'non-breaking-space-fix'
);
//Enable Releases
$myUpdateChecker->getVcsApi()->enableReleaseAssets();
//Optional: If you're using a private repository, specify the access token like this:
//
//
//Future Update Note: Comment in these sections and add token and branch information once private git established
//
//
//$myUpdateChecker->setAuthentication('your-token-here');
//Optional: Set the branch that contains the stable release.
//$myUpdateChecker->setBranch('stable-branch-name');
//______________________________________________________________________________
/* PluginName End */
?>