Answers for "wordpress plugin public page"

PHP
0

wordpress plugin public page

public function mypage_rewrite_ext() {
    global $wp_rewrite;
    $plugin_url = plugins_url( 'mypage.php', __FILE__ );
    $plugin_url = substr( $plugin_url, strlen( home_url() ) + 1 );
    // The pattern is prefixed with '^'
    // The substitution is prefixed with the "home root", at least a '/'
    // This is equivalent to appending it to `non_wp_rules`
    $wp_rewrite->add_external_rule( 'mypage$', $plugin_url );
}
Posted by: Guest on August-29-2020

Code answers related to "wordpress plugin public page"

Browse Popular Code Answers by Language