Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Wilco

    (@wilcodeveloper)

    Installing a plugin to fix the core seems wrong to me

    Thread Starter Wilco

    (@wilcodeveloper)

    I will try to re-enqueueu it on ajax.

    Let me explain what i’m trying to achieve here:
    I have a coupon/discount form on the same page as the paytium button.
    This coupon gets checked with ajax > php and if its correct I update a custom field with the new price. If its correct I also want to make an ajax call to refresh the paytium button to give the new price.

    Everything works fine and the price gets updated. Except when I refresh the paytium button.

    Wilco

    (@wilcodeveloper)

    Try to put this in your functions.php
    define('WP_SCSS_ALWAYS_RECOMPILE', true);

    Wilco

    (@wilcodeveloper)

    The scss and css location should be paths to a folder. the plugin will create the css files for you.

    so you probably want to create a folder called “css” in your theme and put the following as CSS Location: “/css/”

    Good luck

    Thread Starter Wilco

    (@wilcodeveloper)

    Thank you for your reply!

    Oh, that’s a shame.
    I’ll think of something else then.

    Wilco

    Forum: Plugins
    In reply to: [Flamingo] Rename Menu item
    Wilco

    (@wilcodeveloper)

    I found a solution for this problem.
    You can put this function in your functions.php

    if (!function_exists('debug_admin_menus')):
    function debug_admin_menus() {
        global $submenu, $menu, $pagenow;
        if ( current_user_can('manage_options') ) { // ONLY DO THIS FOR ADMIN
            if( $pagenow == 'index.php' ) {  // PRINTS ON DASHBOARD
                echo '<pre>'; print_r( $menu ); echo '</pre>'; // TOP LEVEL MENUS
                echo '<pre>'; print_r( $submenu ); echo '</pre>'; // SUBMENUS
            }
        }
    }
    add_action( 'admin_notices', 'debug_admin_menus' );
    endif;

    This displays the complete wordpress admin menu on your dashboard for admin only.
    You scroll down in this list (which looks like this https://postimg.org/image/az7bpv8mh/)
    until you see Flamingo. in my case its number 26.
    you head back to functions.php and paste this function:

    function menu_page_removal() {
    
        global $menu;
    
        // Rename flamingo into Submissions
        $menu[26][0] = __('Submissions','textdomain');
    
    }
    add_action( 'admin_menu', 'menu_page_removal' , 999);

    Save your functions and take a look in your dashboard.
    Flamingo should be renamed to Submissions.

    If everything works correct you can remove the first function debug_admin_menus , since its only for debugging.
    This works for most other menu items as well

    Good luck

    • This reply was modified 7 years, 10 months ago by Wilco.
    Wilco

    (@wilcodeveloper)

    I have the same question.

Viewing 7 replies - 1 through 7 (of 7 total)