This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($, window, document) { | |
var CblocksPlugin = function() { | |
window.YoastSEO.app.registerPlugin( 'CblocksPlugin', { status: 'loading' } ); | |
this.getData(); | |
}; | |
CblocksPlugin.prototype.getData = function() { | |
var _self = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$path_to_xmls = 'updated/problem-updated/*.{wxr,xml}'; | |
$files = glob( $path_to_xmls, GLOB_BRACE ); | |
foreach ( $files as $file ) { | |
echo "{$file} \n"; | |
$path_to_file = $file; | |
$file_contents = file_get_contents( $path_to_file ); | |
$file_contents = preg_replace( '/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', '', $file_contents ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function is_text_col( $type ) { | |
foreach ( array( 'text', 'varchar' ) as $token ) { | |
if ( false !== strpos( $type, $token ) ) | |
return true; | |
} | |
return false; | |
} |