• Hello,

    This plugin don’t work on my WordPress 4.9.8 with PHP 7.2, I fix it by doing this on the file “baw-login-logout-menu/bawllm.php” :

    Because “create_function” is deprecated, I modified :

    add_action( ‘plugins_loaded’, create_function( ”, ‘
    $filename = “inc/”;
    $filename .= is_admin() ? “backend-” : “frontend-“;
    $filename .= defined( “DOING_AJAX” ) && DOING_AJAX ? “” : “no”;
    $filename .= “ajax.inc.php”;
    if( file_exists( plugin_dir_path( __FILE__ ) . $filename ) )
    include( plugin_dir_path( __FILE__ ) . $filename );
    $filename = “inc/”;
    $filename .= “bothend-“;
    $filename .= defined( “DOING_AJAX” ) && DOING_AJAX ? “” : “no”;
    $filename .= “ajax.inc.php”;
    if( file_exists( plugin_dir_path( __FILE__ ) . $filename ) )
    include( plugin_dir_path( __FILE__ ) . $filename );
    ‘ )
    );

    By :

    add_action( ‘plugins_loaded’, function() {
    $filename = “inc/”;
    $filename .= is_admin() ? “backend-” : “frontend-“;
    $filename .= defined( “DOING_AJAX” ) && DOING_AJAX ? “” : “no”;
    $filename .= “ajax.inc.php”;
    if( file_exists( plugin_dir_path( __FILE__ ) . $filename ) )
    include( plugin_dir_path( __FILE__ ) . $filename );
    $filename = “inc/”;
    $filename .= “bothend-“;
    $filename .= defined( “DOING_AJAX” ) && DOING_AJAX ? “” : “no”;
    $filename .= “ajax.inc.php”;
    if( file_exists( plugin_dir_path( __FILE__ ) . $filename ) )
    include( plugin_dir_path( __FILE__ ) . $filename );
    });

    <3 for you !

Viewing 1 replies (of 1 total)
  • Fantastic work @bligivi.

    wp-content/plugins/baw-login-logout-menu/bawllm.php

    <?php
    /*
    Plugin Name: BAW Login/Logout menu
    Plugin URI: https://www.boiteaweb.fr/?p=3337
    Description: You can now add a correct login & logout link in your WP menus.
    Author: Juliobox
    Author URI: https://wp-rocket.me
    Version: 1.3.3.1
    */
    
    define( 'BAWLLM_VERSION', '1.3.3' );
    
    add_action( 'plugins_loaded', function() {
    $filename = "inc/";
    $filename .= is_admin() ? "backend-" : "frontend-";
    $filename .= defined( "DOING_AJAX" ) && DOING_AJAX ? "" : "no";
    $filename .= "ajax.inc.php";
    if( file_exists( plugin_dir_path( __FILE__ ) . $filename ) )
    include( plugin_dir_path( __FILE__ ) . $filename );
    $filename = "inc/";
    $filename .= "bothend-";
    $filename .= defined( "DOING_AJAX" ) && DOING_AJAX ? "" : "no";
    $filename .= "ajax.inc.php";
    if( file_exists( plugin_dir_path( __FILE__ ) . $filename ) )
    include( plugin_dir_path( __FILE__ ) . $filename );
    });

    I just put the code in code tags to make it easier to copy.

    • This reply was modified 6 years, 1 month ago by a4jp.
Viewing 1 replies (of 1 total)
  • The topic ‘Correction for WordPress 4.9.X + PHP 7.X’ is closed to new replies.