How to disable WordPress Redux Framework – wf-loading – preloader (Solved)

Merhaba Arkadaşlar,

Bir müşterimin sitesinde yaşadığım preloader (page loader) problemi hakkında paylaşım yapmak istedim. Gün gelir belki sizinde başınıza gelebilir. Sayfa yüklendikten sonra tekrar wf-loading devreye giriyordu ve sayfa beyaz olup, tekrar açılıyordu. İlgili preloader seçeneği maalesef tema paneline eklenmemiş. Tema paneli Redux Framework olarak hazırlanmış.

Lafı fazla uzatmadan çözüm için:

/public_html/wp-content/plugins/redux-framework/ReduxCore/inc/fields/typography/field_typography.php

Satır: 746

if ( ! empty( $style ) ) {
if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
$keys = implode( ",", $this->field['output'] );
$this->parent->outputCSS .= $keys . "{" . $style . '}';

if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['output'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->outputCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->outputCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}

if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
$keys = implode( ",", $this->field['compiler'] );
$this->parent->compilerCSS .= $keys . "{" . $style . '}';
if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['compiler'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->compilerCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->compilerCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}
}

 

Alanını aşağıda ki ile değiştiriyoruz:

/* if ( ! empty( $style ) ) {
if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
$keys = implode( ",", $this->field['output'] );
$this->parent->outputCSS .= $keys . "{" . $style . '}';

if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['output'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->outputCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->outputCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}

if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
$keys = implode( ",", $this->field['compiler'] );
$this->parent->compilerCSS .= $keys . "{" . $style . '}';
if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['compiler'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->compilerCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->compilerCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}
}*/

 

 

Hi, how to disable wordress redux framework preloader:

Please open file:

/public_html/wp-content/plugins/redux-framework/ReduxCore/inc/fields/typography/field_typography.php

line: 746 find codes:

if ( ! empty( $style ) ) {
if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
$keys = implode( ",", $this->field['output'] );
$this->parent->outputCSS .= $keys . "{" . $style . '}';

if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['output'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->outputCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->outputCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}

if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
$keys = implode( ",", $this->field['compiler'] );
$this->parent->compilerCSS .= $keys . "{" . $style . '}';
if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['compiler'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->compilerCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->compilerCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}
}

 

and replace:

/* if ( ! empty( $style ) ) {
if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
$keys = implode( ",", $this->field['output'] );
$this->parent->outputCSS .= $keys . "{" . $style . '}';

if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['output'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->outputCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->outputCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}

if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
$keys = implode( ",", $this->field['compiler'] );
$this->parent->compilerCSS .= $keys . "{" . $style . '}';
if ( isset( $this->parent->args['async_typography'] ) && $this->parent->args['async_typography'] ) {
$key_string = "";
$key_string_ie = "";

foreach ( $this->field['compiler'] as $value ) {
if (strpos($value,',') !== false) {
$arr = explode(',', $value);

foreach ($arr as $subvalue) {
$key_string .= ".wf-loading " . $subvalue . ',';
$key_string_ie .= ".ie.wf-loading " . $subvalue . ',';
}
} else {
$key_string .= ".wf-loading " . $value . ',';
$key_string_ie .= ".ie.wf-loading " . $value . ',';
}
}

$this->parent->compilerCSS .= rtrim( $key_string, ',' ) . "{opacity: 0;}";
$this->parent->compilerCSS .= rtrim( $key_string_ie, ',' ) . "{visibility: hidden;}";
}
}
}*/

 

Bir cevap yazın

E-posta hesabınız yayımlanmayacak.

Bu site reCAPTCHA ve Google tarafından korunmaktadır Gizlilik Politikası ve Kullanım Şartları uygula.

The reCAPTCHA verification period has expired. Please reload the page.