All settings of my plugin disappear on its settings page

so I am currently working on building my first plugin. I followed a tutorial to make a settings tab in the woocommerce settings tabs.

It worked once, but when I saved a setting, all elements of the page disappear and all that’s left is the submit button and the woocommerce-tabs. The setting can be called with the get_option() function, but well, you can’t change it anymore as the page is blank.

Here is my code:

 class wc_send_and_save_tracking_code_options {      public static function init() {         add_filter( 'woocommerce_settings_tabs_array', __CLASS__ . '::add_settings_tab', 50 );         add_action( 'wc_send_and_save_tracking_code_tab', __CLASS__ . '::settings_tab' );         add_action( 'wc_send_and_save_tracking_code_update_', __CLASS__ . '::update_settings' );     }        public static function add_settings_tab( $  settings_tabs ) {         $  settings_tabs['wc-send-and-save-tracking-code'] = __( 'WC send tracking email', 'wc-send-and-save-tracking-code' );         return $  settings_tabs;     }        public static function settings_tab() {         woocommerce_admin_fields( self::get_settings() );     }        public static function update_settings() {         woocommerce_update_options( self::get_settings() );     }       public static function get_settings() {         $  settings = array(             'section_title' => array(                 'name'     => __( 'WooCommerce send and save tracking code - Settings', 'wc-send-tracking-code' ),                 'type'     => 'title',                 'desc'     => '',                 'id'       => 'wc_settings_tab_demo_section_title'             ),             'description' => array(                 'name' => __( 'Email text', 'wc-send-tracking-code' ),                 'type' => 'textarea',                 'desc' => __( 'Here you can modify the text of your email.', 'wc-send-tracking-code' ),                 'id'   => 'wc_send_and_save_tracking_code_emailtext'             ),             'section_end' => array(                  'type' => 'sectionend',                  'id' => 'wc_settings_tab_demo_section_end'             )         );         return $  settings;     }  }   wc_send_and_save_tracking_code_options::init(); 

I turned WP_DEBUG on, but nothing is logged.

Any help would be much appreciated.

do the WordPress SEO by Yoast Seo premium plugin for $4

Why Premium yoast SEO?Yoast SEO Premium is a paid version of Yoast SEO with added functionality and more options .Furthermore this feature alone saves a tremendous amount of time as the plugin suggests links as we write. Above all this ,premium version gives you an option to set multiple focus keywords for a piece of content.BEFORE ORDER PLEASE MESSAGE ME. Features you will get from my gig,Paid yoast plugin Webmaster Tool SetupSitemap submission in Google BingComplete on page OptimizationAdd Alt Tag to Each ImagesBrowser Cache Images Optimization Why Me?High Professional WorkWhite Hat SEO TechniquesOriginal Yoast Premium Plugin(Not Null) 100% satisfaction Complete Before & After Audit Report

by: zeewebservices
Created: —
Category: Onsite SEO & Research
Viewed: 249


No “plugin” command VIM

Whenever I try to use Vundle Plugins in Vim, I always get this error:

E492: Not an editor command: Plugin ‘VundleVim/Vundle.vim’^M

I’ve tried using both Vim 7.4 (the one you get from ‘apt’) and Vim 8.1 (the one you get from cloning the git repo)

Both return the same exact error.

Oddly, Vim says that I have two .vimrc files (after using :version) – one in my home folder (~/.vimrc) and one in ~/.vim/.vimrc, but the latter does not show up in a file explorer, and running ‘nano’ with root says that the file does not exist.

I’ve tried uninstalling Vim and manually deleting all Vim related folders/files (even the one in /etc), and re-installing Vim fresh. as well as re-cloning and re-doing my .vimrc file.

Here is my .vimrc file, and the :version command result:

set nocompatible              " be iMproved, required filetype off                  " required  " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here')  " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim'  " All of your Plugins must be added before the following line call vundle#end()            " required filetype plugin indent on    " required  
   system vimrc file: "$  VIM/vimrc"      user vimrc file: "$  HOME/.vimrc"  2nd user vimrc file: "~/.vim/vimrc"       user exrc file: "$  HOME/.exrc"        defaults file: "$  VIMRUNTIME/defaults.vim"   fall-back for $  VIM: "/usr/local/share/vim" 

System:

Lubuntu LTS 16.04

display custom plugin view on front end inside template body

I searched on google but nothing. I’m creating custom plugin. Admin area is displayed without any problems. The problem is on front end i don’t know which action or filter i have to call. when i use add_filter(‘template_include’, ‘myPublicFunction’) the view is displayed without inside a template body.

add_filter("template_include", "publicViewCall"); 

enter image description here

I need to include the view inside the template body. thank you any help is appreciated

Mostrar PopUp en Leaflet con plugin Leaflet.MarkerCluster.LayerSupport

Estoy utilizando Leaflet para mostrar los datos de un GeoJson, he agregado el plugin MarkerCluster, hasta aquí todo bien, parte del código es el siguiente

// Llamada ajax para mostrar los datos del geojson en el mapa var myLoader = document.getElementById('myLoaderContainer'); var xhr = new XMLHttpRequest();  xhr.open('GET', '../data/map/a.geojson'); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.responseType = 'json'; xhr.onload = function() {   if (xhr.status == 200){     var geojsonAjax = L.geoJSON(xhr.response, {       onEachFeature:dataPopup,       // Añade el icon personalizado       pointToLayer: function (feature, latlng) {         return L.marker(latlng, {icon: icon });       }     });     // Añade markerCluster.     markers.addLayer(geojsonAjax);     mymap.addLayer(markers);  }; xhr.send(); 

El siguiente paso es agrupar los cluster en grupos, para ello estoy utilizando el plugin Leaflet.MarkerCluster.LayerSupport, https://github.com/ghybs/Leaflet.MarkerCluster.LayerSupport

Y es donde viene los problemas, he intentado lo siguiente, me muestra los grupos, y los marker en el mapa con markerCluster, pero no visualizo la información dentro del popUp. El popUp esta vacio. Antes de intentar agrupar los marker, si tengo información en el popUp.

/* **************************************** Carga la información del Geojson, y define MarkerCluster **************************************** */ // Variables para crear los layerGroup var mcgLayerSupportGroup = L.markerClusterGroup.layerSupport(),     group1 = L.layerGroup(),     group2 = L.layerGroup(),     group3 = L.layerGroup(),     control = L.control.layers(null, null, { collapsed: false }),     marker; // Agraga los grupos al mapa mcgLayerSupportGroup.addTo(mymap);  // Llamada ajax para mostrar los datos del geojson en el mapa var myLoader = document.getElementById('myLoaderContainer'); var xhr = new XMLHttpRequest();  xhr.open('GET', '../data/map/a.geojson'); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.responseType = 'json'; xhr.onload = function() {   if (xhr.status == 200){     var geojsonAjax = L.geoJSON(xhr.response, {       onEachFeature:dataPopup,       // Añade el icon personalizado       pointToLayer: function (feature, latlng) {         marker = L.marker(latlng, {icon:icon})         if (feature.properties.provincia == 'a') {           marker.addTo(group1)         }else if(feature.properties.provincia == 'b'){           marker.addTo(group3)         }         else {           marker.addTo(group2)         }       }     });  mcgLayerSupportGroup.checkIn([group1, group2, group3]);  control.addBaseLayer(group1, 'first quarter'); control.addBaseLayer(group2, 'Second quarter'); control.addBaseLayer(group3, 'Third quarter');  control.addTo(mymap);  group1.addTo(mymap); group2.addTo(mymap); group3.addTo(mymap); 

plumFormAutocomplete jQuery plugin doesn’t group suggestions

I am using plumFormAutocomplete jQuery plugin in NewForm.aspx to populate suggestions from sharepoint list (visitors) to fill one field (visitors name) and, based on the selection, autocomplete second field (work).

<script type="text/javascript"> $  (document).ready(function () { //get control for autocomplete field var fieldControl = $  .getFieldControl("Title"); //call autocomplete plugin for field control fieldControl.plumFormAutocomplete({ sourceList: "visitors", sourceMatchField: "Title", labelFields: ['Title', 'work'], labelSeparator: ', ', fillConcatenatedLabel: false, fieldsMapping: [{sourceField: 'work', targetField: 'work'},         {sourceField: 'Title', targetField: 'Title'}] }); });  </script> 

Here when I start entering visitor’s name from the list “visitors” it shows name suggestions combined with visitors work (“name, work”). And when I select name, it autocompletes work field.

The problem is, that in the “visitors” list there are many duplicate values and I want that suggestions won’t be duplicate but grouped by visitors name:

duplicate suggestions

Tried to improvise in jquery.plumFormAutocomplete.js and add groupBy instead of orderBy but it doesn’t change anything:

//get CAML query for keyword function getCamlQuery(colname, keyword) { var where = "<Where><Contains><FieldRef Name='" + colname + "'></FieldRef><Value Type='Text'>" + keyword + "</Value></Contains></Where>" // var orderBy = "<OrderBy><FieldRef Name='" + colname + "' Ascending='False' /></OrderBy>" var groupBy = "<GroupBy><FieldRef Name='" + colname + "'/></GroupBy>" var query = "<Query>" + where + orderBy + groupBy + "</Query>"; return query; } 

Do you have any suggestions?

Thank you.

Develop Custom WordPress Plugin in 24 hours for $50

Hello, I am offering here quality services for WordPress plugin. It’s very regular and common for peoples who like to build websites with WordPress, that, they may have custom need or functionalities to implement. And the internet is not clean enough and easy enough to find a good provider to complete the job. If you are still here then I can ensure you that you are at the right place to order an WordPress Plugin. Here are some features from this gig 100% Clean code with DocumentationCareful about WordPress securitySEO friendly developmentGive it a trial before completing an order Paid support in future to extend previously built WordPress PluginPeaceful Conversation. Overall happy project done. So you don’t need to hesitate, just try your first order and I guarantee you will have to come again for Good service with WordPress Plugin Please contact with me before placing an order about WordPress Plugin to avoid confusion. Integrating PluginsAll in One SEO PackContact Form 7MailchimpWooCommerceYoutube Waiting to hear from you. Thank you

by: AbdulAlMomin
Created: —
Category: WordPress
Viewed: 243