Receive “menu-toogle” event from section menu in customizer

So far the only solution I’ve come up with is creating a function that postMessages the event into the iframe (using customize_controls_enqueue_scripts hook). As for the receiver in iframe (hooked on customize_preview_init hook) I think it could still need some optimization because I’m getting a weird issue with window.addEventListener(‘message’,* getting some duplicate on customizer loading.. … Read more

Quotes not rendering properly in WooCommerce settings API [closed]

You’re creating a string representation of an array, when you need an actual array! $blogusers = get_users(); $options = array(); foreach ( $blogusers as $user ) { $options[ $user->user_email ] = $user->user_email; // No need to pass through __(), don’t translate emails! } And then pass it to your options argument: $this->form_fields = array( ‘sec_r2_mail’ … Read more

settings api callback functions won’t display?

That’s because you need to print your settings fields in Kaipo_menu_callback, something like: <?php function Kaipo_menu_callback() { ?> <div class=”wrap”> <h2>Kaipo</h2> <form action=”options.php” method=”post”><?php do_settings_sections( ‘kaipo_menu_page’ ); settings_fields( ‘kaipo_menu_page’ ); submit_button(); ?></form> </div> <?php } I would strongly suggest reading the settings API in detail.

From my Plugin Settings Page use check boxes to load specific css files (e.g. Bootstrap / Foundation)

You will have to create a settings page on which you will have to register your settings. Unfortunately this is no easy task, but it has been very well documented on tutsplus. Once you have implemented the settings api, you can check for the options that have been set with your settings page. Depending on … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)