Basically, we will just check every setting and if it’s not empty, we will store the value in the database. This function will help us to update whatever we enter in the widget form. Get_field_id( 'textarea' ) ) ?>" name="get_field_name( 'textarea' ) ) ?>">Īnd this is how the form looks like in WordPress admin:īut there are still some steps we need to make to see the map on the front end. Loop through options and add each one to the select dropdown All relative paths and local bash autocomplete is usable. '12' => _( '12 (Main streets)', 'text_domain' ), One command to run MapTiler Engine on the command-line anywhere where docker is available: docker run -ti -rm -v (pwd):/data maptiler/engine maptiler-engine -help The actual directory is directly mapped to docker and is writeable. _( 'Select zoom level', 'text_domain' ), Get_field_id( 'controls' ) ) ?>" name="get_field_name( 'controls' ) ) ?>" type="checkbox" value="1" /> And finally, if there will be a map in the widget area, there might be some additional info below the map in separate TEXTAREA. 2 Answers Sorted by: 1 There are two different ways that Tiles can be addressed, the TMS standard specifies that tile coordinates start at the bottom left, but in practice most software is using a coordinate system with the Y axis reversed from TMS: it starts at the top left instead of the bottom right. I can also imagine some of you would like to provide the possibility of showing map CONTROLS. It would be also nice if we will be able to ZOOM the map based on our needing. This brings us to other parameters, the longitude as LON and the latitude as LAT. Also, if we will need to display the map, we should know where is the location we want to focus on (coordinates). Of course, there should be some TITLE of the widget. Let's take a breath now and try to figure out, what we will need as options for our plugin. The main responsibility of the form() function is to output the options form on admin. ‘customize_selective_refresh’ parameter allows the widget to be refreshed under Appearance > Customize when editing the widget so instead of refreshing the entire page only the widget is refreshed when making changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |