PluginProbe
Responsive Menu – Create Mobile-Friendly Menu / 3.1.26
Responsive Menu – Create Mobile-Friendly Menu v3.1.26
4.7.3 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.10 4.1.11 4.1.12 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 All 90 releases
← All changes | app/Collections/OptionsCollection.php +14 -5 3.1.83.1.26 View file →
@@ -18,9 +18,9 @@
18 18 }
19 19
20 20 public function getActiveArrow() {
21 21 if($this->options['active_arrow_image'])
22 - return '<img alt="' . $this->options['active_arrow_image_alt'] .'" src="' . $this->options['active_arrow_image'] .'" />';
22 + return '<img alt="' . $this->options['active_arrow_image_alt'] .'" src="' . $this->getThemedUrl($this->options['active_arrow_image']) .'" />';
23 23
24 24 return $this->options['active_arrow_shape'];
25 25
26 26 }
@@ -26,9 +26,9 @@
26 26 }
27 27
28 28 public function getInActiveArrow() {
29 29 if($this->options['inactive_arrow_image'])
30 - return '<img alt="' . $this->options['inactive_arrow_image_alt'] .'" src="' . $this->options['inactive_arrow_image'] .'" />';
30 + return '<img alt="' . $this->options['inactive_arrow_image_alt'] .'" src="' . $this->getThemedUrl($this->options['inactive_arrow_image']) .'" />';
31 31
32 32 return $this->options['inactive_arrow_shape'];
33 33
34 34 }
@@ -34,9 +34,9 @@
34 34 }
35 35
36 36 public function getTitleImage() {
37 37 if($this->options['menu_title_image'])
38 - return '<img alt="' . $this->options['menu_title_image_alt'] .'" src="' . $this->options['menu_title_image'] .'" />';
38 + return '<img alt="' . $this->options['menu_title_image_alt'] .'" src="' . $this->getThemedUrl($this->options['menu_title_image']) .'" />';
39 39
40 40 return null;
41 41
42 42 }
@@ -42,9 +42,9 @@
42 42 }
43 43
44 44 public function getButtonIcon() {
45 45 if($this->options['button_image'])
46 - return '<img alt="' . $this->options['button_image_alt'] .'" src="' . $this->options['button_image'] .'" class="responsive-menu-button-icon responsive-menu-button-icon-active" />';
46 + return '<img alt="' . $this->options['button_image_alt'] .'" src="' . $this->getThemedUrl($this->options['button_image']) .'" class="responsive-menu-button-icon responsive-menu-button-icon-active" />';
47 47
48 48 return '<span class="responsive-menu-inner"></span>';
49 49 }
50 50
@@ -49,9 +49,9 @@
49 49 }
50 50
51 51 public function getButtonIconActive() {
52 52 if($this->options['button_image'])
53 - return '<img alt="' . $this->options['button_image_alt_when_clicked'] .'" src="' . $this->options['button_image_when_clicked'] .'" class="responsive-menu-button-icon responsive-menu-button-icon-inactive" />';
53 + return '<img alt="' . $this->options['button_image_alt_when_clicked'] .'" src="' . $this->getThemedUrl($this->options['button_image_when_clicked']) .'" class="responsive-menu-button-icon responsive-menu-button-icon-inactive" />';
54 54 }
55 55
56 56 public function offsetExists($offset) {
57 57 return array_key_exists($offset, $this->options);
@@ -80,7 +80,16 @@
80 80 }
81 81
82 82 public function count() {
83 83 return count($this->options);
84 + }
85 +
86 + private function getThemedUrl($image_url) {
87 + if($this->options['menu_theme']):
88 + $theme_url = wp_upload_dir()['baseurl'] . '/responsive-menu-themes/' . $this->options['menu_theme'];
89 + $image_url = str_replace('{theme_images}', $theme_url . '/images', $image_url);
90 + endif;
91 +
92 + return $image_url;
84 93 }
85 94
86 95 }