{"id":24328,"date":"2013-07-18T12:33:08","date_gmt":"2013-07-18T12:33:08","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/ip-tools\/"},"modified":"2019-02-22T09:36:16","modified_gmt":"2019-02-22T09:36:16","slug":"ip-tools","status":"closed","type":"plugin","link":"https:\/\/bn-in.wordpress.org\/plugins\/ip-tools\/","author":9095461,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.5","stable_tag":"trunk","tested":"5.1.22","requires":"2.8","requires_php":"","requires_plugins":"","header_name":"IP Tools","header_author":"Chris Dennis","header_description":"","assets_banners_color":"","last_updated":"2019-02-22 09:36:16","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":5,"author_block_rating":0,"active_installs":50,"downloads":3441,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":3},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3513,1493,17987,17986,162],"plugin_category":[43,49],"plugin_contributors":[89658],"plugin_business_model":[],"class_list":["post-24328","plugin","type-plugin","status-closed","hentry","plugin_tags-address","plugin_tags-ip","plugin_tags-ipv4","plugin_tags-ipv6","plugin_tags-widget","plugin_category-customization","plugin_category-maps-and-location","plugin_contributors-chrisdennis","plugin_committers-chrisdennis"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/ip-tools.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The IP Tools plugin provides a number of ways to control the content displayed \nto the visitor depending on whether they have connected to the server\nvia IPv4 or IPv6.<\/p>\n\n<p>IPv6 is slowly being adopted, and will eventually replace IPv4.\nThere is plenty of information on this topic on the internet -- \non <a href=\"https:\/\/en.wikipedia.org\/wiki\/IPv6\">Wikipedia<\/a>, for example.<\/p>\n\n<p>Suggestions for more things to add to this tool box will be welcome.<\/p>\n\n<h4>Shortcodes<\/h4>\n\n<p>Place these shortcodes in your posts and pages.<\/p>\n\n<ul>\n<li><code>[ipt_address]<\/code> is replaced by the visitor's IP address.<\/li>\n<li><code>[ipt_ipv6logo width=80px]<\/code> is replaced by an IPv6 logo (from the \n<a href=\"http:\/\/www.worldipv6launch.org\/\">World IPv6 Launch<\/a> website)\ndisplayed with the given width.  The default width is 64 pixels: the width can be\nspecified in any <a href=\"http:\/\/www.w3.org\/TR\/css3-values\/#lengths\">CSS length unit<\/a>.<\/li>\n<li><code>[ipt_ipv6only]...text...[\/ipt_ipv6only]<\/code> displays the text only if IPv6 is in use.<\/li>\n<li><code>[ipt_ipv4only]...text...[\/ipt_ipv4only]<\/code> displays the text only if IPv4 is in use.<\/li>\n<\/ul>\n\n<p>Other shortcodes can be nested within these last two.<\/p>\n\n<p>Note that shortcodes can be used in text widgets, but only if the theme includes\nthe necessary filter.\nIf shortcodes in widgets are not working in your current theme, \nyou need to modify your WordPress theme and put the following \ncode into the \"functions.php\" file of the theme.<\/p>\n\n<pre><code>&lt;?php add_filter('widget_text', 'do_shortcode'); ?&gt;\n<\/code><\/pre>\n\n<p>Thanks to the <a href=\"http:\/\/www.lost-in-code.com\/platforms\/wordpress\/wordpress-shortcode-in-text-widget\/\">Lost in Code website<\/a> for this tip.<\/p>\n\n<h4>CSS Classes<\/h4>\n\n<p>IP Tools creates CSS which can be used to hide any HTML element depending on whether IPv4 or IPv6 is in use.<\/p>\n\n<p>It defines classes <code>ipt_ipv4only<\/code> and <code>ipt_ipv6only<\/code> which basically do what they say: the element\nwith that class is modified with <code>display: none<\/code> if the visitor's IP address is in the other IP domain.<\/p>\n\n<p>For example, if you included the following HTML in a page, post, or widget\nonly the relevant section of text would be displayed to the user.<\/p>\n\n<pre><code>&lt;div class=\"ipt_ipv4only\"&gt;\n    &lt;p&gt;You've come to this webpage via IPv4 -- \nthat's &lt;em&gt;so&lt;\/em&gt; last century.\n&lt;\/div&gt;\n&lt;div class=\"ipt_ipv6only\"&gt;\n    &lt;p&gt;Well done!  You're enjoying the modern wonders of IPv6.\n&lt;\/div&gt;\n<\/code><\/pre>\n\n<h4>Widgets<\/h4>\n\n<p>So far, IP Tools just provides one small widget called 'IP Tools Address' that displays the visitor's IP address -- something like \n'IPv4 address: 12.34.56.78' or 'IPv6 address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334'.<\/p>\n\n<p>The title of the widget can be changed from its default value of 'IP Tools'.<\/p>\n\n<!--section=installation-->\n<p>Installation is very simple<\/p>\n\n<ol>\n<li>Download the plugin and extract it to your WordPress plugin directory (<code>...\/wp-content\/plugins\/<\/code>),\nor else search for it in the Install Plugins page from within WordPress and click on 'Install Now'.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<p>Then you can add shortcodes, widgets, and classes to your website: see the\nDescription section for details.<\/p>\n\n<!--section=changelog-->\n<p>= 0.1.5<\/p>\n\n<ul>\n<li>Fixed deprecated use of class name as constructor function.<\/li>\n<li>Tested on WP 5.0.2.<\/li>\n<\/ul>\n\n<p>= 0.1.4<\/p>\n\n<ul>\n<li>Tested on WP 4.9.1<\/li>\n<\/ul>\n\n<h4>0.1.3<\/h4>\n\n<ul>\n<li>Tested on WP 4.7.2<\/li>\n<\/ul>\n\n<h4>0.1.2<\/h4>\n\n<ul>\n<li>Tested on WP 4.0<\/li>\n<\/ul>\n\n<h4>0.1.1<\/h4>\n\n<ul>\n<li>Minor tweaks.<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>First public release.<\/li>\n<\/ul>","raw_excerpt":"IP Tools is a small collection of useful shortcodes, widgets, and classes related to IP addresses.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/24328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=24328"}],"author":[{"embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/chrisdennis"}],"wp:attachment":[{"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=24328"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=24328"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=24328"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=24328"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=24328"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bn-in.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=24328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}