michenusweb
Forum Replies Created
-
This plugin edit and remove lines in
# BEGIN WordPress
this – remove all lines
# END WordPressI can try to record a video, as evidence. The code above is from version 4.1.1 (3 weeks ago), the module downloaded from https://ww.wp.xz.cn/plugins/all-in-one-seo-pack/
If the free version is causing problems, it’s scary to imagine what the paid version does.Ups.
Is plugin deleted all data from the file robots.txt.
Indeed, the module earned zero points.And settings line: ‘htaccessEditor’=> true,
ok, download the plugin, look for “htaccess” in all files of the module (free). Finding 147 results.
Including class code
<?php
namespace AIOSEO\Plugin\Common\Tools;// Exit if accessed directly.
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}class Htaccess {
/**
* The path to the .htaccess file.
*
* @since 4.0.0
*
* @var string
*/
private $path = ”;/**
* Class constructor.
*
* @since 4.0.0
*/
public function __construct() {
$this->path = ABSPATH . ‘.htaccess’;
}/**
* Get the contents of the .htaccess file.
*
* @since 4.0.0
*
* @return string The contents of the file.
*/
public function getContents() {
$wpfs = aioseo()->helpers->wpfs();
if ( ! @$wpfs->exists( $this->path ) ) {
return false;
}return @$wpfs->get_contents( $this->path );
}/**
* Saves the contents of the .htaccess file.
*
* @since 4.0.0
*
* @param string $contents The contents to write.
* @return boolean True if the file was updated.
*/
public function saveContents( $contents ) {
$wpfs = aioseo()->helpers->wpfs();
$fileExists = @$wpfs->exists( $this->path );
if ( ! $fileExists || @$wpfs->is_writable( $this->path ) ) {
$success = @$wpfs->put_contents( $this->path, $contents );
if ( false === $success ) {
return false;
}return true;
}return false;
}
}`