{"id":79,"date":"2011-08-14T03:06:45","date_gmt":"2011-08-14T03:06:45","guid":{"rendered":"https:\/\/misharabinovich.com\/blog\/?p=79"},"modified":"2021-04-11T12:32:38","modified_gmt":"2021-04-11T12:32:38","slug":"adding-android-support-to-wp_slider-wordpress-theme","status":"publish","type":"post","link":"https:\/\/misharabinovich.com\/blog\/?p=79","title":{"rendered":"Adding Android support to WP_Slider WordPress theme"},"content":{"rendered":"<p>I am helping a friend out with a website. He wants to have a wordpress theme with a media content slider and he wants it to work on smart phones. I found that the two best sliders that handled images and video (<a href=\"http:\/\/css-tricks.com\/examples\/AnythingSlider\/\" title=\"AnythingSlider site\">AnythingSlider<\/a> and <a href=\"http:\/\/choicethemes.com\/wordpress\/wp-slider\/\" title=\"WP_Slider WordPress Theme\">WP_Slider Theme<\/a>) had a bug when viewed on my Android HTC Incredible (Android 2.2, WebKit 3.1 Browser). I found that the bug is on the Android browser side, and created this quick and dirty patch of WP_Slider Theme to work on Android.<\/p>\n<p>There seems to be a bug in Android phone browsers relating to overflow:hidden CSS property. The overflow property, when set to hidden on a div causes any elements that spill out of that div&#8217;s bounding box to be clipped and not shown. It seems that on my phone&#8217;s browser this breaks for videos. Youtube embeds, for example, float on top of everything even when they are supposed to be hidden. <\/p>\n<p>Using jQuery and CSS selectors I found all the elements that are supposed to be hidden and set their visibility to hidden as well, which really hid them even on my phone. Here is <a href=\"https:\/\/misharabinovich.com\/projects\/android_support_diff\" title=\"Android Support for WP_Slider Theme\">the diff to WP_Slider Theme (generated with git)<\/a> that shows my changes. I&#8217;m also including another patch which hides redundant commenting links in the theme. More specifically, the theme doesn&#8217;t differentiate between a first-time reply (first comment ever) link and a link to previously made comments. Other than that it is a fine theme, though if I end up using it I would tone down the graphics quite a bit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am helping a friend out with a website. He wants to have a wordpress theme with a media content slider and he wants it to work on smart phones. I found that the two best sliders that handled images and video (AnythingSlider and WP_Slider Theme) had a bug when viewed on my Android HTC [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-miscellaneous"],"_links":{"self":[{"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=79"}],"version-history":[{"count":0,"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/79\/revisions"}],"wp:attachment":[{"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/misharabinovich.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}