Add to the plug-in the ability to change the template redirect.php
-
In the plugin there is a folder partial, in which the templates.
You can do this so that when copying this folder partial to the folder theme (wp-content/themes/mytheme) when you click on the link, a template is displayed that is in the theme, and not in the plugin, for example, like this
Now
public function show_redirect_page( $url ) {
header( ‘Content-type: text/html; charset=”utf-8″‘, true );
if ( ‘302’ === $this->options->masking_type && $url ) {
@header( ‘Location: ‘ . $url );
}
include_once ‘partials/redirect.php’;
}
Prescribe
public function show_redirect_page( $url ) {
header( ‘Content-type: text/html; charset=”utf-8″‘, true );
if ( ‘302’ === $this->options->masking_type && $url ) {
@header( ‘Location: ‘ . $url );
}
$filename = get_template_directory() . ‘/partials/redirect.php’;
if (file_exists($filename)) {
include_once get_template_directory() . ‘/partials/redirect.php’;}
else {
include_once ‘partials/redirect.php’;
}
}
- The topic ‘Add to the plug-in the ability to change the template redirect.php’ is closed to new replies.