Localise settings section headline

Localize the headings in your initial array: $sections = array( ‘notifcations’ => __( ‘Notifications’, ‘your_text_domain’ ), ‘updates’ => __( ‘Updates’, ‘your_text_domain’ ) ); foreach ($sections as $section => $header ) { add_settings_section( $section .’_section’, $header, array( $this, ‘disable_callback_warnings’ ), ‘sgnc’ ); }

Saving custom data via ajax with nonces

I don’t see any is_admin conditional statement which is why you should include it in your snippet so we can properly assess what you are attempting to do outside of the obvious question. Either way a nonce should be mandatory. That function that receives and processes your AJAX request/response should also verify your nonce to … Read more

How to enable WPML in BuddyPress Multilingual Plugin in a single website? [closed]

On BuddyPress Multilingual you can read: This plugin requires WPML. It uses WPML’s language API and hooks to BuddyPress to make it multilingual. You need to have WPML installed for BuddyPress Multilingual to function correctly. Also, Buddypress Multilingual is for Buddypress sites. If you want to make your WordPress site multilingual, my advice is to … Read more

Create a link which allows visitors to disable a plugin?

According to the code … // Embed Switch Links in Theme Via Shortcode // [show_theme_switch_link] function show_theme_switch_link_func( $atts ){ $desktopSwitchLink = get_option(‘show_switch_link_for_desktop’); global $shown_theme; global $status; if ($shown_theme){ $return = ‘<a rel=”external” data-ajax=”false” href=”‘.get_bloginfo(‘url’).’?am_force_theme_layout=desktop” class=”am-switch-btn godesktop”>’.get_option(‘desktop_view_theme_link_text’).'</a>’; } else { if ((!empty($status)) || ($desktopSwitchLink == ‘yes’)){ $return = ‘<a href=”‘.get_bloginfo(‘url’).’?am_force_theme_layout=mobile” class=”am-switch-btn gomobile”>’.get_option(‘mobile_view_theme_link_text’).'</a>’; } } return $return; … Read more