@@ -1,67 +1,67 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | class Initialize extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - |
|
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - } else { |
|
| 12 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 13 | - } |
|
| 14 | - |
|
| 15 | - } |
|
| 16 | - |
|
| 17 | - public function testInitialize() |
|
| 18 | - { |
|
| 19 | - // Check plugins available |
|
| 20 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + } else { |
|
| 12 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 13 | + } |
|
| 14 | + |
|
| 15 | + } |
|
| 16 | + |
|
| 17 | + public function testInitialize() |
|
| 18 | + { |
|
| 19 | + // Check plugins available |
|
| 20 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 21 | 21 | // echo $this->source(); |
| 22 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 23 | - |
|
| 24 | - $stop_script = false; |
|
| 25 | - |
|
| 26 | - $plugins = array( |
|
| 27 | - 'geodirectory', |
|
| 28 | - 'geodirectory-advance-search-filters', |
|
| 29 | - 'geodirectory-affiliatewp-integration', |
|
| 30 | - 'geodirectory-ajax-duplicate-alert', |
|
| 31 | - 'geodirectory-buddypress-integration', |
|
| 32 | - 'geodirectory-claim-manager', |
|
| 33 | - 'geodirectory-custom-post-types', |
|
| 34 | - 'geodirectory-events', |
|
| 35 | - 'gd-booster', |
|
| 36 | - 'geodirectory-location-manager', |
|
| 37 | - 'geodirectory-marker-cluster', |
|
| 38 | - 'geodirectory-payment-manager', |
|
| 39 | - 'geodirectory-re-captcha', |
|
| 40 | - 'geodirectory-review-rating-manager', |
|
| 41 | - 'geodirectory-social-importer', |
|
| 42 | - 'stripe-payment-geodirectory-add-on', |
|
| 43 | - 'buddypress', |
|
| 22 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 23 | + |
|
| 24 | + $stop_script = false; |
|
| 25 | + |
|
| 26 | + $plugins = array( |
|
| 27 | + 'geodirectory', |
|
| 28 | + 'geodirectory-advance-search-filters', |
|
| 29 | + 'geodirectory-affiliatewp-integration', |
|
| 30 | + 'geodirectory-ajax-duplicate-alert', |
|
| 31 | + 'geodirectory-buddypress-integration', |
|
| 32 | + 'geodirectory-claim-manager', |
|
| 33 | + 'geodirectory-custom-post-types', |
|
| 34 | + 'geodirectory-events', |
|
| 35 | + 'gd-booster', |
|
| 36 | + 'geodirectory-location-manager', |
|
| 37 | + 'geodirectory-marker-cluster', |
|
| 38 | + 'geodirectory-payment-manager', |
|
| 39 | + 'geodirectory-re-captcha', |
|
| 40 | + 'geodirectory-review-rating-manager', |
|
| 41 | + 'geodirectory-social-importer', |
|
| 42 | + 'stripe-payment-geodirectory-add-on', |
|
| 43 | + 'buddypress', |
|
| 44 | 44 | // 'wordpress-database-reset' |
| 45 | - ); |
|
| 45 | + ); |
|
| 46 | 46 | |
| 47 | - foreach ($plugins as $plugin) { |
|
| 48 | - if (!$this->isElementExists($plugin)) { |
|
| 49 | - $plugin_name = ucwords(str_replace('-', ' ', $plugin)); |
|
| 50 | - $this->logError($plugin_name.' not installed'); |
|
| 51 | - $stop_script = true; |
|
| 52 | - } |
|
| 53 | - } |
|
| 47 | + foreach ($plugins as $plugin) { |
|
| 48 | + if (!$this->isElementExists($plugin)) { |
|
| 49 | + $plugin_name = ucwords(str_replace('-', ' ', $plugin)); |
|
| 50 | + $this->logError($plugin_name.' not installed'); |
|
| 51 | + $stop_script = true; |
|
| 52 | + } |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - if($stop_script) { |
|
| 56 | - $this->logError("Stopping the script. Please fix the errors to continue"); |
|
| 57 | - return; |
|
| 58 | - } |
|
| 55 | + if($stop_script) { |
|
| 56 | + $this->logError("Stopping the script. Please fix the errors to continue"); |
|
| 57 | + return; |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | 60 | |
| 61 | - //Activate WordPress database reset |
|
| 62 | - //$this->maybeActivatePlugin("wordpress-database-reset"); |
|
| 61 | + //Activate WordPress database reset |
|
| 62 | + //$this->maybeActivatePlugin("wordpress-database-reset"); |
|
| 63 | 63 | |
| 64 | - //reset the db |
|
| 64 | + //reset the db |
|
| 65 | 65 | // $this->logInfo('Resetting WordPress database......'); |
| 66 | 66 | // $this->url(self::GDTEST_BASE_URL.'wp-admin/tools.php?page=database-reset'); |
| 67 | 67 | // $this->waitForPageLoadAndCheckForErrors(); |
@@ -75,194 +75,194 @@ discard block |
||
| 75 | 75 | // $this->acceptAlert(); |
| 76 | 76 | // $this->waitForPageLoadAndCheckForErrors(); |
| 77 | 77 | |
| 78 | - // make sure all plugins not active. We will activate it programatically. |
|
| 79 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 80 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 81 | - $this->hideAdminBar(); |
|
| 78 | + // make sure all plugins not active. We will activate it programatically. |
|
| 79 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 80 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 81 | + $this->hideAdminBar(); |
|
| 82 | 82 | |
| 83 | 83 | // if(($key = array_search('wordpress-database-reset', $plugins)) !== false) { |
| 84 | 84 | // unset($plugins[$key]); |
| 85 | 85 | // } |
| 86 | 86 | |
| 87 | - foreach ($plugins as $plugin) { |
|
| 88 | - if (!is_int(strpos($this->byId($plugin)->attribute('class'), 'inactive'))) { |
|
| 89 | - $plugin_name = ucwords(str_replace('-', ' ', $plugin)); |
|
| 90 | - $this->logError($plugin_name." is active. Please deactivate it. It will be activated programatically."); |
|
| 91 | - $stop_script = true; |
|
| 92 | - } |
|
| 93 | - } |
|
| 94 | - |
|
| 95 | - |
|
| 96 | - if($stop_script) { |
|
| 97 | - $this->logInfo("Stopping the script. Please fix the errors to continue"); |
|
| 98 | - return; |
|
| 99 | - } |
|
| 100 | - |
|
| 101 | - //make sure GDF theme installed |
|
| 102 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/themes.php'); |
|
| 103 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 104 | - if (!$this->isElementExists("GeoDirectory_framework-name")) { |
|
| 105 | - $this->logError("GeoDirectory Framework theme not installed"); |
|
| 106 | - $stop_script = true; |
|
| 107 | - } |
|
| 108 | - |
|
| 109 | - if (!$this->isElementExists("gdf_test_child-name")) { |
|
| 110 | - $this->logError("GDF child theme not installed"); |
|
| 111 | - $stop_script = true; |
|
| 112 | - } |
|
| 113 | - |
|
| 114 | - if($stop_script) { |
|
| 115 | - $this->logError("Stopping the script. Please fix the errors to continue"); |
|
| 116 | - return; |
|
| 117 | - } |
|
| 118 | - |
|
| 119 | - //Activate GDF theme if not active |
|
| 120 | - $this->logInfo('Checking GDF theme......'); |
|
| 121 | - $is_active = $this->byXPath("//div[contains(@class, 'theme') and contains(@class, 'active')]")->attribute('aria-describedby'); |
|
| 122 | - if (strpos($is_active, 'gdf_test_child-name')) { |
|
| 123 | - //GDF already active |
|
| 124 | - } else { |
|
| 125 | - //Activate GDF |
|
| 126 | - $this->logInfo('Activating GDF theme......'); |
|
| 127 | - $this->byXPath("//div[contains(@aria-describedby, 'gdf_test_child-action') and contains(@aria-describedby, 'gdf_test_child-name')]//div[@class='theme-actions']//a[contains(@class, 'activate')]")->click(); |
|
| 128 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 129 | - $this->assertTrue( $this->isTextPresent("New theme activated"), "'New theme activated' text not found"); |
|
| 130 | - } |
|
| 131 | - |
|
| 132 | - //Activate Geodirectory core |
|
| 133 | - $this->maybeActivatePlugin("geodirectory", 20000); |
|
| 134 | - |
|
| 135 | - //set default location |
|
| 136 | - $this->logInfo('Setting default location......'); |
|
| 137 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=default_location_settings'); |
|
| 138 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 139 | - $this->byId('city')->value('New York'); |
|
| 140 | - $this->byId('set_address_button')->click(); |
|
| 141 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 142 | - $this->byId('location_save')->click(); |
|
| 143 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 144 | - $this->assertTrue( $this->isTextPresent("Your settings have been saved"), "'Your settings have been saved' text not found"); |
|
| 145 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 146 | - |
|
| 147 | - //install place dummy data |
|
| 148 | - $this->logInfo('Installing place dummy data......'); |
|
| 149 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory'); |
|
| 150 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 151 | - //$this->byLinkText('Dummy Data')->click(); |
|
| 152 | - $this->byXPath("//dd[@id='dummy_data_settings']/a")->click(); |
|
| 153 | - $html = $this->byId('sub_dummy_data_settings')->attribute('innerHTML'); |
|
| 154 | - if (strpos($html, 'Yes Delete Please!')) { |
|
| 155 | - //delete old place data |
|
| 156 | - $this->byXPath("//div[@id='sub_dummy_data_settings']//a[@id='geodir_dummy_delete']")->click(); |
|
| 157 | - $this->acceptAlert(); |
|
| 158 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 159 | - } |
|
| 160 | - $this->select($this->byXPath("//div[@id='sub_dummy_data_settings']//select[@class='selected_sample_data']"))->selectOptionByLabel('10'); |
|
| 161 | - $this->byXPath("//div[@id='sub_dummy_data_settings']//a[@id='geodir_dummy_insert']")->click(); |
|
| 162 | - $this->waitForPageLoadAndCheckForErrors(60000); |
|
| 163 | - |
|
| 164 | - //make sure dummy data installed |
|
| 165 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory'); |
|
| 166 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 167 | - $this->byXPath("//dd[@id='dummy_data_settings']/a")->click(); |
|
| 168 | - $html = $this->byId('sub_dummy_data_settings')->attribute('innerHTML'); |
|
| 169 | - $this->assertTrue( is_int(strpos($html, 'Yes Delete Please!')), "Places Demo data not installed correctly"); |
|
| 170 | - |
|
| 171 | - |
|
| 172 | - //Activate Geodirectory Events |
|
| 173 | - $this->maybeActivatePlugin("geodirectory-events", 20000); |
|
| 174 | - |
|
| 175 | - //install Events dummy data |
|
| 176 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory'); |
|
| 177 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 178 | - $this->byXPath("//dd[@id='gdevent_dummy_data_settings']/a")->click(); |
|
| 179 | - $html = $this->byId('sub_gdevent_dummy_data_settings')->attribute('innerHTML'); |
|
| 180 | - if (strpos($html, 'Yes Delete Please!')) { |
|
| 181 | - //delete old data |
|
| 182 | - $this->byXPath("//div[@id='sub_gdevent_dummy_data_settings']//a[@id='geodir_dummy_delete']")->click(); |
|
| 183 | - $this->acceptAlert(); |
|
| 184 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 185 | - } |
|
| 186 | - $this->select($this->byXPath("//div[@id='sub_gdevent_dummy_data_settings']//select[@class='selected_sample_data']"))->selectOptionByLabel('10'); |
|
| 187 | - $this->byXPath("//div[@id='sub_gdevent_dummy_data_settings']//a[@id='geodir_dummy_insert']")->click(); |
|
| 188 | - $this->waitForPageLoadAndCheckForErrors(60000); |
|
| 189 | - |
|
| 190 | - //make sure Events dummy data installed |
|
| 191 | - $this->logInfo('Checking events dummy data installed properly or not......'); |
|
| 192 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings&active_tab=gdevent_dummy_data_settings'); |
|
| 193 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 194 | - $this->byXPath("//dd[@id='gdevent_dummy_data_settings']/a")->click(); |
|
| 195 | - $html = $this->byId('sub_gdevent_dummy_data_settings')->attribute('innerHTML'); |
|
| 196 | - $this->assertTrue( is_int(strpos($html, 'Yes Delete Please!')), "Events Demo data not installed correctly"); |
|
| 197 | - |
|
| 198 | - //set home page |
|
| 199 | - $this->logInfo('Setting home page......'); |
|
| 200 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/options-reading.php'); |
|
| 201 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 202 | - $this->byXPath("//input[@value='page']")->click(); |
|
| 203 | - $this->select($this->byId("page_on_front"))->selectOptionByLabel('GD Home page'); |
|
| 204 | - $this->byId("submit")->click(); |
|
| 205 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 206 | - $this->assertTrue( $this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 207 | - |
|
| 208 | - //Enable registration |
|
| 209 | - $this->logInfo('Enabling registration......'); |
|
| 210 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/options-general.php'); |
|
| 211 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 212 | - $this->byId("users_can_register")->click(); |
|
| 213 | - $this->byId("submit")->click(); |
|
| 214 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 215 | - $this->assertTrue( $this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 216 | - |
|
| 217 | - //Permalinks |
|
| 218 | - $this->logInfo('Setting permalinks......'); |
|
| 219 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/options-permalink.php'); |
|
| 220 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 221 | - $this->byXPath("(//input[@name='selection'])[5]")->click(); |
|
| 222 | - $this->byId("submit")->click(); |
|
| 223 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 87 | + foreach ($plugins as $plugin) { |
|
| 88 | + if (!is_int(strpos($this->byId($plugin)->attribute('class'), 'inactive'))) { |
|
| 89 | + $plugin_name = ucwords(str_replace('-', ' ', $plugin)); |
|
| 90 | + $this->logError($plugin_name." is active. Please deactivate it. It will be activated programatically."); |
|
| 91 | + $stop_script = true; |
|
| 92 | + } |
|
| 93 | + } |
|
| 94 | + |
|
| 95 | + |
|
| 96 | + if($stop_script) { |
|
| 97 | + $this->logInfo("Stopping the script. Please fix the errors to continue"); |
|
| 98 | + return; |
|
| 99 | + } |
|
| 100 | + |
|
| 101 | + //make sure GDF theme installed |
|
| 102 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/themes.php'); |
|
| 103 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 104 | + if (!$this->isElementExists("GeoDirectory_framework-name")) { |
|
| 105 | + $this->logError("GeoDirectory Framework theme not installed"); |
|
| 106 | + $stop_script = true; |
|
| 107 | + } |
|
| 108 | + |
|
| 109 | + if (!$this->isElementExists("gdf_test_child-name")) { |
|
| 110 | + $this->logError("GDF child theme not installed"); |
|
| 111 | + $stop_script = true; |
|
| 112 | + } |
|
| 113 | + |
|
| 114 | + if($stop_script) { |
|
| 115 | + $this->logError("Stopping the script. Please fix the errors to continue"); |
|
| 116 | + return; |
|
| 117 | + } |
|
| 118 | + |
|
| 119 | + //Activate GDF theme if not active |
|
| 120 | + $this->logInfo('Checking GDF theme......'); |
|
| 121 | + $is_active = $this->byXPath("//div[contains(@class, 'theme') and contains(@class, 'active')]")->attribute('aria-describedby'); |
|
| 122 | + if (strpos($is_active, 'gdf_test_child-name')) { |
|
| 123 | + //GDF already active |
|
| 124 | + } else { |
|
| 125 | + //Activate GDF |
|
| 126 | + $this->logInfo('Activating GDF theme......'); |
|
| 127 | + $this->byXPath("//div[contains(@aria-describedby, 'gdf_test_child-action') and contains(@aria-describedby, 'gdf_test_child-name')]//div[@class='theme-actions']//a[contains(@class, 'activate')]")->click(); |
|
| 128 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 129 | + $this->assertTrue( $this->isTextPresent("New theme activated"), "'New theme activated' text not found"); |
|
| 130 | + } |
|
| 131 | + |
|
| 132 | + //Activate Geodirectory core |
|
| 133 | + $this->maybeActivatePlugin("geodirectory", 20000); |
|
| 134 | + |
|
| 135 | + //set default location |
|
| 136 | + $this->logInfo('Setting default location......'); |
|
| 137 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=default_location_settings'); |
|
| 138 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 139 | + $this->byId('city')->value('New York'); |
|
| 140 | + $this->byId('set_address_button')->click(); |
|
| 141 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 142 | + $this->byId('location_save')->click(); |
|
| 143 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 144 | + $this->assertTrue( $this->isTextPresent("Your settings have been saved"), "'Your settings have been saved' text not found"); |
|
| 145 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 146 | + |
|
| 147 | + //install place dummy data |
|
| 148 | + $this->logInfo('Installing place dummy data......'); |
|
| 149 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory'); |
|
| 150 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 151 | + //$this->byLinkText('Dummy Data')->click(); |
|
| 152 | + $this->byXPath("//dd[@id='dummy_data_settings']/a")->click(); |
|
| 153 | + $html = $this->byId('sub_dummy_data_settings')->attribute('innerHTML'); |
|
| 154 | + if (strpos($html, 'Yes Delete Please!')) { |
|
| 155 | + //delete old place data |
|
| 156 | + $this->byXPath("//div[@id='sub_dummy_data_settings']//a[@id='geodir_dummy_delete']")->click(); |
|
| 157 | + $this->acceptAlert(); |
|
| 158 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 159 | + } |
|
| 160 | + $this->select($this->byXPath("//div[@id='sub_dummy_data_settings']//select[@class='selected_sample_data']"))->selectOptionByLabel('10'); |
|
| 161 | + $this->byXPath("//div[@id='sub_dummy_data_settings']//a[@id='geodir_dummy_insert']")->click(); |
|
| 162 | + $this->waitForPageLoadAndCheckForErrors(60000); |
|
| 163 | + |
|
| 164 | + //make sure dummy data installed |
|
| 165 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory'); |
|
| 166 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 167 | + $this->byXPath("//dd[@id='dummy_data_settings']/a")->click(); |
|
| 168 | + $html = $this->byId('sub_dummy_data_settings')->attribute('innerHTML'); |
|
| 169 | + $this->assertTrue( is_int(strpos($html, 'Yes Delete Please!')), "Places Demo data not installed correctly"); |
|
| 170 | + |
|
| 171 | + |
|
| 172 | + //Activate Geodirectory Events |
|
| 173 | + $this->maybeActivatePlugin("geodirectory-events", 20000); |
|
| 174 | + |
|
| 175 | + //install Events dummy data |
|
| 176 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory'); |
|
| 177 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 178 | + $this->byXPath("//dd[@id='gdevent_dummy_data_settings']/a")->click(); |
|
| 179 | + $html = $this->byId('sub_gdevent_dummy_data_settings')->attribute('innerHTML'); |
|
| 180 | + if (strpos($html, 'Yes Delete Please!')) { |
|
| 181 | + //delete old data |
|
| 182 | + $this->byXPath("//div[@id='sub_gdevent_dummy_data_settings']//a[@id='geodir_dummy_delete']")->click(); |
|
| 183 | + $this->acceptAlert(); |
|
| 184 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 185 | + } |
|
| 186 | + $this->select($this->byXPath("//div[@id='sub_gdevent_dummy_data_settings']//select[@class='selected_sample_data']"))->selectOptionByLabel('10'); |
|
| 187 | + $this->byXPath("//div[@id='sub_gdevent_dummy_data_settings']//a[@id='geodir_dummy_insert']")->click(); |
|
| 188 | + $this->waitForPageLoadAndCheckForErrors(60000); |
|
| 189 | + |
|
| 190 | + //make sure Events dummy data installed |
|
| 191 | + $this->logInfo('Checking events dummy data installed properly or not......'); |
|
| 192 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings&active_tab=gdevent_dummy_data_settings'); |
|
| 193 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 194 | + $this->byXPath("//dd[@id='gdevent_dummy_data_settings']/a")->click(); |
|
| 195 | + $html = $this->byId('sub_gdevent_dummy_data_settings')->attribute('innerHTML'); |
|
| 196 | + $this->assertTrue( is_int(strpos($html, 'Yes Delete Please!')), "Events Demo data not installed correctly"); |
|
| 197 | + |
|
| 198 | + //set home page |
|
| 199 | + $this->logInfo('Setting home page......'); |
|
| 200 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/options-reading.php'); |
|
| 201 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 202 | + $this->byXPath("//input[@value='page']")->click(); |
|
| 203 | + $this->select($this->byId("page_on_front"))->selectOptionByLabel('GD Home page'); |
|
| 204 | + $this->byId("submit")->click(); |
|
| 205 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 206 | + $this->assertTrue( $this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 207 | + |
|
| 208 | + //Enable registration |
|
| 209 | + $this->logInfo('Enabling registration......'); |
|
| 210 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/options-general.php'); |
|
| 211 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 212 | + $this->byId("users_can_register")->click(); |
|
| 213 | + $this->byId("submit")->click(); |
|
| 214 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 215 | + $this->assertTrue( $this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 216 | + |
|
| 217 | + //Permalinks |
|
| 218 | + $this->logInfo('Setting permalinks......'); |
|
| 219 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/options-permalink.php'); |
|
| 220 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 221 | + $this->byXPath("(//input[@name='selection'])[5]")->click(); |
|
| 222 | + $this->byId("submit")->click(); |
|
| 223 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 224 | 224 | // echo $this->source(); |
| 225 | - $this->assertTrue( $this->isTextPresent("Permalink structure updated"), "'Permalink structure updated' text not found"); |
|
| 226 | - |
|
| 227 | - //create and assign menu |
|
| 228 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/nav-menus.php'); |
|
| 229 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 230 | - $this->assertTrue( $this->isTextPresent("Give your menu a name above, then click Create Menu."), "'Create Menu' text not found"); |
|
| 231 | - $this->logInfo('Creating new menu......'); |
|
| 232 | - $this->byId('menu-name')->value('Primary'); |
|
| 233 | - $this->byId('save_menu_header')->click(); |
|
| 234 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 235 | - |
|
| 236 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/nav-menus.php'); |
|
| 237 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 238 | - $this->assertTrue( $this->isTextPresent("Add menu items from the column on the left"), "'Add menu items from the column on the left' text not found"); |
|
| 239 | - $this->logInfo('Setting menu location......'); |
|
| 240 | - $this->byId('locations-main-nav')->click(); |
|
| 241 | - $this->byId('save_menu_header')->click(); |
|
| 242 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 243 | - $this->assertTrue( $this->isTextPresent("<strong>Primary</strong> has been updated"), "'Primary has been updated' text not found"); |
|
| 244 | - |
|
| 245 | - // Assign menu |
|
| 246 | - $this->logInfo('Assigning menu......'); |
|
| 247 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings&active_tab=geodir_navigation_settings'); |
|
| 248 | - $this->ExecuteScript('jQuery("#geodir_theme_location_nav").show();'); |
|
| 249 | - $this->select($this->byId('geodir_theme_location_nav'))->selectOptionByLabel('The Main Menu'); |
|
| 250 | - $this->byName('save')->click(); |
|
| 251 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 252 | - |
|
| 253 | - //Logout |
|
| 254 | - $this->maybeAdminLogout(); |
|
| 255 | - } |
|
| 256 | - |
|
| 257 | - public function tearDown() |
|
| 258 | - { |
|
| 259 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 260 | - //write current file number to completed.txt |
|
| 261 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 262 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 263 | - fwrite($completed, $CurrentFileNumber); |
|
| 264 | - } |
|
| 265 | - } |
|
| 225 | + $this->assertTrue( $this->isTextPresent("Permalink structure updated"), "'Permalink structure updated' text not found"); |
|
| 226 | + |
|
| 227 | + //create and assign menu |
|
| 228 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/nav-menus.php'); |
|
| 229 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 230 | + $this->assertTrue( $this->isTextPresent("Give your menu a name above, then click Create Menu."), "'Create Menu' text not found"); |
|
| 231 | + $this->logInfo('Creating new menu......'); |
|
| 232 | + $this->byId('menu-name')->value('Primary'); |
|
| 233 | + $this->byId('save_menu_header')->click(); |
|
| 234 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 235 | + |
|
| 236 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/nav-menus.php'); |
|
| 237 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 238 | + $this->assertTrue( $this->isTextPresent("Add menu items from the column on the left"), "'Add menu items from the column on the left' text not found"); |
|
| 239 | + $this->logInfo('Setting menu location......'); |
|
| 240 | + $this->byId('locations-main-nav')->click(); |
|
| 241 | + $this->byId('save_menu_header')->click(); |
|
| 242 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 243 | + $this->assertTrue( $this->isTextPresent("<strong>Primary</strong> has been updated"), "'Primary has been updated' text not found"); |
|
| 244 | + |
|
| 245 | + // Assign menu |
|
| 246 | + $this->logInfo('Assigning menu......'); |
|
| 247 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings&active_tab=geodir_navigation_settings'); |
|
| 248 | + $this->ExecuteScript('jQuery("#geodir_theme_location_nav").show();'); |
|
| 249 | + $this->select($this->byId('geodir_theme_location_nav'))->selectOptionByLabel('The Main Menu'); |
|
| 250 | + $this->byName('save')->click(); |
|
| 251 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 252 | + |
|
| 253 | + //Logout |
|
| 254 | + $this->maybeAdminLogout(); |
|
| 255 | + } |
|
| 256 | + |
|
| 257 | + public function tearDown() |
|
| 258 | + { |
|
| 259 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 260 | + //write current file number to completed.txt |
|
| 261 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 262 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 263 | + fwrite($completed, $CurrentFileNumber); |
|
| 264 | + } |
|
| 265 | + } |
|
| 266 | 266 | |
| 267 | 267 | } |
| 268 | 268 | ?> |
| 269 | 269 | \ No newline at end of file |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - if($stop_script) { |
|
| 55 | + if ($stop_script) { |
|
| 56 | 56 | $this->logError("Stopping the script. Please fix the errors to continue"); |
| 57 | 57 | return; |
| 58 | 58 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
| 96 | - if($stop_script) { |
|
| 96 | + if ($stop_script) { |
|
| 97 | 97 | $this->logInfo("Stopping the script. Please fix the errors to continue"); |
| 98 | 98 | return; |
| 99 | 99 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $stop_script = true; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - if($stop_script) { |
|
| 114 | + if ($stop_script) { |
|
| 115 | 115 | $this->logError("Stopping the script. Please fix the errors to continue"); |
| 116 | 116 | return; |
| 117 | 117 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $this->logInfo('Activating GDF theme......'); |
| 127 | 127 | $this->byXPath("//div[contains(@aria-describedby, 'gdf_test_child-action') and contains(@aria-describedby, 'gdf_test_child-name')]//div[@class='theme-actions']//a[contains(@class, 'activate')]")->click(); |
| 128 | 128 | $this->waitForPageLoadAndCheckForErrors(); |
| 129 | - $this->assertTrue( $this->isTextPresent("New theme activated"), "'New theme activated' text not found"); |
|
| 129 | + $this->assertTrue($this->isTextPresent("New theme activated"), "'New theme activated' text not found"); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | //Activate Geodirectory core |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $this->waitForPageLoadAndCheckForErrors(); |
| 142 | 142 | $this->byId('location_save')->click(); |
| 143 | 143 | $this->waitForPageLoadAndCheckForErrors(); |
| 144 | - $this->assertTrue( $this->isTextPresent("Your settings have been saved"), "'Your settings have been saved' text not found"); |
|
| 144 | + $this->assertTrue($this->isTextPresent("Your settings have been saved"), "'Your settings have been saved' text not found"); |
|
| 145 | 145 | $this->waitForPageLoadAndCheckForErrors(); |
| 146 | 146 | |
| 147 | 147 | //install place dummy data |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $this->waitForPageLoadAndCheckForErrors(); |
| 167 | 167 | $this->byXPath("//dd[@id='dummy_data_settings']/a")->click(); |
| 168 | 168 | $html = $this->byId('sub_dummy_data_settings')->attribute('innerHTML'); |
| 169 | - $this->assertTrue( is_int(strpos($html, 'Yes Delete Please!')), "Places Demo data not installed correctly"); |
|
| 169 | + $this->assertTrue(is_int(strpos($html, 'Yes Delete Please!')), "Places Demo data not installed correctly"); |
|
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | //Activate Geodirectory Events |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $this->waitForPageLoadAndCheckForErrors(); |
| 194 | 194 | $this->byXPath("//dd[@id='gdevent_dummy_data_settings']/a")->click(); |
| 195 | 195 | $html = $this->byId('sub_gdevent_dummy_data_settings')->attribute('innerHTML'); |
| 196 | - $this->assertTrue( is_int(strpos($html, 'Yes Delete Please!')), "Events Demo data not installed correctly"); |
|
| 196 | + $this->assertTrue(is_int(strpos($html, 'Yes Delete Please!')), "Events Demo data not installed correctly"); |
|
| 197 | 197 | |
| 198 | 198 | //set home page |
| 199 | 199 | $this->logInfo('Setting home page......'); |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $this->select($this->byId("page_on_front"))->selectOptionByLabel('GD Home page'); |
| 204 | 204 | $this->byId("submit")->click(); |
| 205 | 205 | $this->waitForPageLoadAndCheckForErrors(); |
| 206 | - $this->assertTrue( $this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 206 | + $this->assertTrue($this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 207 | 207 | |
| 208 | 208 | //Enable registration |
| 209 | 209 | $this->logInfo('Enabling registration......'); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $this->byId("users_can_register")->click(); |
| 213 | 213 | $this->byId("submit")->click(); |
| 214 | 214 | $this->waitForPageLoadAndCheckForErrors(); |
| 215 | - $this->assertTrue( $this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 215 | + $this->assertTrue($this->isTextPresent("Settings saved"), "'Settings saved' text not found"); |
|
| 216 | 216 | |
| 217 | 217 | //Permalinks |
| 218 | 218 | $this->logInfo('Setting permalinks......'); |
@@ -222,12 +222,12 @@ discard block |
||
| 222 | 222 | $this->byId("submit")->click(); |
| 223 | 223 | $this->waitForPageLoadAndCheckForErrors(); |
| 224 | 224 | // echo $this->source(); |
| 225 | - $this->assertTrue( $this->isTextPresent("Permalink structure updated"), "'Permalink structure updated' text not found"); |
|
| 225 | + $this->assertTrue($this->isTextPresent("Permalink structure updated"), "'Permalink structure updated' text not found"); |
|
| 226 | 226 | |
| 227 | 227 | //create and assign menu |
| 228 | 228 | $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/nav-menus.php'); |
| 229 | 229 | $this->waitForPageLoadAndCheckForErrors(); |
| 230 | - $this->assertTrue( $this->isTextPresent("Give your menu a name above, then click Create Menu."), "'Create Menu' text not found"); |
|
| 230 | + $this->assertTrue($this->isTextPresent("Give your menu a name above, then click Create Menu."), "'Create Menu' text not found"); |
|
| 231 | 231 | $this->logInfo('Creating new menu......'); |
| 232 | 232 | $this->byId('menu-name')->value('Primary'); |
| 233 | 233 | $this->byId('save_menu_header')->click(); |
@@ -235,12 +235,12 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | $this->url(self::GDTEST_BASE_URL.'wp-admin/nav-menus.php'); |
| 237 | 237 | $this->waitForPageLoadAndCheckForErrors(); |
| 238 | - $this->assertTrue( $this->isTextPresent("Add menu items from the column on the left"), "'Add menu items from the column on the left' text not found"); |
|
| 238 | + $this->assertTrue($this->isTextPresent("Add menu items from the column on the left"), "'Add menu items from the column on the left' text not found"); |
|
| 239 | 239 | $this->logInfo('Setting menu location......'); |
| 240 | 240 | $this->byId('locations-main-nav')->click(); |
| 241 | 241 | $this->byId('save_menu_header')->click(); |
| 242 | 242 | $this->waitForPageLoadAndCheckForErrors(); |
| 243 | - $this->assertTrue( $this->isTextPresent("<strong>Primary</strong> has been updated"), "'Primary has been updated' text not found"); |
|
| 243 | + $this->assertTrue($this->isTextPresent("<strong>Primary</strong> has been updated"), "'Primary has been updated' text not found"); |
|
| 244 | 244 | |
| 245 | 245 | // Assign menu |
| 246 | 246 | $this->logInfo('Assigning menu......'); |
@@ -1,79 +1,79 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class Stripe extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testStripe() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Testing stripe......'); |
|
| 20 | - //make sure Stripe payment plugin active |
|
| 21 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 22 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 17 | + public function testStripe() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Testing stripe......'); |
|
| 20 | + //make sure Stripe payment plugin active |
|
| 21 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 22 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 23 | 23 | |
| 24 | - $is_active = $this->byId("stripe-payment-geodirectory-add-on")->attribute('class'); |
|
| 25 | - if (is_int(strpos($is_active, 'inactive'))) { |
|
| 26 | - //Activate Geodirectory stripe payment geodirectory add on |
|
| 27 | - $this->maybeActivatePlugin("stripe-payment-geodirectory-add-on", 20000); |
|
| 28 | - //go back to plugin page |
|
| 29 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 30 | - } |
|
| 24 | + $is_active = $this->byId("stripe-payment-geodirectory-add-on")->attribute('class'); |
|
| 25 | + if (is_int(strpos($is_active, 'inactive'))) { |
|
| 26 | + //Activate Geodirectory stripe payment geodirectory add on |
|
| 27 | + $this->maybeActivatePlugin("stripe-payment-geodirectory-add-on", 20000); |
|
| 28 | + //go back to plugin page |
|
| 29 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - $is_active1 = $this->byId("stripe-payment-geodirectory-add-on")->attribute('class'); |
|
| 33 | - $this->assertFalse( strpos($is_active1, 'inactive'), "stripe payment geodirectory add on plugin not active"); |
|
| 32 | + $is_active1 = $this->byId("stripe-payment-geodirectory-add-on")->attribute('class'); |
|
| 33 | + $this->assertFalse( strpos($is_active1, 'inactive'), "stripe payment geodirectory add on plugin not active"); |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_options'); |
|
| 37 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 36 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_options'); |
|
| 37 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 38 | 38 | |
| 39 | - $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place'); |
|
| 40 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 41 | - $this->byClassName('geodir-upgrade')->click(); |
|
| 42 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 43 | - $this->byXPath("(//div[@class='geodir_package']/input[@type='radio'])[2]")->click(); |
|
| 44 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 45 | - if ($this->isTextPresent("Business Owner/Associate")) { |
|
| 39 | + $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place'); |
|
| 40 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 41 | + $this->byClassName('geodir-upgrade')->click(); |
|
| 42 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 43 | + $this->byXPath("(//div[@class='geodir_package']/input[@type='radio'])[2]")->click(); |
|
| 44 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 45 | + if ($this->isTextPresent("Business Owner/Associate")) { |
|
| 46 | 46 | // $elements = $this->elements($this->using('name')->value('claimed')); |
| 47 | 47 | // $elements[0]->click(); |
| 48 | 48 | // $this->byXPath("//input[contains(@name,'claimed') and contains(@value,'0')]")->click(); |
| 49 | - $this->ExecuteScript('jQuery("#geodir_claimed_row input:radio:first").prop("checked", true).trigger("click");'); |
|
| 50 | - } |
|
| 51 | - $this->byId('geodir_accept_term_condition')->click(); |
|
| 52 | - $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click(); |
|
| 53 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 54 | - $this->byXPath("//input[@name='Submit and Pay']")->click(); |
|
| 55 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 56 | - $this->ExecuteScript('jQuery("#gd_pmethod_stripe").prop("checked", true).trigger("click");'); |
|
| 57 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 58 | - $this->byId('gd_checkout_paynow')->click(); |
|
| 49 | + $this->ExecuteScript('jQuery("#geodir_claimed_row input:radio:first").prop("checked", true).trigger("click");'); |
|
| 50 | + } |
|
| 51 | + $this->byId('geodir_accept_term_condition')->click(); |
|
| 52 | + $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click(); |
|
| 53 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 54 | + $this->byXPath("//input[@name='Submit and Pay']")->click(); |
|
| 55 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 56 | + $this->ExecuteScript('jQuery("#gd_pmethod_stripe").prop("checked", true).trigger("click");'); |
|
| 57 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 58 | + $this->byId('gd_checkout_paynow')->click(); |
|
| 59 | 59 | // $this->waitForPageLoadAndCheckForErrors(); |
| 60 | 60 | // $this->byId('email')->value('[email protected]'); |
| 61 | 61 | // $this->byId('card_number')->value('4242424242424242'); |
| 62 | 62 | // $this->byId('cc-exp')->value('12 / 20'); |
| 63 | 63 | // $this->byId('cc-csc')->value('333'); |
| 64 | 64 | // $this->byId('submitButton')->click(); |
| 65 | - $this->logInfo('Skipping stripe payment since cross-site scripting not possible......'); |
|
| 66 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 67 | - } |
|
| 65 | + $this->logInfo('Skipping stripe payment since cross-site scripting not possible......'); |
|
| 66 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - public function tearDown() |
|
| 70 | - { |
|
| 71 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 72 | - //write current file number to completed.txt |
|
| 73 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 74 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 75 | - fwrite($completed, $CurrentFileNumber); |
|
| 76 | - } |
|
| 77 | - } |
|
| 69 | + public function tearDown() |
|
| 70 | + { |
|
| 71 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 72 | + //write current file number to completed.txt |
|
| 73 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 74 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 75 | + fwrite($completed, $CurrentFileNumber); |
|
| 76 | + } |
|
| 77 | + } |
|
| 78 | 78 | } |
| 79 | 79 | ?> |
| 80 | 80 | \ No newline at end of file |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $is_active1 = $this->byId("stripe-payment-geodirectory-add-on")->attribute('class'); |
| 33 | - $this->assertFalse( strpos($is_active1, 'inactive'), "stripe payment geodirectory add on plugin not active"); |
|
| 33 | + $this->assertFalse(strpos($is_active1, 'inactive'), "stripe payment geodirectory add on plugin not active"); |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_options'); |
@@ -1,45 +1,45 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class LoginUser extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testLogin() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Logging in new user......'); |
|
| 20 | - $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1'); |
|
| 21 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | - $this->assertTrue( $this->isTextPresent("Sign In"), "No text found"); |
|
| 23 | - $this->byId('user_login')->value('[email protected]'); |
|
| 24 | - $this->byId('user_pass')->value('1'); |
|
| 17 | + public function testLogin() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Logging in new user......'); |
|
| 20 | + $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1'); |
|
| 21 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | + $this->assertTrue( $this->isTextPresent("Sign In"), "No text found"); |
|
| 23 | + $this->byId('user_login')->value('[email protected]'); |
|
| 24 | + $this->byId('user_pass')->value('1'); |
|
| 25 | 25 | // $this->byId('rememberme')->click(); |
| 26 | - // Submit the form |
|
| 27 | - $this->byId('cus_loginform')->submit(); |
|
| 28 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 29 | - $this->assertFalse( $this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password."); |
|
| 30 | - $this->assertTrue( $this->isTextPresent("Add Listing"), "Add Listing text not found"); |
|
| 26 | + // Submit the form |
|
| 27 | + $this->byId('cus_loginform')->submit(); |
|
| 28 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 29 | + $this->assertFalse( $this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password."); |
|
| 30 | + $this->assertTrue( $this->isTextPresent("Add Listing"), "Add Listing text not found"); |
|
| 31 | 31 | |
| 32 | - } |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - public function tearDown() |
|
| 35 | - { |
|
| 36 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 37 | - //write current file number to completed.txt |
|
| 38 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 39 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 40 | - fwrite($completed, $CurrentFileNumber); |
|
| 41 | - } |
|
| 42 | - } |
|
| 34 | + public function tearDown() |
|
| 35 | + { |
|
| 36 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 37 | + //write current file number to completed.txt |
|
| 38 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 39 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 40 | + fwrite($completed, $CurrentFileNumber); |
|
| 41 | + } |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | 44 | } |
| 45 | 45 | ?> |
| 46 | 46 | \ No newline at end of file |
@@ -19,15 +19,15 @@ |
||
| 19 | 19 | $this->logInfo('Logging in new user......'); |
| 20 | 20 | $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1'); |
| 21 | 21 | $this->waitForPageLoadAndCheckForErrors(); |
| 22 | - $this->assertTrue( $this->isTextPresent("Sign In"), "No text found"); |
|
| 22 | + $this->assertTrue($this->isTextPresent("Sign In"), "No text found"); |
|
| 23 | 23 | $this->byId('user_login')->value('[email protected]'); |
| 24 | 24 | $this->byId('user_pass')->value('1'); |
| 25 | 25 | // $this->byId('rememberme')->click(); |
| 26 | 26 | // Submit the form |
| 27 | 27 | $this->byId('cus_loginform')->submit(); |
| 28 | 28 | $this->waitForPageLoadAndCheckForErrors(); |
| 29 | - $this->assertFalse( $this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password."); |
|
| 30 | - $this->assertTrue( $this->isTextPresent("Add Listing"), "Add Listing text not found"); |
|
| 29 | + $this->assertFalse($this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password."); |
|
| 30 | + $this->assertTrue($this->isTextPresent("Add Listing"), "Add Listing text not found"); |
|
| 31 | 31 | |
| 32 | 32 | } |
| 33 | 33 | |
@@ -1,194 +1,194 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class ReCaptcha extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - |
|
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 16 | - |
|
| 17 | - public function testReCaptcha() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Testing recaptcha......'); |
|
| 20 | - //make sure ReCaptcha plugin active |
|
| 21 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 22 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 23 | - |
|
| 24 | - $is_active = $this->byId("geodirectory-re-captcha")->attribute('class'); |
|
| 25 | - if (is_int(strpos($is_active, 'inactive'))) { |
|
| 26 | - //Activate Geodirectory ReCaptcha |
|
| 27 | - $this->maybeActivatePlugin("geodirectory-re-captcha", 20000); |
|
| 28 | - //go back to plugin page |
|
| 29 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 30 | - } |
|
| 31 | - |
|
| 32 | - $is_active1 = $this->byId("geodirectory-re-captcha")->attribute('class'); |
|
| 33 | - $this->assertFalse( strpos($is_active1, 'inactive'), "ReCaptcha plugin not active"); |
|
| 34 | - |
|
| 35 | - //make sure BuddyPress core plugin active |
|
| 36 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 37 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 38 | - |
|
| 39 | - $is_active = $this->byId("buddypress")->attribute('class'); |
|
| 40 | - if (is_int(strpos($is_active, 'inactive'))) { |
|
| 41 | - //Activate Geodirectory buddypress |
|
| 42 | - $this->maybeActivatePlugin("buddypress", 20000); |
|
| 43 | - //go back to plugin page |
|
| 44 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 45 | - } |
|
| 46 | - |
|
| 47 | - $is_active1 = $this->byId("buddypress")->attribute('class'); |
|
| 48 | - $this->assertFalse( strpos($is_active1, 'inactive'), "buddypress plugin not active"); |
|
| 49 | - |
|
| 50 | - //make sure BuddyPress Integration plugin active |
|
| 51 | - $is_active = $this->byId("geodirectory-buddypress-integration")->attribute('class'); |
|
| 52 | - if (is_int(strpos($is_active, 'inactive'))) { |
|
| 53 | - //Activate Geodirectory buddypress integration |
|
| 54 | - $this->maybeActivatePlugin("geodirectory-buddypress-integration", 20000); |
|
| 55 | - //go back to plugin page |
|
| 56 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 57 | - } |
|
| 58 | - |
|
| 59 | - $is_active1 = $this->byId("geodirectory-buddypress-integration")->attribute('class'); |
|
| 60 | - $this->assertFalse( strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active"); |
|
| 61 | - |
|
| 62 | - |
|
| 63 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_recaptcha&subtab=gdcaptcha_settings'); |
|
| 64 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 65 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 66 | - |
|
| 67 | - $stop_script = false; |
|
| 68 | - |
|
| 69 | - $public_key = getenv( 'GOOGLE_RECAPTCHA_KEY' ); |
|
| 70 | - $private_key = getenv( 'GOOGLE_RECAPTCHA_SECRET' ); |
|
| 71 | - |
|
| 72 | - if (!$public_key) { |
|
| 73 | - $this->logError("ENV variable GOOGLE_RECAPTCHA_KEY not available"); |
|
| 74 | - $stop_script = true; |
|
| 75 | - } |
|
| 76 | - |
|
| 77 | - if (!$private_key) { |
|
| 78 | - $this->logError("ENV variable GOOGLE_RECAPTCHA_KEY not available"); |
|
| 79 | - $stop_script = true; |
|
| 80 | - } |
|
| 81 | - |
|
| 82 | - if($stop_script) { |
|
| 83 | - $this->logInfo("Stopping the script. Please fix the errors to continue"); |
|
| 84 | - return; |
|
| 85 | - } |
|
| 86 | - |
|
| 87 | - $value = $this->byId('geodir_recaptcha_site_key')->value(); |
|
| 88 | - if (empty($value)) { |
|
| 89 | - $this->byId('geodir_recaptcha_site_key')->value($public_key); |
|
| 90 | - } |
|
| 91 | - |
|
| 92 | - $value = $this->byId('geodir_recaptcha_secret_key')->value(); |
|
| 93 | - if (empty($value)) { |
|
| 94 | - $this->byId('geodir_recaptcha_secret_key')->value($private_key); |
|
| 95 | - } |
|
| 96 | - |
|
| 97 | - |
|
| 98 | - $to_save = false; |
|
| 99 | - |
|
| 100 | - $options = array( |
|
| 101 | - 'geodir_recaptcha_registration', |
|
| 102 | - 'geodir_recaptcha_add_listing', |
|
| 103 | - 'geodir_recaptcha_claim_listing', |
|
| 104 | - 'geodir_recaptcha_comments', |
|
| 105 | - 'geodir_recaptcha_send_to_friend', |
|
| 106 | - 'geodir_recaptcha_send_enquery', |
|
| 107 | - 'geodir_recaptcha_buddypress' |
|
| 108 | - ); |
|
| 109 | - |
|
| 110 | - foreach ($options as $option) { |
|
| 111 | - $is_checked = $this->byId($option)->attribute('checked'); |
|
| 112 | - if (!$is_checked) { |
|
| 113 | - $this->byId($option)->click(); |
|
| 114 | - $to_save = true; |
|
| 115 | - } |
|
| 116 | - } |
|
| 117 | - |
|
| 118 | - if ($to_save) { |
|
| 119 | - $this->byName('save')->click(); |
|
| 120 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 121 | - } |
|
| 122 | - |
|
| 123 | - $this->maybeLogout(); |
|
| 124 | - //Signup |
|
| 125 | - $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1'); |
|
| 126 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 127 | - $this->assertTrue( $this->isTextPresent("Sign Up Now"), "Not in signup page"); |
|
| 128 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 129 | - $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 130 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in signup page"); |
|
| 131 | - |
|
| 132 | - //Add Listing |
|
| 133 | - $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place'); |
|
| 134 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 135 | - if ($this->isTextPresent("Sign In")) { |
|
| 136 | - $this->byId('user_login')->value('[email protected]'); |
|
| 137 | - $this->byId('user_pass')->value('1'); |
|
| 138 | - $this->byId('rememberme')->click(); |
|
| 139 | - // Submit the form |
|
| 140 | - $this->byId('cus_loginform')->submit(); |
|
| 141 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 142 | - $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place'); |
|
| 143 | - } |
|
| 144 | - $this->assertTrue( $this->isTextPresent("Add Place"), "Not in Add Listing page"); |
|
| 145 | - $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 146 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Add Listing page"); |
|
| 147 | - |
|
| 148 | - //claim |
|
| 149 | - $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 150 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 151 | - $this->byId('gd-claim-button')->click(); |
|
| 152 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 153 | - $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 154 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in claim form"); |
|
| 155 | - |
|
| 156 | - //reviews |
|
| 157 | - $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 158 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 159 | - $this->byLinkText('Reviews')->click(); |
|
| 160 | - $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 161 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in reviews form"); |
|
| 162 | - |
|
| 163 | - //send enquiry |
|
| 164 | - $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 165 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 166 | - $this->byClassName('b_send_inquiry')->click(); |
|
| 167 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 168 | - $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 169 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send Enquiry form"); |
|
| 170 | - |
|
| 171 | - //send to friend |
|
| 172 | - $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 173 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 174 | - $this->byClassName('b_sendtofriend')->click(); |
|
| 175 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 176 | - $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 177 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send To Friend form"); |
|
| 178 | - |
|
| 179 | - //buddypress |
|
| 180 | - //Todo: assert buddypress page |
|
| 181 | - |
|
| 182 | - } |
|
| 183 | - |
|
| 184 | - public function tearDown() |
|
| 185 | - { |
|
| 186 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 187 | - //write current file number to completed.txt |
|
| 188 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 189 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 190 | - fwrite($completed, $CurrentFileNumber); |
|
| 191 | - } |
|
| 192 | - } |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | + |
|
| 17 | + public function testReCaptcha() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Testing recaptcha......'); |
|
| 20 | + //make sure ReCaptcha plugin active |
|
| 21 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 22 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 23 | + |
|
| 24 | + $is_active = $this->byId("geodirectory-re-captcha")->attribute('class'); |
|
| 25 | + if (is_int(strpos($is_active, 'inactive'))) { |
|
| 26 | + //Activate Geodirectory ReCaptcha |
|
| 27 | + $this->maybeActivatePlugin("geodirectory-re-captcha", 20000); |
|
| 28 | + //go back to plugin page |
|
| 29 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 30 | + } |
|
| 31 | + |
|
| 32 | + $is_active1 = $this->byId("geodirectory-re-captcha")->attribute('class'); |
|
| 33 | + $this->assertFalse( strpos($is_active1, 'inactive'), "ReCaptcha plugin not active"); |
|
| 34 | + |
|
| 35 | + //make sure BuddyPress core plugin active |
|
| 36 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 37 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 38 | + |
|
| 39 | + $is_active = $this->byId("buddypress")->attribute('class'); |
|
| 40 | + if (is_int(strpos($is_active, 'inactive'))) { |
|
| 41 | + //Activate Geodirectory buddypress |
|
| 42 | + $this->maybeActivatePlugin("buddypress", 20000); |
|
| 43 | + //go back to plugin page |
|
| 44 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 45 | + } |
|
| 46 | + |
|
| 47 | + $is_active1 = $this->byId("buddypress")->attribute('class'); |
|
| 48 | + $this->assertFalse( strpos($is_active1, 'inactive'), "buddypress plugin not active"); |
|
| 49 | + |
|
| 50 | + //make sure BuddyPress Integration plugin active |
|
| 51 | + $is_active = $this->byId("geodirectory-buddypress-integration")->attribute('class'); |
|
| 52 | + if (is_int(strpos($is_active, 'inactive'))) { |
|
| 53 | + //Activate Geodirectory buddypress integration |
|
| 54 | + $this->maybeActivatePlugin("geodirectory-buddypress-integration", 20000); |
|
| 55 | + //go back to plugin page |
|
| 56 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 57 | + } |
|
| 58 | + |
|
| 59 | + $is_active1 = $this->byId("geodirectory-buddypress-integration")->attribute('class'); |
|
| 60 | + $this->assertFalse( strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active"); |
|
| 61 | + |
|
| 62 | + |
|
| 63 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_recaptcha&subtab=gdcaptcha_settings'); |
|
| 64 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 65 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 66 | + |
|
| 67 | + $stop_script = false; |
|
| 68 | + |
|
| 69 | + $public_key = getenv( 'GOOGLE_RECAPTCHA_KEY' ); |
|
| 70 | + $private_key = getenv( 'GOOGLE_RECAPTCHA_SECRET' ); |
|
| 71 | + |
|
| 72 | + if (!$public_key) { |
|
| 73 | + $this->logError("ENV variable GOOGLE_RECAPTCHA_KEY not available"); |
|
| 74 | + $stop_script = true; |
|
| 75 | + } |
|
| 76 | + |
|
| 77 | + if (!$private_key) { |
|
| 78 | + $this->logError("ENV variable GOOGLE_RECAPTCHA_KEY not available"); |
|
| 79 | + $stop_script = true; |
|
| 80 | + } |
|
| 81 | + |
|
| 82 | + if($stop_script) { |
|
| 83 | + $this->logInfo("Stopping the script. Please fix the errors to continue"); |
|
| 84 | + return; |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + $value = $this->byId('geodir_recaptcha_site_key')->value(); |
|
| 88 | + if (empty($value)) { |
|
| 89 | + $this->byId('geodir_recaptcha_site_key')->value($public_key); |
|
| 90 | + } |
|
| 91 | + |
|
| 92 | + $value = $this->byId('geodir_recaptcha_secret_key')->value(); |
|
| 93 | + if (empty($value)) { |
|
| 94 | + $this->byId('geodir_recaptcha_secret_key')->value($private_key); |
|
| 95 | + } |
|
| 96 | + |
|
| 97 | + |
|
| 98 | + $to_save = false; |
|
| 99 | + |
|
| 100 | + $options = array( |
|
| 101 | + 'geodir_recaptcha_registration', |
|
| 102 | + 'geodir_recaptcha_add_listing', |
|
| 103 | + 'geodir_recaptcha_claim_listing', |
|
| 104 | + 'geodir_recaptcha_comments', |
|
| 105 | + 'geodir_recaptcha_send_to_friend', |
|
| 106 | + 'geodir_recaptcha_send_enquery', |
|
| 107 | + 'geodir_recaptcha_buddypress' |
|
| 108 | + ); |
|
| 109 | + |
|
| 110 | + foreach ($options as $option) { |
|
| 111 | + $is_checked = $this->byId($option)->attribute('checked'); |
|
| 112 | + if (!$is_checked) { |
|
| 113 | + $this->byId($option)->click(); |
|
| 114 | + $to_save = true; |
|
| 115 | + } |
|
| 116 | + } |
|
| 117 | + |
|
| 118 | + if ($to_save) { |
|
| 119 | + $this->byName('save')->click(); |
|
| 120 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 121 | + } |
|
| 122 | + |
|
| 123 | + $this->maybeLogout(); |
|
| 124 | + //Signup |
|
| 125 | + $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1'); |
|
| 126 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 127 | + $this->assertTrue( $this->isTextPresent("Sign Up Now"), "Not in signup page"); |
|
| 128 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 129 | + $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 130 | + $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in signup page"); |
|
| 131 | + |
|
| 132 | + //Add Listing |
|
| 133 | + $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place'); |
|
| 134 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 135 | + if ($this->isTextPresent("Sign In")) { |
|
| 136 | + $this->byId('user_login')->value('[email protected]'); |
|
| 137 | + $this->byId('user_pass')->value('1'); |
|
| 138 | + $this->byId('rememberme')->click(); |
|
| 139 | + // Submit the form |
|
| 140 | + $this->byId('cus_loginform')->submit(); |
|
| 141 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 142 | + $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place'); |
|
| 143 | + } |
|
| 144 | + $this->assertTrue( $this->isTextPresent("Add Place"), "Not in Add Listing page"); |
|
| 145 | + $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 146 | + $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Add Listing page"); |
|
| 147 | + |
|
| 148 | + //claim |
|
| 149 | + $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 150 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 151 | + $this->byId('gd-claim-button')->click(); |
|
| 152 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 153 | + $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 154 | + $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in claim form"); |
|
| 155 | + |
|
| 156 | + //reviews |
|
| 157 | + $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 158 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 159 | + $this->byLinkText('Reviews')->click(); |
|
| 160 | + $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 161 | + $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in reviews form"); |
|
| 162 | + |
|
| 163 | + //send enquiry |
|
| 164 | + $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 165 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 166 | + $this->byClassName('b_send_inquiry')->click(); |
|
| 167 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 168 | + $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 169 | + $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send Enquiry form"); |
|
| 170 | + |
|
| 171 | + //send to friend |
|
| 172 | + $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
|
| 173 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 174 | + $this->byClassName('b_sendtofriend')->click(); |
|
| 175 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 176 | + $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
|
| 177 | + $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send To Friend form"); |
|
| 178 | + |
|
| 179 | + //buddypress |
|
| 180 | + //Todo: assert buddypress page |
|
| 181 | + |
|
| 182 | + } |
|
| 183 | + |
|
| 184 | + public function tearDown() |
|
| 185 | + { |
|
| 186 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 187 | + //write current file number to completed.txt |
|
| 188 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 189 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 190 | + fwrite($completed, $CurrentFileNumber); |
|
| 191 | + } |
|
| 192 | + } |
|
| 193 | 193 | } |
| 194 | 194 | ?> |
| 195 | 195 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $is_active1 = $this->byId("geodirectory-re-captcha")->attribute('class'); |
| 33 | - $this->assertFalse( strpos($is_active1, 'inactive'), "ReCaptcha plugin not active"); |
|
| 33 | + $this->assertFalse(strpos($is_active1, 'inactive'), "ReCaptcha plugin not active"); |
|
| 34 | 34 | |
| 35 | 35 | //make sure BuddyPress core plugin active |
| 36 | 36 | $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $is_active1 = $this->byId("buddypress")->attribute('class'); |
| 48 | - $this->assertFalse( strpos($is_active1, 'inactive'), "buddypress plugin not active"); |
|
| 48 | + $this->assertFalse(strpos($is_active1, 'inactive'), "buddypress plugin not active"); |
|
| 49 | 49 | |
| 50 | 50 | //make sure BuddyPress Integration plugin active |
| 51 | 51 | $is_active = $this->byId("geodirectory-buddypress-integration")->attribute('class'); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | $is_active1 = $this->byId("geodirectory-buddypress-integration")->attribute('class'); |
| 60 | - $this->assertFalse( strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active"); |
|
| 60 | + $this->assertFalse(strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active"); |
|
| 61 | 61 | |
| 62 | 62 | |
| 63 | 63 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_recaptcha&subtab=gdcaptcha_settings'); |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $stop_script = false; |
| 68 | 68 | |
| 69 | - $public_key = getenv( 'GOOGLE_RECAPTCHA_KEY' ); |
|
| 70 | - $private_key = getenv( 'GOOGLE_RECAPTCHA_SECRET' ); |
|
| 69 | + $public_key = getenv('GOOGLE_RECAPTCHA_KEY'); |
|
| 70 | + $private_key = getenv('GOOGLE_RECAPTCHA_SECRET'); |
|
| 71 | 71 | |
| 72 | 72 | if (!$public_key) { |
| 73 | 73 | $this->logError("ENV variable GOOGLE_RECAPTCHA_KEY not available"); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $stop_script = true; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if($stop_script) { |
|
| 82 | + if ($stop_script) { |
|
| 83 | 83 | $this->logInfo("Stopping the script. Please fix the errors to continue"); |
| 84 | 84 | return; |
| 85 | 85 | } |
@@ -124,10 +124,10 @@ discard block |
||
| 124 | 124 | //Signup |
| 125 | 125 | $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1'); |
| 126 | 126 | $this->waitForPageLoadAndCheckForErrors(); |
| 127 | - $this->assertTrue( $this->isTextPresent("Sign Up Now"), "Not in signup page"); |
|
| 127 | + $this->assertTrue($this->isTextPresent("Sign Up Now"), "Not in signup page"); |
|
| 128 | 128 | $this->waitForPageLoadAndCheckForErrors(); |
| 129 | 129 | $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
| 130 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in signup page"); |
|
| 130 | + $this->assertTrue($this->isTextPresent("I'm not a robot"), "Recaptcha field not found in signup page"); |
|
| 131 | 131 | |
| 132 | 132 | //Add Listing |
| 133 | 133 | $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place'); |
@@ -141,9 +141,9 @@ discard block |
||
| 141 | 141 | $this->waitForPageLoadAndCheckForErrors(); |
| 142 | 142 | $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place'); |
| 143 | 143 | } |
| 144 | - $this->assertTrue( $this->isTextPresent("Add Place"), "Not in Add Listing page"); |
|
| 144 | + $this->assertTrue($this->isTextPresent("Add Place"), "Not in Add Listing page"); |
|
| 145 | 145 | $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
| 146 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Add Listing page"); |
|
| 146 | + $this->assertTrue($this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Add Listing page"); |
|
| 147 | 147 | |
| 148 | 148 | //claim |
| 149 | 149 | $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
@@ -151,14 +151,14 @@ discard block |
||
| 151 | 151 | $this->byId('gd-claim-button')->click(); |
| 152 | 152 | $this->waitForPageLoadAndCheckForErrors(); |
| 153 | 153 | $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
| 154 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in claim form"); |
|
| 154 | + $this->assertTrue($this->isTextPresent("I'm not a robot"), "Recaptcha field not found in claim form"); |
|
| 155 | 155 | |
| 156 | 156 | //reviews |
| 157 | 157 | $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
| 158 | 158 | $this->waitForPageLoadAndCheckForErrors(); |
| 159 | 159 | $this->byLinkText('Reviews')->click(); |
| 160 | 160 | $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
| 161 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in reviews form"); |
|
| 161 | + $this->assertTrue($this->isTextPresent("I'm not a robot"), "Recaptcha field not found in reviews form"); |
|
| 162 | 162 | |
| 163 | 163 | //send enquiry |
| 164 | 164 | $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $this->byClassName('b_send_inquiry')->click(); |
| 167 | 167 | $this->waitForPageLoadAndCheckForErrors(); |
| 168 | 168 | $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
| 169 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send Enquiry form"); |
|
| 169 | + $this->assertTrue($this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send Enquiry form"); |
|
| 170 | 170 | |
| 171 | 171 | //send to friend |
| 172 | 172 | $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/'); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $this->byClassName('b_sendtofriend')->click(); |
| 175 | 175 | $this->waitForPageLoadAndCheckForErrors(); |
| 176 | 176 | $this->frame($this->byXPath("//div[@class='gd-captcha-render']//iframe")); |
| 177 | - $this->assertTrue( $this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send To Friend form"); |
|
| 177 | + $this->assertTrue($this->isTextPresent("I'm not a robot"), "Recaptcha field not found in Send To Friend form"); |
|
| 178 | 178 | |
| 179 | 179 | //buddypress |
| 180 | 180 | //Todo: assert buddypress page |
@@ -1,63 +1,63 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class EditListing extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testEditListing() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Editing GD Place listing as user......'); |
|
| 20 | - $this->maybeUserLogin(self::GDTEST_BASE_URL.'author/test-user/?geodir_dashbord=true&stype=gd_place', true); |
|
| 21 | - $this->assertTrue( $this->isTextPresent("Places by"), "'Places by' text not found"); |
|
| 22 | - $this->byClassName('geodir-edit')->click(); |
|
| 23 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | - $this->assertTrue( $this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 25 | - $this->byId('post_desc')->value('Test Desc modified'); |
|
| 26 | - $this->byId('geodir_accept_term_condition')->click(); |
|
| 27 | - // Submit the form |
|
| 28 | - $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click(); |
|
| 29 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 30 | - $this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page."); |
|
| 31 | - // Submit the form |
|
| 32 | - $this->byClassName('geodir_publish_button')->click(); |
|
| 33 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 34 | - $this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page"); |
|
| 35 | - $this->maybeLogout(); |
|
| 36 | - } |
|
| 17 | + public function testEditListing() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Editing GD Place listing as user......'); |
|
| 20 | + $this->maybeUserLogin(self::GDTEST_BASE_URL.'author/test-user/?geodir_dashbord=true&stype=gd_place', true); |
|
| 21 | + $this->assertTrue( $this->isTextPresent("Places by"), "'Places by' text not found"); |
|
| 22 | + $this->byClassName('geodir-edit')->click(); |
|
| 23 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | + $this->assertTrue( $this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 25 | + $this->byId('post_desc')->value('Test Desc modified'); |
|
| 26 | + $this->byId('geodir_accept_term_condition')->click(); |
|
| 27 | + // Submit the form |
|
| 28 | + $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click(); |
|
| 29 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 30 | + $this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page."); |
|
| 31 | + // Submit the form |
|
| 32 | + $this->byClassName('geodir_publish_button')->click(); |
|
| 33 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 34 | + $this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page"); |
|
| 35 | + $this->maybeLogout(); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - public function testEditAdminListing() |
|
| 39 | - { |
|
| 40 | - $this->logInfo('Editing GD Place listing as admin......'); |
|
| 41 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/edit.php?post_type=gd_place'); |
|
| 42 | - $this->assertTrue( $this->isTextPresent("post-type-gd_place"), "Not in Places post type"); |
|
| 43 | - $this->byLinkText("Test Listing")->click(); |
|
| 44 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 45 | - $this->assertTrue( $this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 46 | - $this->byId('title')->value('Test Listing modified'); |
|
| 47 | - // Submit the form |
|
| 48 | - $this->byId('publish')->click(); |
|
| 49 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 50 | - $this->assertTrue( $this->isTextPresent("Place updated."), "updated text not found."); |
|
| 51 | - } |
|
| 38 | + public function testEditAdminListing() |
|
| 39 | + { |
|
| 40 | + $this->logInfo('Editing GD Place listing as admin......'); |
|
| 41 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/edit.php?post_type=gd_place'); |
|
| 42 | + $this->assertTrue( $this->isTextPresent("post-type-gd_place"), "Not in Places post type"); |
|
| 43 | + $this->byLinkText("Test Listing")->click(); |
|
| 44 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 45 | + $this->assertTrue( $this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 46 | + $this->byId('title')->value('Test Listing modified'); |
|
| 47 | + // Submit the form |
|
| 48 | + $this->byId('publish')->click(); |
|
| 49 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 50 | + $this->assertTrue( $this->isTextPresent("Place updated."), "updated text not found."); |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - public function tearDown() |
|
| 54 | - { |
|
| 55 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 56 | - //write current file number to completed.txt |
|
| 57 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 58 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 59 | - fwrite($completed, $CurrentFileNumber); |
|
| 60 | - } |
|
| 61 | - } |
|
| 53 | + public function tearDown() |
|
| 54 | + { |
|
| 55 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 56 | + //write current file number to completed.txt |
|
| 57 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 58 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 59 | + fwrite($completed, $CurrentFileNumber); |
|
| 60 | + } |
|
| 61 | + } |
|
| 62 | 62 | } |
| 63 | 63 | ?> |
| 64 | 64 | \ No newline at end of file |
@@ -18,20 +18,20 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | $this->logInfo('Editing GD Place listing as user......'); |
| 20 | 20 | $this->maybeUserLogin(self::GDTEST_BASE_URL.'author/test-user/?geodir_dashbord=true&stype=gd_place', true); |
| 21 | - $this->assertTrue( $this->isTextPresent("Places by"), "'Places by' text not found"); |
|
| 21 | + $this->assertTrue($this->isTextPresent("Places by"), "'Places by' text not found"); |
|
| 22 | 22 | $this->byClassName('geodir-edit')->click(); |
| 23 | 23 | $this->waitForPageLoadAndCheckForErrors(); |
| 24 | - $this->assertTrue( $this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 24 | + $this->assertTrue($this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 25 | 25 | $this->byId('post_desc')->value('Test Desc modified'); |
| 26 | 26 | $this->byId('geodir_accept_term_condition')->click(); |
| 27 | 27 | // Submit the form |
| 28 | 28 | $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click(); |
| 29 | 29 | $this->waitForPageLoadAndCheckForErrors(); |
| 30 | - $this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page."); |
|
| 30 | + $this->assertTrue($this->isTextPresent("This is a preview of your listing"), "Not in preview page."); |
|
| 31 | 31 | // Submit the form |
| 32 | 32 | $this->byClassName('geodir_publish_button')->click(); |
| 33 | 33 | $this->waitForPageLoadAndCheckForErrors(); |
| 34 | - $this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page"); |
|
| 34 | + $this->assertTrue($this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page"); |
|
| 35 | 35 | $this->maybeLogout(); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -39,15 +39,15 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $this->logInfo('Editing GD Place listing as admin......'); |
| 41 | 41 | $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/edit.php?post_type=gd_place'); |
| 42 | - $this->assertTrue( $this->isTextPresent("post-type-gd_place"), "Not in Places post type"); |
|
| 42 | + $this->assertTrue($this->isTextPresent("post-type-gd_place"), "Not in Places post type"); |
|
| 43 | 43 | $this->byLinkText("Test Listing")->click(); |
| 44 | 44 | $this->waitForPageLoadAndCheckForErrors(); |
| 45 | - $this->assertTrue( $this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 45 | + $this->assertTrue($this->isTextPresent("Edit Place"), "Edit Place text not found"); |
|
| 46 | 46 | $this->byId('title')->value('Test Listing modified'); |
| 47 | 47 | // Submit the form |
| 48 | 48 | $this->byId('publish')->click(); |
| 49 | 49 | $this->waitForPageLoadAndCheckForErrors(); |
| 50 | - $this->assertTrue( $this->isTextPresent("Place updated."), "updated text not found."); |
|
| 50 | + $this->assertTrue($this->isTextPresent("Place updated."), "updated text not found."); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | public function tearDown() |
@@ -44,9 +44,10 @@ |
||
| 44 | 44 | $wpdb->query( "DROP TABLE IF EXISTS $prefixed_table" ); |
| 45 | 45 | |
| 46 | 46 | // We need to create references to ms global tables. |
| 47 | - if ( $multisite ) |
|
| 48 | - $wpdb->{$table} = $prefixed_table; |
|
| 49 | -} |
|
| 47 | + if ( $multisite ) { |
|
| 48 | + $wpdb->{$table} = $prefixed_table; |
|
| 49 | + } |
|
| 50 | + } |
|
| 50 | 51 | |
| 51 | 52 | // Prefill a permalink structure so that WP doesn't try to determine one itself. |
| 52 | 53 | add_action( 'populate_options', '_set_default_permalink_structure_for_tests' ); |
@@ -4,14 +4,14 @@ discard block |
||
| 4 | 4 | * |
| 5 | 5 | * @todo Reuse the init/load code in init.php |
| 6 | 6 | */ |
| 7 | -error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT ); |
|
| 7 | +error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); |
|
| 8 | 8 | |
| 9 | 9 | $config_file_path = $argv[1]; |
| 10 | -$multisite = ! empty( $argv[2] ); |
|
| 10 | +$multisite = !empty($argv[2]); |
|
| 11 | 11 | |
| 12 | -define( 'WP_INSTALLING', true ); |
|
| 12 | +define('WP_INSTALLING', true); |
|
| 13 | 13 | require_once $config_file_path; |
| 14 | -require_once dirname( __FILE__ ) . '/functions.php'; |
|
| 14 | +require_once dirname(__FILE__).'/functions.php'; |
|
| 15 | 15 | |
| 16 | 16 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; |
| 17 | 17 | $_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN; |
@@ -21,53 +21,53 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | $PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php'; |
| 23 | 23 | |
| 24 | -require_once ABSPATH . '/wp-settings.php'; |
|
| 24 | +require_once ABSPATH.'/wp-settings.php'; |
|
| 25 | 25 | |
| 26 | -require_once ABSPATH . '/wp-admin/includes/upgrade.php'; |
|
| 27 | -require_once ABSPATH . '/wp-includes/wp-db.php'; |
|
| 26 | +require_once ABSPATH.'/wp-admin/includes/upgrade.php'; |
|
| 27 | +require_once ABSPATH.'/wp-includes/wp-db.php'; |
|
| 28 | 28 | |
| 29 | 29 | // Override the PHPMailer |
| 30 | 30 | global $phpmailer; |
| 31 | -require_once( dirname( __FILE__ ) . '/mock-mailer.php' ); |
|
| 31 | +require_once(dirname(__FILE__).'/mock-mailer.php'); |
|
| 32 | 32 | $phpmailer = new MockPHPMailer(); |
| 33 | 33 | |
| 34 | -$wpdb->query( 'SET storage_engine = INNODB' ); |
|
| 35 | -$wpdb->select( DB_NAME, $wpdb->dbh ); |
|
| 34 | +$wpdb->query('SET storage_engine = INNODB'); |
|
| 35 | +$wpdb->select(DB_NAME, $wpdb->dbh); |
|
| 36 | 36 | |
| 37 | -echo "Installing..." . PHP_EOL; |
|
| 37 | +echo "Installing...".PHP_EOL; |
|
| 38 | 38 | |
| 39 | -foreach ( $wpdb->tables() as $table => $prefixed_table ) { |
|
| 40 | - $wpdb->query( "DROP TABLE IF EXISTS $prefixed_table" ); |
|
| 39 | +foreach ($wpdb->tables() as $table => $prefixed_table) { |
|
| 40 | + $wpdb->query("DROP TABLE IF EXISTS $prefixed_table"); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) { |
|
| 44 | - $wpdb->query( "DROP TABLE IF EXISTS $prefixed_table" ); |
|
| 43 | +foreach ($wpdb->tables('ms_global') as $table => $prefixed_table) { |
|
| 44 | + $wpdb->query("DROP TABLE IF EXISTS $prefixed_table"); |
|
| 45 | 45 | |
| 46 | 46 | // We need to create references to ms global tables. |
| 47 | - if ( $multisite ) |
|
| 47 | + if ($multisite) |
|
| 48 | 48 | $wpdb->{$table} = $prefixed_table; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // Prefill a permalink structure so that WP doesn't try to determine one itself. |
| 52 | -add_action( 'populate_options', '_set_default_permalink_structure_for_tests' ); |
|
| 52 | +add_action('populate_options', '_set_default_permalink_structure_for_tests'); |
|
| 53 | 53 | |
| 54 | -wp_install( WP_TESTS_TITLE, 'admin', WP_TESTS_EMAIL, true, null, 'password' ); |
|
| 54 | +wp_install(WP_TESTS_TITLE, 'admin', WP_TESTS_EMAIL, true, null, 'password'); |
|
| 55 | 55 | |
| 56 | 56 | // Delete dummy permalink structure, as prefilled above. |
| 57 | -if ( ! is_multisite() ) { |
|
| 58 | - delete_option( 'permalink_structure' ); |
|
| 57 | +if (!is_multisite()) { |
|
| 58 | + delete_option('permalink_structure'); |
|
| 59 | 59 | } |
| 60 | -remove_action( 'populate_options', '_set_default_permalink_structure_for_tests' ); |
|
| 60 | +remove_action('populate_options', '_set_default_permalink_structure_for_tests'); |
|
| 61 | 61 | |
| 62 | -if ( $multisite ) { |
|
| 63 | - echo "Installing network..." . PHP_EOL; |
|
| 62 | +if ($multisite) { |
|
| 63 | + echo "Installing network...".PHP_EOL; |
|
| 64 | 64 | |
| 65 | - define( 'WP_INSTALLING_NETWORK', true ); |
|
| 65 | + define('WP_INSTALLING_NETWORK', true); |
|
| 66 | 66 | |
| 67 | - $title = WP_TESTS_TITLE . ' Network'; |
|
| 67 | + $title = WP_TESTS_TITLE.' Network'; |
|
| 68 | 68 | $subdomain_install = false; |
| 69 | 69 | |
| 70 | 70 | install_network(); |
| 71 | - populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install ); |
|
| 72 | - $wp_rewrite->set_permalink_structure( '' ); |
|
| 71 | + populate_network(1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install); |
|
| 72 | + $wp_rewrite->set_permalink_structure(''); |
|
| 73 | 73 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | $gd_wpseo_use = ''; |
| 12 | 12 | if (class_exists('WPSEO_Frontend') || class_exists('All_in_One_SEO_Pack')) { |
| 13 | - $gd_wpseo_use = "<b style='color:red;'>".__('Please use the WPSEO settings instead.','geodirectory')."</b><br />"; |
|
| 13 | + $gd_wpseo_use = "<b style='color:red;'>".__('Please use the WPSEO settings instead.','geodirectory')."</b><br />"; |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | /** |
@@ -21,363 +21,363 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | $geodir_settings['title_meta_settings'] = apply_filters('geodir_title_meta_settings', array( |
| 23 | 23 | |
| 24 | - /* Listing Permalink Settings start */ |
|
| 25 | - array('name' => __('Title / Meta', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set page title and meta', 'id' => 'geodir_title_meta_settings '), |
|
| 26 | - |
|
| 27 | - |
|
| 28 | - |
|
| 29 | - |
|
| 30 | - array('name' => $gd_wpseo_use.__('Available Variables', 'geodirectory'), |
|
| 31 | - 'desc' => __('%%title%%, %%sitename%%, %%sitedesc%%, %%excerpt%%, %%pt_single%%, %%pt_plural%%, %%category%%, %%id%%, %%sep%%, %%location%%, %%in_location%%, %%in_location_single%%, %%location_single%%, %%search_term%%, %%search_near%%, %%name%%, %%page%%, %%pagenumber%%, %%pagetotal%%', 'geodirectory'), |
|
| 32 | - 'type' => 'sectionstart', |
|
| 33 | - 'id' => 'geodir_meta_vars'), |
|
| 34 | - |
|
| 35 | - array('type' => 'sectionend', 'id' => 'geodir_meta_vars'), |
|
| 36 | - |
|
| 37 | - array('name' => __('Homepage Meta Settings', 'geodirectory'), |
|
| 38 | - 'type' => 'sectionstart', |
|
| 39 | - 'desc' => '', |
|
| 40 | - 'id' => 'geodir_home_meta'), |
|
| 41 | - |
|
| 42 | - array( |
|
| 43 | - 'name' => __('Homepage meta title', 'geodirectory'), |
|
| 44 | - 'desc' => __('This will use the title of the page set as frontpage if left blank.', 'geodirectory'), |
|
| 45 | - 'id' => 'geodir_meta_title_homepage', |
|
| 46 | - 'type' => 'text', |
|
| 47 | - 'css' => 'width:100%;', |
|
| 48 | - 'std' => '', |
|
| 49 | - 'placeholder' => '' |
|
| 50 | - ), |
|
| 51 | - |
|
| 52 | - array( |
|
| 53 | - 'name' => __('Homepage meta description', 'geodirectory'), |
|
| 54 | - 'desc' => __('Enter the meta description for the homepage.', 'geodirectory'), |
|
| 55 | - 'id' => 'geodir_meta_desc_homepage', |
|
| 56 | - 'type' => 'textarea', |
|
| 57 | - 'css' => 'width:100%;', |
|
| 58 | - 'std' => '' |
|
| 59 | - ), |
|
| 60 | - |
|
| 61 | - array('type' => 'sectionend', 'id' => 'geodir_home_meta'), |
|
| 62 | - |
|
| 63 | - // details page meta |
|
| 64 | - array('name' => __('Details Page Meta Settings', 'geodirectory'), |
|
| 65 | - 'type' => 'sectionstart', |
|
| 66 | - 'desc' => '', |
|
| 67 | - 'id' => 'geodir_details_meta'), |
|
| 68 | - |
|
| 69 | - array( |
|
| 70 | - 'name' => __('Details page meta title', 'geodirectory'), |
|
| 71 | - 'desc' => __('Enter the meta title for the details page.', 'geodirectory'), |
|
| 72 | - 'id' => 'geodir_meta_title_detail', |
|
| 73 | - 'type' => 'text', |
|
| 74 | - 'css' => 'width:100%;', |
|
| 75 | - 'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 76 | - 'placeholder' => '%%title%% %%sep%% %%sitename%%' |
|
| 77 | - ), |
|
| 78 | - |
|
| 79 | - array( |
|
| 80 | - 'name' => __('Details page meta description', 'geodirectory'), |
|
| 81 | - 'desc' => __('Enter the meta description for the details page.', 'geodirectory'), |
|
| 82 | - 'id' => 'geodir_meta_desc_detail', |
|
| 83 | - 'type' => 'textarea', |
|
| 84 | - 'css' => 'width:100%;', |
|
| 85 | - 'std' => __('%%excerpt%%', 'geodirectory'), |
|
| 86 | - 'placeholder' => '%%excerpt%%' |
|
| 87 | - ), |
|
| 88 | - |
|
| 89 | - array('type' => 'sectionend', 'id' => 'geodir_details_meta'), |
|
| 90 | - |
|
| 91 | - // CPT page meta |
|
| 92 | - array('name' => __('Post Type Page Meta Settings', 'geodirectory'), |
|
| 93 | - 'type' => 'sectionstart', |
|
| 94 | - 'desc' => '', |
|
| 95 | - 'id' => 'geodir_pt_meta'), |
|
| 96 | - |
|
| 97 | - array( |
|
| 98 | - 'name' => __('Post type page meta title', 'geodirectory'), |
|
| 99 | - 'desc' => __('Enter the meta title for the post type pages.', 'geodirectory'), |
|
| 100 | - 'id' => 'geodir_meta_title_pt', |
|
| 101 | - 'type' => 'text', |
|
| 102 | - 'css' => 'width:100%;', |
|
| 103 | - 'std' => __('%%pt_plural%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 104 | - 'placeholder' => '%%pt_plural%% %%in_location%% %%sep%% %%sitename%%' |
|
| 105 | - ), |
|
| 106 | - |
|
| 107 | - array( |
|
| 108 | - 'name' => __('Post type page meta description', 'geodirectory'), |
|
| 109 | - 'desc' => __('Enter the meta description for the post type pages.', 'geodirectory'), |
|
| 110 | - 'id' => 'geodir_meta_desc_pt', |
|
| 111 | - 'type' => 'textarea', |
|
| 112 | - 'css' => 'width:100%;', |
|
| 113 | - 'std' => __('%%pt_plural%% %%in_location%%', 'geodirectory'), |
|
| 114 | - 'placeholder' => '%%pt_plural%% %%in_location%%' |
|
| 115 | - ), |
|
| 116 | - |
|
| 117 | - array( |
|
| 118 | - 'name' => __('Post type page title', 'geodirectory'), |
|
| 119 | - 'desc' => __('Enter the title for the post type pages.', 'geodirectory'), |
|
| 120 | - 'id' => 'geodir_page_title_pt', |
|
| 121 | - 'type' => 'text', |
|
| 122 | - 'css' => 'width:100%;', |
|
| 123 | - 'std' => __('All %%pt_plural%% %%in_location_single%%', 'geodirectory'), |
|
| 124 | - 'placeholder' => 'All %%pt_plural%% %%in_location_single%%' |
|
| 125 | - ), |
|
| 126 | - |
|
| 127 | - array('type' => 'sectionend', 'id' => 'geodir_pt_meta'), |
|
| 128 | - |
|
| 129 | - // Cat listing page meta |
|
| 130 | - array('name' => __('Listing Page Meta Settings', 'geodirectory'), |
|
| 131 | - 'type' => 'sectionstart', |
|
| 132 | - 'desc' => '', |
|
| 133 | - 'id' => 'geodir_pt_meta'), |
|
| 134 | - |
|
| 135 | - array( |
|
| 136 | - 'name' => __('Listing page meta title', 'geodirectory'), |
|
| 137 | - 'desc' => __('Enter the meta title for the category listing pages.', 'geodirectory'), |
|
| 138 | - 'id' => 'geodir_meta_title_listing', |
|
| 139 | - 'type' => 'text', |
|
| 140 | - 'css' => 'width:100%;', |
|
| 141 | - 'std' => __('%%category%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 142 | - 'placeholder' => '%%category%% %%in_location%% %%sep%% %%sitename%%' |
|
| 143 | - ), |
|
| 144 | - |
|
| 145 | - array( |
|
| 146 | - 'name' => __('Listing page meta description', 'geodirectory'), |
|
| 147 | - 'desc' => __('Enter the meta description for the category listing pages.', 'geodirectory'), |
|
| 148 | - 'id' => 'geodir_meta_desc_listing', |
|
| 149 | - 'type' => 'textarea', |
|
| 150 | - 'css' => 'width:100%;', |
|
| 151 | - 'std' => __('Posts related to Category: %%category%% %%in_location%%', 'geodirectory'), |
|
| 152 | - 'placeholder' => 'Posts related to Category: %%category%% %%in_location%%' |
|
| 153 | - ), |
|
| 154 | - |
|
| 155 | - array( |
|
| 156 | - 'name' => __('Category listing page title', 'geodirectory'), |
|
| 157 | - 'desc' => __('Enter the title for the category listing pages.', 'geodirectory'), |
|
| 158 | - 'id' => 'geodir_page_title_cat-listing', |
|
| 159 | - 'type' => 'text', |
|
| 160 | - 'css' => 'width:100%;', |
|
| 161 | - 'std' => __('All %%category%% %%in_location_single%%', 'geodirectory'), |
|
| 162 | - 'placeholder' => 'All %%category%% %%in_location_single%%' |
|
| 163 | - ), |
|
| 164 | - |
|
| 165 | - array( |
|
| 166 | - 'name' => __('Tag listing page title', 'geodirectory'), |
|
| 167 | - 'desc' => __('Enter the title for the tag listing pages.', 'geodirectory'), |
|
| 168 | - 'id' => 'geodir_page_title_tag-listing', |
|
| 169 | - 'type' => 'text', |
|
| 170 | - 'css' => 'width:100%;', |
|
| 171 | - 'std' => __('Tag: %%tag%% %%in_location_single%%', 'geodirectory'), |
|
| 172 | - 'placeholder' => 'Tag: %%tag%% %%in_location_single%%' |
|
| 173 | - ), |
|
| 174 | - |
|
| 175 | - array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 176 | - |
|
| 177 | - // location page meta |
|
| 178 | - array('name' => __('Location Page Meta Settings', 'geodirectory'), |
|
| 179 | - 'type' => 'sectionstart', |
|
| 180 | - 'desc' => '', |
|
| 181 | - 'id' => 'geodir_pt_meta'), |
|
| 182 | - |
|
| 183 | - array( |
|
| 184 | - 'name' => __('Location page meta title', 'geodirectory'), |
|
| 185 | - 'desc' => __('Enter the meta title for the location pages.', 'geodirectory'), |
|
| 186 | - 'id' => 'geodir_meta_title_location', |
|
| 187 | - 'type' => 'text', |
|
| 188 | - 'css' => 'width:100%;', |
|
| 189 | - 'std' => __('%%title%% %%location%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 190 | - 'placeholder' => '%%title%% %%location%% %%sep%% %%sitename%%' |
|
| 191 | - ), |
|
| 192 | - |
|
| 193 | - array( |
|
| 194 | - 'name' => __('Location page meta description', 'geodirectory'), |
|
| 195 | - 'desc' => __('Enter the meta description for the location pages.', 'geodirectory'), |
|
| 196 | - 'id' => 'geodir_meta_desc_location', |
|
| 197 | - 'type' => 'textarea', |
|
| 198 | - 'css' => 'width:100%;', |
|
| 199 | - 'std' => __('%%location%%', 'geodirectory'), |
|
| 200 | - 'placeholder' => '%%location%%' |
|
| 201 | - ), |
|
| 202 | - |
|
| 203 | - array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 204 | - |
|
| 205 | - // Search page meta |
|
| 206 | - array('name' => __('Search Page Meta Settings', 'geodirectory'), |
|
| 207 | - 'type' => 'sectionstart', |
|
| 208 | - 'desc' => '', |
|
| 209 | - 'id' => 'geodir_pt_meta'), |
|
| 210 | - |
|
| 211 | - array( |
|
| 212 | - 'name' => __('Search page meta title', 'geodirectory'), |
|
| 213 | - 'desc' => __('Enter the meta title for the search page.', 'geodirectory'), |
|
| 214 | - 'id' => 'geodir_meta_title_search', |
|
| 215 | - 'type' => 'text', |
|
| 216 | - 'css' => 'width:100%;', |
|
| 217 | - 'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 218 | - 'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%' |
|
| 219 | - ), |
|
| 220 | - |
|
| 221 | - array( |
|
| 222 | - 'name' => __('Search page meta description', 'geodirectory'), |
|
| 223 | - 'desc' => __('Enter the meta description for the search page.', 'geodirectory'), |
|
| 224 | - 'id' => 'geodir_meta_desc_search', |
|
| 225 | - 'type' => 'textarea', |
|
| 226 | - 'css' => 'width:100%;', |
|
| 227 | - 'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%%', 'geodirectory'), |
|
| 228 | - 'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%%' |
|
| 229 | - ), |
|
| 230 | - |
|
| 231 | - array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 232 | - |
|
| 233 | - //Add listing page meta |
|
| 234 | - array('name' => __('Add Listing Page Meta Settings', 'geodirectory'), |
|
| 235 | - 'type' => 'sectionstart', |
|
| 236 | - 'desc' => '', |
|
| 237 | - 'id' => 'geodir_pt_meta'), |
|
| 238 | - |
|
| 239 | - array( |
|
| 240 | - 'name' => __('Add listing page meta title', 'geodirectory'), |
|
| 241 | - 'desc' => __('Enter the meta title for the add listing page.', 'geodirectory'), |
|
| 242 | - 'id' => 'geodir_meta_title_add-listing', |
|
| 243 | - 'type' => 'text', |
|
| 244 | - 'css' => 'width:100%;', |
|
| 245 | - 'std' => __('Add %%pt_single%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 246 | - 'placeholder' => 'Add %%pt_single%% %%sep%% %%sitename%%' |
|
| 247 | - ), |
|
| 248 | - |
|
| 249 | - array( |
|
| 250 | - 'name' => __('Add listing page meta description', 'geodirectory'), |
|
| 251 | - 'desc' => __('Enter the meta description for the add listing page.', 'geodirectory'), |
|
| 252 | - 'id' => 'geodir_meta_desc_add-listing', |
|
| 253 | - 'type' => 'textarea', |
|
| 254 | - 'css' => 'width:100%;', |
|
| 255 | - 'std' => __('Add %%pt_single%%', 'geodirectory'), |
|
| 256 | - 'placeholder' => 'Add %%pt_single%%' |
|
| 257 | - ), |
|
| 258 | - |
|
| 259 | - array( |
|
| 260 | - 'name' => __('Add listing page title', 'geodirectory'), |
|
| 261 | - 'desc' => __('Enter the title for the add listing page.', 'geodirectory'), |
|
| 262 | - 'id' => 'geodir_page_title_add-listing', |
|
| 263 | - 'type' => 'text', |
|
| 264 | - 'css' => 'width:100%;', |
|
| 265 | - 'std' => __('Add %%pt_single%%', 'geodirectory'), |
|
| 266 | - 'placeholder' => 'Add %%pt_single%%' |
|
| 267 | - ), |
|
| 268 | - |
|
| 269 | - array( |
|
| 270 | - 'name' => __('Edit listing page title', 'geodirectory'), |
|
| 271 | - 'desc' => __('Enter the title for the edit listing page.', 'geodirectory'), |
|
| 272 | - 'id' => 'geodir_page_title_edit-listing', |
|
| 273 | - 'type' => 'text', |
|
| 274 | - 'css' => 'width:100%;', |
|
| 275 | - 'std' => __('Edit %%pt_single%%', 'geodirectory'), |
|
| 276 | - 'placeholder' => 'Edit %%pt_single%%' |
|
| 277 | - ), |
|
| 278 | - |
|
| 279 | - array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 280 | - |
|
| 281 | - //Author page meta |
|
| 282 | - array('name' => __('Author Page Meta Settings', 'geodirectory'), |
|
| 283 | - 'type' => 'sectionstart', |
|
| 284 | - 'desc' => '', |
|
| 285 | - 'id' => 'geodir_pt_meta'), |
|
| 286 | - |
|
| 287 | - array( |
|
| 288 | - 'name' => __('Author page meta title', 'geodirectory'), |
|
| 289 | - 'desc' => __('Enter the meta title for the author page.', 'geodirectory'), |
|
| 290 | - 'id' => 'geodir_meta_title_author', |
|
| 291 | - 'type' => 'text', |
|
| 292 | - 'css' => 'width:100%;', |
|
| 293 | - 'std' => __('Author: %%name%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 294 | - 'placeholder' => 'Author: %%name%% %%sep%% %%sitename%%' |
|
| 295 | - ), |
|
| 296 | - |
|
| 297 | - array( |
|
| 298 | - 'name' => __('Author page meta description', 'geodirectory'), |
|
| 299 | - 'desc' => __('Enter the meta description for the author page.', 'geodirectory'), |
|
| 300 | - 'id' => 'geodir_meta_desc_author', |
|
| 301 | - 'type' => 'textarea', |
|
| 302 | - 'css' => 'width:100%;', |
|
| 303 | - 'std' => '' |
|
| 304 | - ), |
|
| 305 | - |
|
| 306 | - array( |
|
| 307 | - 'name' => __('Author page title', 'geodirectory'), |
|
| 308 | - 'desc' => __('Enter the title for the author page.', 'geodirectory'), |
|
| 309 | - 'id' => 'geodir_page_title_author', |
|
| 310 | - 'type' => 'text', |
|
| 311 | - 'css' => 'width:100%;', |
|
| 312 | - 'std' => __('%%pt_plural%% by: %%name%%', 'geodirectory'), |
|
| 313 | - 'placeholder' => '%%pt_plural%% by: %%name%%' |
|
| 314 | - ), |
|
| 315 | - |
|
| 316 | - array( |
|
| 317 | - 'name' => __('Author favorite page title', 'geodirectory'), |
|
| 318 | - 'desc' => __('Enter the title for the author favorite page.', 'geodirectory'), |
|
| 319 | - 'id' => 'geodir_page_title_favorite', |
|
| 320 | - 'type' => 'text', |
|
| 321 | - 'css' => 'width:100%;', |
|
| 322 | - 'std' => __('%%name%%: Favorite %%pt_plural%%', 'geodirectory'), |
|
| 323 | - 'placeholder' => '%%name%%: Favorite %%pt_plural%%' |
|
| 324 | - ), |
|
| 325 | - |
|
| 326 | - array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 327 | - |
|
| 328 | - //Login page meta |
|
| 329 | - array('name' => __('Login Page Meta Settings', 'geodirectory'), |
|
| 330 | - 'type' => 'sectionstart', |
|
| 331 | - 'desc' => '', |
|
| 332 | - 'id' => 'geodir_login_meta'), |
|
| 333 | - |
|
| 334 | - array( |
|
| 335 | - 'name' => __('Login page meta title', 'geodirectory'), |
|
| 336 | - 'desc' => __('Enter the meta title for the login page.', 'geodirectory'), |
|
| 337 | - 'id' => 'geodir_meta_title_login', |
|
| 338 | - 'type' => 'text', |
|
| 339 | - 'css' => 'width:100%;', |
|
| 340 | - 'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 341 | - 'placeholder' => '%%title%% %%sep%% %%sitename%%' |
|
| 342 | - ), |
|
| 343 | - |
|
| 344 | - array( |
|
| 345 | - 'name' => __('Login page meta description', 'geodirectory'), |
|
| 346 | - 'desc' => __('Enter the meta description for the login page.', 'geodirectory'), |
|
| 347 | - 'id' => 'geodir_meta_desc_login', |
|
| 348 | - 'type' => 'textarea', |
|
| 349 | - 'css' => 'width:100%;', |
|
| 350 | - 'std' => '' |
|
| 351 | - ), |
|
| 352 | - |
|
| 353 | - array('type' => 'sectionend', 'id' => 'geodir_login_meta'), |
|
| 354 | - |
|
| 355 | - //Listing success page meta |
|
| 356 | - array('name' => __('Listing Success Page Meta Settings', 'geodirectory'), |
|
| 357 | - 'type' => 'sectionstart', |
|
| 358 | - 'desc' => '', |
|
| 359 | - 'id' => 'geodir_login_meta'), |
|
| 360 | - |
|
| 361 | - array( |
|
| 362 | - 'name' => __('Listing success page meta title', 'geodirectory'), |
|
| 363 | - 'desc' => __('Enter the meta title for the listing success page.', 'geodirectory'), |
|
| 364 | - 'id' => 'geodir_meta_title_listing-success', |
|
| 365 | - 'type' => 'text', |
|
| 366 | - 'css' => 'width:100%;', |
|
| 367 | - 'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 368 | - 'placeholder' => '%%title%% %%sep%% %%sitename%%' |
|
| 369 | - ), |
|
| 370 | - |
|
| 371 | - array( |
|
| 372 | - 'name' => __('Listing success page meta description', 'geodirectory'), |
|
| 373 | - 'desc' => __('Enter the meta description for the listing success page.', 'geodirectory'), |
|
| 374 | - 'id' => 'geodir_meta_desc_listing-success', |
|
| 375 | - 'type' => 'textarea', |
|
| 376 | - 'css' => 'width:100%;', |
|
| 377 | - 'std' => '' |
|
| 378 | - ), |
|
| 379 | - |
|
| 380 | - array('type' => 'sectionend', 'id' => 'geodir_login_meta'), |
|
| 24 | + /* Listing Permalink Settings start */ |
|
| 25 | + array('name' => __('Title / Meta', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set page title and meta', 'id' => 'geodir_title_meta_settings '), |
|
| 26 | + |
|
| 27 | + |
|
| 28 | + |
|
| 29 | + |
|
| 30 | + array('name' => $gd_wpseo_use.__('Available Variables', 'geodirectory'), |
|
| 31 | + 'desc' => __('%%title%%, %%sitename%%, %%sitedesc%%, %%excerpt%%, %%pt_single%%, %%pt_plural%%, %%category%%, %%id%%, %%sep%%, %%location%%, %%in_location%%, %%in_location_single%%, %%location_single%%, %%search_term%%, %%search_near%%, %%name%%, %%page%%, %%pagenumber%%, %%pagetotal%%', 'geodirectory'), |
|
| 32 | + 'type' => 'sectionstart', |
|
| 33 | + 'id' => 'geodir_meta_vars'), |
|
| 34 | + |
|
| 35 | + array('type' => 'sectionend', 'id' => 'geodir_meta_vars'), |
|
| 36 | + |
|
| 37 | + array('name' => __('Homepage Meta Settings', 'geodirectory'), |
|
| 38 | + 'type' => 'sectionstart', |
|
| 39 | + 'desc' => '', |
|
| 40 | + 'id' => 'geodir_home_meta'), |
|
| 41 | + |
|
| 42 | + array( |
|
| 43 | + 'name' => __('Homepage meta title', 'geodirectory'), |
|
| 44 | + 'desc' => __('This will use the title of the page set as frontpage if left blank.', 'geodirectory'), |
|
| 45 | + 'id' => 'geodir_meta_title_homepage', |
|
| 46 | + 'type' => 'text', |
|
| 47 | + 'css' => 'width:100%;', |
|
| 48 | + 'std' => '', |
|
| 49 | + 'placeholder' => '' |
|
| 50 | + ), |
|
| 51 | + |
|
| 52 | + array( |
|
| 53 | + 'name' => __('Homepage meta description', 'geodirectory'), |
|
| 54 | + 'desc' => __('Enter the meta description for the homepage.', 'geodirectory'), |
|
| 55 | + 'id' => 'geodir_meta_desc_homepage', |
|
| 56 | + 'type' => 'textarea', |
|
| 57 | + 'css' => 'width:100%;', |
|
| 58 | + 'std' => '' |
|
| 59 | + ), |
|
| 60 | + |
|
| 61 | + array('type' => 'sectionend', 'id' => 'geodir_home_meta'), |
|
| 62 | + |
|
| 63 | + // details page meta |
|
| 64 | + array('name' => __('Details Page Meta Settings', 'geodirectory'), |
|
| 65 | + 'type' => 'sectionstart', |
|
| 66 | + 'desc' => '', |
|
| 67 | + 'id' => 'geodir_details_meta'), |
|
| 68 | + |
|
| 69 | + array( |
|
| 70 | + 'name' => __('Details page meta title', 'geodirectory'), |
|
| 71 | + 'desc' => __('Enter the meta title for the details page.', 'geodirectory'), |
|
| 72 | + 'id' => 'geodir_meta_title_detail', |
|
| 73 | + 'type' => 'text', |
|
| 74 | + 'css' => 'width:100%;', |
|
| 75 | + 'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 76 | + 'placeholder' => '%%title%% %%sep%% %%sitename%%' |
|
| 77 | + ), |
|
| 78 | + |
|
| 79 | + array( |
|
| 80 | + 'name' => __('Details page meta description', 'geodirectory'), |
|
| 81 | + 'desc' => __('Enter the meta description for the details page.', 'geodirectory'), |
|
| 82 | + 'id' => 'geodir_meta_desc_detail', |
|
| 83 | + 'type' => 'textarea', |
|
| 84 | + 'css' => 'width:100%;', |
|
| 85 | + 'std' => __('%%excerpt%%', 'geodirectory'), |
|
| 86 | + 'placeholder' => '%%excerpt%%' |
|
| 87 | + ), |
|
| 88 | + |
|
| 89 | + array('type' => 'sectionend', 'id' => 'geodir_details_meta'), |
|
| 90 | + |
|
| 91 | + // CPT page meta |
|
| 92 | + array('name' => __('Post Type Page Meta Settings', 'geodirectory'), |
|
| 93 | + 'type' => 'sectionstart', |
|
| 94 | + 'desc' => '', |
|
| 95 | + 'id' => 'geodir_pt_meta'), |
|
| 96 | + |
|
| 97 | + array( |
|
| 98 | + 'name' => __('Post type page meta title', 'geodirectory'), |
|
| 99 | + 'desc' => __('Enter the meta title for the post type pages.', 'geodirectory'), |
|
| 100 | + 'id' => 'geodir_meta_title_pt', |
|
| 101 | + 'type' => 'text', |
|
| 102 | + 'css' => 'width:100%;', |
|
| 103 | + 'std' => __('%%pt_plural%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 104 | + 'placeholder' => '%%pt_plural%% %%in_location%% %%sep%% %%sitename%%' |
|
| 105 | + ), |
|
| 106 | + |
|
| 107 | + array( |
|
| 108 | + 'name' => __('Post type page meta description', 'geodirectory'), |
|
| 109 | + 'desc' => __('Enter the meta description for the post type pages.', 'geodirectory'), |
|
| 110 | + 'id' => 'geodir_meta_desc_pt', |
|
| 111 | + 'type' => 'textarea', |
|
| 112 | + 'css' => 'width:100%;', |
|
| 113 | + 'std' => __('%%pt_plural%% %%in_location%%', 'geodirectory'), |
|
| 114 | + 'placeholder' => '%%pt_plural%% %%in_location%%' |
|
| 115 | + ), |
|
| 116 | + |
|
| 117 | + array( |
|
| 118 | + 'name' => __('Post type page title', 'geodirectory'), |
|
| 119 | + 'desc' => __('Enter the title for the post type pages.', 'geodirectory'), |
|
| 120 | + 'id' => 'geodir_page_title_pt', |
|
| 121 | + 'type' => 'text', |
|
| 122 | + 'css' => 'width:100%;', |
|
| 123 | + 'std' => __('All %%pt_plural%% %%in_location_single%%', 'geodirectory'), |
|
| 124 | + 'placeholder' => 'All %%pt_plural%% %%in_location_single%%' |
|
| 125 | + ), |
|
| 126 | + |
|
| 127 | + array('type' => 'sectionend', 'id' => 'geodir_pt_meta'), |
|
| 128 | + |
|
| 129 | + // Cat listing page meta |
|
| 130 | + array('name' => __('Listing Page Meta Settings', 'geodirectory'), |
|
| 131 | + 'type' => 'sectionstart', |
|
| 132 | + 'desc' => '', |
|
| 133 | + 'id' => 'geodir_pt_meta'), |
|
| 134 | + |
|
| 135 | + array( |
|
| 136 | + 'name' => __('Listing page meta title', 'geodirectory'), |
|
| 137 | + 'desc' => __('Enter the meta title for the category listing pages.', 'geodirectory'), |
|
| 138 | + 'id' => 'geodir_meta_title_listing', |
|
| 139 | + 'type' => 'text', |
|
| 140 | + 'css' => 'width:100%;', |
|
| 141 | + 'std' => __('%%category%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 142 | + 'placeholder' => '%%category%% %%in_location%% %%sep%% %%sitename%%' |
|
| 143 | + ), |
|
| 144 | + |
|
| 145 | + array( |
|
| 146 | + 'name' => __('Listing page meta description', 'geodirectory'), |
|
| 147 | + 'desc' => __('Enter the meta description for the category listing pages.', 'geodirectory'), |
|
| 148 | + 'id' => 'geodir_meta_desc_listing', |
|
| 149 | + 'type' => 'textarea', |
|
| 150 | + 'css' => 'width:100%;', |
|
| 151 | + 'std' => __('Posts related to Category: %%category%% %%in_location%%', 'geodirectory'), |
|
| 152 | + 'placeholder' => 'Posts related to Category: %%category%% %%in_location%%' |
|
| 153 | + ), |
|
| 154 | + |
|
| 155 | + array( |
|
| 156 | + 'name' => __('Category listing page title', 'geodirectory'), |
|
| 157 | + 'desc' => __('Enter the title for the category listing pages.', 'geodirectory'), |
|
| 158 | + 'id' => 'geodir_page_title_cat-listing', |
|
| 159 | + 'type' => 'text', |
|
| 160 | + 'css' => 'width:100%;', |
|
| 161 | + 'std' => __('All %%category%% %%in_location_single%%', 'geodirectory'), |
|
| 162 | + 'placeholder' => 'All %%category%% %%in_location_single%%' |
|
| 163 | + ), |
|
| 164 | + |
|
| 165 | + array( |
|
| 166 | + 'name' => __('Tag listing page title', 'geodirectory'), |
|
| 167 | + 'desc' => __('Enter the title for the tag listing pages.', 'geodirectory'), |
|
| 168 | + 'id' => 'geodir_page_title_tag-listing', |
|
| 169 | + 'type' => 'text', |
|
| 170 | + 'css' => 'width:100%;', |
|
| 171 | + 'std' => __('Tag: %%tag%% %%in_location_single%%', 'geodirectory'), |
|
| 172 | + 'placeholder' => 'Tag: %%tag%% %%in_location_single%%' |
|
| 173 | + ), |
|
| 174 | + |
|
| 175 | + array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 176 | + |
|
| 177 | + // location page meta |
|
| 178 | + array('name' => __('Location Page Meta Settings', 'geodirectory'), |
|
| 179 | + 'type' => 'sectionstart', |
|
| 180 | + 'desc' => '', |
|
| 181 | + 'id' => 'geodir_pt_meta'), |
|
| 182 | + |
|
| 183 | + array( |
|
| 184 | + 'name' => __('Location page meta title', 'geodirectory'), |
|
| 185 | + 'desc' => __('Enter the meta title for the location pages.', 'geodirectory'), |
|
| 186 | + 'id' => 'geodir_meta_title_location', |
|
| 187 | + 'type' => 'text', |
|
| 188 | + 'css' => 'width:100%;', |
|
| 189 | + 'std' => __('%%title%% %%location%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 190 | + 'placeholder' => '%%title%% %%location%% %%sep%% %%sitename%%' |
|
| 191 | + ), |
|
| 192 | + |
|
| 193 | + array( |
|
| 194 | + 'name' => __('Location page meta description', 'geodirectory'), |
|
| 195 | + 'desc' => __('Enter the meta description for the location pages.', 'geodirectory'), |
|
| 196 | + 'id' => 'geodir_meta_desc_location', |
|
| 197 | + 'type' => 'textarea', |
|
| 198 | + 'css' => 'width:100%;', |
|
| 199 | + 'std' => __('%%location%%', 'geodirectory'), |
|
| 200 | + 'placeholder' => '%%location%%' |
|
| 201 | + ), |
|
| 202 | + |
|
| 203 | + array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 204 | + |
|
| 205 | + // Search page meta |
|
| 206 | + array('name' => __('Search Page Meta Settings', 'geodirectory'), |
|
| 207 | + 'type' => 'sectionstart', |
|
| 208 | + 'desc' => '', |
|
| 209 | + 'id' => 'geodir_pt_meta'), |
|
| 210 | + |
|
| 211 | + array( |
|
| 212 | + 'name' => __('Search page meta title', 'geodirectory'), |
|
| 213 | + 'desc' => __('Enter the meta title for the search page.', 'geodirectory'), |
|
| 214 | + 'id' => 'geodir_meta_title_search', |
|
| 215 | + 'type' => 'text', |
|
| 216 | + 'css' => 'width:100%;', |
|
| 217 | + 'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 218 | + 'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%' |
|
| 219 | + ), |
|
| 220 | + |
|
| 221 | + array( |
|
| 222 | + 'name' => __('Search page meta description', 'geodirectory'), |
|
| 223 | + 'desc' => __('Enter the meta description for the search page.', 'geodirectory'), |
|
| 224 | + 'id' => 'geodir_meta_desc_search', |
|
| 225 | + 'type' => 'textarea', |
|
| 226 | + 'css' => 'width:100%;', |
|
| 227 | + 'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%%', 'geodirectory'), |
|
| 228 | + 'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%%' |
|
| 229 | + ), |
|
| 230 | + |
|
| 231 | + array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 232 | + |
|
| 233 | + //Add listing page meta |
|
| 234 | + array('name' => __('Add Listing Page Meta Settings', 'geodirectory'), |
|
| 235 | + 'type' => 'sectionstart', |
|
| 236 | + 'desc' => '', |
|
| 237 | + 'id' => 'geodir_pt_meta'), |
|
| 238 | + |
|
| 239 | + array( |
|
| 240 | + 'name' => __('Add listing page meta title', 'geodirectory'), |
|
| 241 | + 'desc' => __('Enter the meta title for the add listing page.', 'geodirectory'), |
|
| 242 | + 'id' => 'geodir_meta_title_add-listing', |
|
| 243 | + 'type' => 'text', |
|
| 244 | + 'css' => 'width:100%;', |
|
| 245 | + 'std' => __('Add %%pt_single%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 246 | + 'placeholder' => 'Add %%pt_single%% %%sep%% %%sitename%%' |
|
| 247 | + ), |
|
| 248 | + |
|
| 249 | + array( |
|
| 250 | + 'name' => __('Add listing page meta description', 'geodirectory'), |
|
| 251 | + 'desc' => __('Enter the meta description for the add listing page.', 'geodirectory'), |
|
| 252 | + 'id' => 'geodir_meta_desc_add-listing', |
|
| 253 | + 'type' => 'textarea', |
|
| 254 | + 'css' => 'width:100%;', |
|
| 255 | + 'std' => __('Add %%pt_single%%', 'geodirectory'), |
|
| 256 | + 'placeholder' => 'Add %%pt_single%%' |
|
| 257 | + ), |
|
| 258 | + |
|
| 259 | + array( |
|
| 260 | + 'name' => __('Add listing page title', 'geodirectory'), |
|
| 261 | + 'desc' => __('Enter the title for the add listing page.', 'geodirectory'), |
|
| 262 | + 'id' => 'geodir_page_title_add-listing', |
|
| 263 | + 'type' => 'text', |
|
| 264 | + 'css' => 'width:100%;', |
|
| 265 | + 'std' => __('Add %%pt_single%%', 'geodirectory'), |
|
| 266 | + 'placeholder' => 'Add %%pt_single%%' |
|
| 267 | + ), |
|
| 268 | + |
|
| 269 | + array( |
|
| 270 | + 'name' => __('Edit listing page title', 'geodirectory'), |
|
| 271 | + 'desc' => __('Enter the title for the edit listing page.', 'geodirectory'), |
|
| 272 | + 'id' => 'geodir_page_title_edit-listing', |
|
| 273 | + 'type' => 'text', |
|
| 274 | + 'css' => 'width:100%;', |
|
| 275 | + 'std' => __('Edit %%pt_single%%', 'geodirectory'), |
|
| 276 | + 'placeholder' => 'Edit %%pt_single%%' |
|
| 277 | + ), |
|
| 278 | + |
|
| 279 | + array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 280 | + |
|
| 281 | + //Author page meta |
|
| 282 | + array('name' => __('Author Page Meta Settings', 'geodirectory'), |
|
| 283 | + 'type' => 'sectionstart', |
|
| 284 | + 'desc' => '', |
|
| 285 | + 'id' => 'geodir_pt_meta'), |
|
| 286 | + |
|
| 287 | + array( |
|
| 288 | + 'name' => __('Author page meta title', 'geodirectory'), |
|
| 289 | + 'desc' => __('Enter the meta title for the author page.', 'geodirectory'), |
|
| 290 | + 'id' => 'geodir_meta_title_author', |
|
| 291 | + 'type' => 'text', |
|
| 292 | + 'css' => 'width:100%;', |
|
| 293 | + 'std' => __('Author: %%name%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 294 | + 'placeholder' => 'Author: %%name%% %%sep%% %%sitename%%' |
|
| 295 | + ), |
|
| 296 | + |
|
| 297 | + array( |
|
| 298 | + 'name' => __('Author page meta description', 'geodirectory'), |
|
| 299 | + 'desc' => __('Enter the meta description for the author page.', 'geodirectory'), |
|
| 300 | + 'id' => 'geodir_meta_desc_author', |
|
| 301 | + 'type' => 'textarea', |
|
| 302 | + 'css' => 'width:100%;', |
|
| 303 | + 'std' => '' |
|
| 304 | + ), |
|
| 305 | + |
|
| 306 | + array( |
|
| 307 | + 'name' => __('Author page title', 'geodirectory'), |
|
| 308 | + 'desc' => __('Enter the title for the author page.', 'geodirectory'), |
|
| 309 | + 'id' => 'geodir_page_title_author', |
|
| 310 | + 'type' => 'text', |
|
| 311 | + 'css' => 'width:100%;', |
|
| 312 | + 'std' => __('%%pt_plural%% by: %%name%%', 'geodirectory'), |
|
| 313 | + 'placeholder' => '%%pt_plural%% by: %%name%%' |
|
| 314 | + ), |
|
| 315 | + |
|
| 316 | + array( |
|
| 317 | + 'name' => __('Author favorite page title', 'geodirectory'), |
|
| 318 | + 'desc' => __('Enter the title for the author favorite page.', 'geodirectory'), |
|
| 319 | + 'id' => 'geodir_page_title_favorite', |
|
| 320 | + 'type' => 'text', |
|
| 321 | + 'css' => 'width:100%;', |
|
| 322 | + 'std' => __('%%name%%: Favorite %%pt_plural%%', 'geodirectory'), |
|
| 323 | + 'placeholder' => '%%name%%: Favorite %%pt_plural%%' |
|
| 324 | + ), |
|
| 325 | + |
|
| 326 | + array('type' => 'sectionend', 'id' => 'geodir_location_meta'), |
|
| 327 | + |
|
| 328 | + //Login page meta |
|
| 329 | + array('name' => __('Login Page Meta Settings', 'geodirectory'), |
|
| 330 | + 'type' => 'sectionstart', |
|
| 331 | + 'desc' => '', |
|
| 332 | + 'id' => 'geodir_login_meta'), |
|
| 333 | + |
|
| 334 | + array( |
|
| 335 | + 'name' => __('Login page meta title', 'geodirectory'), |
|
| 336 | + 'desc' => __('Enter the meta title for the login page.', 'geodirectory'), |
|
| 337 | + 'id' => 'geodir_meta_title_login', |
|
| 338 | + 'type' => 'text', |
|
| 339 | + 'css' => 'width:100%;', |
|
| 340 | + 'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 341 | + 'placeholder' => '%%title%% %%sep%% %%sitename%%' |
|
| 342 | + ), |
|
| 343 | + |
|
| 344 | + array( |
|
| 345 | + 'name' => __('Login page meta description', 'geodirectory'), |
|
| 346 | + 'desc' => __('Enter the meta description for the login page.', 'geodirectory'), |
|
| 347 | + 'id' => 'geodir_meta_desc_login', |
|
| 348 | + 'type' => 'textarea', |
|
| 349 | + 'css' => 'width:100%;', |
|
| 350 | + 'std' => '' |
|
| 351 | + ), |
|
| 352 | + |
|
| 353 | + array('type' => 'sectionend', 'id' => 'geodir_login_meta'), |
|
| 354 | + |
|
| 355 | + //Listing success page meta |
|
| 356 | + array('name' => __('Listing Success Page Meta Settings', 'geodirectory'), |
|
| 357 | + 'type' => 'sectionstart', |
|
| 358 | + 'desc' => '', |
|
| 359 | + 'id' => 'geodir_login_meta'), |
|
| 360 | + |
|
| 361 | + array( |
|
| 362 | + 'name' => __('Listing success page meta title', 'geodirectory'), |
|
| 363 | + 'desc' => __('Enter the meta title for the listing success page.', 'geodirectory'), |
|
| 364 | + 'id' => 'geodir_meta_title_listing-success', |
|
| 365 | + 'type' => 'text', |
|
| 366 | + 'css' => 'width:100%;', |
|
| 367 | + 'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'), |
|
| 368 | + 'placeholder' => '%%title%% %%sep%% %%sitename%%' |
|
| 369 | + ), |
|
| 370 | + |
|
| 371 | + array( |
|
| 372 | + 'name' => __('Listing success page meta description', 'geodirectory'), |
|
| 373 | + 'desc' => __('Enter the meta description for the listing success page.', 'geodirectory'), |
|
| 374 | + 'id' => 'geodir_meta_desc_listing-success', |
|
| 375 | + 'type' => 'textarea', |
|
| 376 | + 'css' => 'width:100%;', |
|
| 377 | + 'std' => '' |
|
| 378 | + ), |
|
| 379 | + |
|
| 380 | + array('type' => 'sectionend', 'id' => 'geodir_login_meta'), |
|
| 381 | 381 | |
| 382 | 382 | |
| 383 | 383 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | $gd_wpseo_use = ''; |
| 12 | 12 | if (class_exists('WPSEO_Frontend') || class_exists('All_in_One_SEO_Pack')) { |
| 13 | - $gd_wpseo_use = "<b style='color:red;'>".__('Please use the WPSEO settings instead.','geodirectory')."</b><br />"; |
|
| 13 | + $gd_wpseo_use = "<b style='color:red;'>".__('Please use the WPSEO settings instead.', 'geodirectory')."</b><br />"; |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | /** |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * |
| 13 | 13 | * @since 1.0.0 |
| 14 | 14 | */ |
| 15 | - include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php'); |
|
| 15 | + include_once(geodir_plugin_path().'/geodirectory-admin/option-pages/create_field.php'); |
|
| 16 | 16 | die; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | * @since 1.0.0 |
| 14 | 14 | */ |
| 15 | 15 | include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php'); |
| 16 | - gd_die(); |
|
| 16 | + gd_die(); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] != '') { |
| 21 | - switch ($_REQUEST['ajax_action']): |
|
| 22 | - case 'get_cat_dl': |
|
| 23 | - geodir_get_categories_dl($_REQUEST['post_type'], $_REQUEST['selected'], false, true); |
|
| 24 | - break; |
|
| 25 | - endswitch; |
|
| 21 | + switch ($_REQUEST['ajax_action']): |
|
| 22 | + case 'get_cat_dl': |
|
| 23 | + geodir_get_categories_dl($_REQUEST['post_type'], $_REQUEST['selected'], false, true); |
|
| 24 | + break; |
|
| 25 | + endswitch; |
|
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | public function form($instance) |
| 302 | 302 | {
|
| 303 | 303 | //widgetform in backend |
| 304 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 304 | + $instance = wp_parse_args((array) $instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 305 | 305 | $title = strip_tags($instance['title']); |
| 306 | 306 | |
| 307 | 307 | ?> |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | ?> |
| 374 | 374 | |
| 375 | 375 | <a href="http://twitter.com/share" |
| 376 | - class="twitter-share-button"><?php _e('Tweet', 'geodirectory');?></a>
|
|
| 376 | + class="twitter-share-button"><?php _e('Tweet', 'geodirectory'); ?></a>
|
|
| 377 | 377 | |
| 378 | 378 | <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> |
| 379 | 379 | |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | public function form($instance) |
| 444 | 444 | {
|
| 445 | 445 | //widgetform in backend |
| 446 | - $instance = wp_parse_args((array)$instance, array('title' => ''));
|
|
| 446 | + $instance = wp_parse_args((array) $instance, array('title' => ''));
|
|
| 447 | 447 | $title = strip_tags($instance['title']); |
| 448 | 448 | ?> |
| 449 | 449 | <p>No settings for this widget</p> |
@@ -515,11 +515,11 @@ discard block |
||
| 515 | 515 | echo $before_widget; |
| 516 | 516 | ?> |
| 517 | 517 | |
| 518 | - <?php echo $before_title . $title; ?> <a href="<?php if ($id) {
|
|
| 519 | - echo 'http://feeds2.feedburner.com/' . $id; |
|
| 518 | + <?php echo $before_title.$title; ?> <a href="<?php if ($id) {
|
|
| 519 | + echo 'http://feeds2.feedburner.com/'.$id; |
|
| 520 | 520 | } else {
|
| 521 | 521 | bloginfo('rss_url');
|
| 522 | - } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title;?> |
|
| 522 | + } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title; ?> |
|
| 523 | 523 | |
| 524 | 524 | <?php if ($text <> "") { ?>
|
| 525 | 525 | |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | public function form($instance) |
| 585 | 585 | {
|
| 586 | 586 | //widgetform in backend |
| 587 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => ''));
|
|
| 587 | + $instance = wp_parse_args((array) $instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => ''));
|
|
| 588 | 588 | |
| 589 | 589 | $id = strip_tags($instance['id']); |
| 590 | 590 | |
@@ -596,19 +596,19 @@ discard block |
||
| 596 | 596 | |
| 597 | 597 | ?> |
| 598 | 598 | <p><label |
| 599 | - for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'geodirectory');?>:
|
|
| 599 | + for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'geodirectory'); ?>:
|
|
| 600 | 600 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
|
| 601 | 601 | name="<?php echo $this->get_field_name('title'); ?>" type="text"
|
| 602 | 602 | value="<?php echo esc_attr($title); ?>"/></label></p> |
| 603 | 603 | |
| 604 | 604 | <p><label |
| 605 | - for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Feedburner ID (ex :- geotheme)', 'geodirectory');?>
|
|
| 605 | + for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Feedburner ID (ex :- geotheme)', 'geodirectory'); ?>
|
|
| 606 | 606 | : <input class="widefat" id="<?php echo $this->get_field_id('id'); ?>"
|
| 607 | 607 | name="<?php echo $this->get_field_name('id'); ?>" type="text"
|
| 608 | 608 | value="<?php echo esc_attr($id); ?>"/></label></p> |
| 609 | 609 | |
| 610 | 610 | <p><label |
| 611 | - for="<?php echo $this->get_field_id('text'); ?>"><?php _e('Short Description', 'geodirectory');?>
|
|
| 611 | + for="<?php echo $this->get_field_id('text'); ?>"><?php _e('Short Description', 'geodirectory'); ?>
|
|
| 612 | 612 | <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id('text'); ?>"
|
| 613 | 613 | name="<?php echo $this->get_field_name('text'); ?>"><?php echo esc_attr($text); ?></textarea></label>
|
| 614 | 614 | </p> |
@@ -704,12 +704,12 @@ discard block |
||
| 704 | 704 | public function form($instance) |
| 705 | 705 | {
|
| 706 | 706 | //widgetform in backend |
| 707 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 707 | + $instance = wp_parse_args((array) $instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 708 | 708 | |
| 709 | 709 | $desc1 = ($instance['desc1']); |
| 710 | 710 | ?> |
| 711 | 711 | <p><label |
| 712 | - for="<?php echo $this->get_field_id('desc1'); ?>"><?php _e('Your Advt code (ex.google adsense, etc.)', 'geodirectory');?>
|
|
| 712 | + for="<?php echo $this->get_field_id('desc1'); ?>"><?php _e('Your Advt code (ex.google adsense, etc.)', 'geodirectory'); ?>
|
|
| 713 | 713 | <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id('desc1'); ?>"
|
| 714 | 714 | name="<?php echo $this->get_field_name('desc1'); ?>"><?php echo esc_attr($desc1); ?></textarea></label>
|
| 715 | 715 | </p> |
@@ -772,7 +772,7 @@ discard block |
||
| 772 | 772 | * @param string $number The image count. |
| 773 | 773 | */ |
| 774 | 774 | $number = empty($instance['number']) ? ' ' : apply_filters('widget_number', $instance['number']);
|
| 775 | - echo $before_title . __('Photo Gallery', 'geodirectory') . $after_title;
|
|
| 775 | + echo $before_title.__('Photo Gallery', 'geodirectory').$after_title;
|
|
| 776 | 776 | ?> |
| 777 | 777 | |
| 778 | 778 | <div class="geodir-flickr clearfix"> |
@@ -819,14 +819,14 @@ discard block |
||
| 819 | 819 | {
|
| 820 | 820 | |
| 821 | 821 | //widgetform in backend |
| 822 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'number' => ''));
|
|
| 822 | + $instance = wp_parse_args((array) $instance, array('title' => '', 'id' => '', 'number' => ''));
|
|
| 823 | 823 | $id = strip_tags($instance['id']); |
| 824 | 824 | $number = strip_tags($instance['number']); |
| 825 | 825 | ?> |
| 826 | 826 | |
| 827 | 827 | <p> |
| 828 | 828 | <label |
| 829 | - for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Flickr ID', 'geodirectory');?>
|
|
| 829 | + for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Flickr ID', 'geodirectory'); ?>
|
|
| 830 | 830 | (<a href="http://www.idgettr.com">idGettr</a>): |
| 831 | 831 | <input class="widefat" id="<?php echo $this->get_field_id('id'); ?>"
|
| 832 | 832 | name="<?php echo $this->get_field_name('id'); ?>" type="text"
|
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | |
| 837 | 837 | <p> |
| 838 | 838 | <label |
| 839 | - for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of photos:', 'geodirectory');?>
|
|
| 839 | + for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of photos:', 'geodirectory'); ?>
|
|
| 840 | 840 | <input class="widefat" id="<?php echo $this->get_field_id('number'); ?>"
|
| 841 | 841 | name="<?php echo $this->get_field_name('number'); ?>" type="text"
|
| 842 | 842 | value="<?php echo esc_attr($number); ?>"/> |
@@ -932,12 +932,12 @@ discard block |
||
| 932 | 932 | public function form($instance) |
| 933 | 933 | {
|
| 934 | 934 | //widgetform in backend |
| 935 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => ''));
|
|
| 935 | + $instance = wp_parse_args((array) $instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => ''));
|
|
| 936 | 936 | |
| 937 | 937 | $desc1 = ($instance['gd_tw_desc1']); |
| 938 | 938 | ?> |
| 939 | 939 | <p><label |
| 940 | - for="<?php echo $this->get_field_id('gd_tw_desc1'); ?>"><?php _e('Your twitter code', 'geodirectory');?>
|
|
| 940 | + for="<?php echo $this->get_field_id('gd_tw_desc1'); ?>"><?php _e('Your twitter code', 'geodirectory'); ?>
|
|
| 941 | 941 | <textarea class="widefat" rows="6" cols="20" |
| 942 | 942 | id="<?php echo $this->get_field_id('gd_tw_desc1'); ?>"
|
| 943 | 943 | name="<?php echo $this->get_field_name('gd_tw_desc1'); ?>"><?php echo esc_attr($desc1); ?></textarea></label>
|
@@ -990,7 +990,7 @@ discard block |
||
| 990 | 990 | * @param array $args The widget arguments. |
| 991 | 991 | * @param array $instance The widget instance. |
| 992 | 992 | */ |
| 993 | - $args = apply_filters('widget_geodir_advance_search_args',$args,$instance);
|
|
| 993 | + $args = apply_filters('widget_geodir_advance_search_args', $args, $instance);
|
|
| 994 | 994 | |
| 995 | 995 | // prints the widget |
| 996 | 996 | extract($args, EXTR_SKIP); |
@@ -15,296 +15,296 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | function geodir_register_sidebar() |
| 17 | 17 | {
|
| 18 | - global $geodir_sidebars; |
|
| 19 | - |
|
| 20 | - if (function_exists('register_sidebar')) {
|
|
| 21 | - /*===========================*/ |
|
| 22 | - /* Home page sidebars start*/ |
|
| 23 | - /*===========================*/ |
|
| 24 | - |
|
| 25 | - /** |
|
| 26 | - * Filter the `$before_widget` widget opening HTML tag. |
|
| 27 | - * |
|
| 28 | - * @since 1.0.0 |
|
| 29 | - * @param string $var The HTML string to filter. Default = '<section id="%1$s" class="widget geodir-widget %2$s">'. |
|
| 30 | - * @see 'geodir_after_widget' |
|
| 31 | - */ |
|
| 32 | - $before_widget = apply_filters('geodir_before_widget', '<section id="%1$s" class="widget geodir-widget %2$s">');
|
|
| 33 | - /** |
|
| 34 | - * Filter the `$after_widget` widget closing HTML tag. |
|
| 35 | - * |
|
| 36 | - * @since 1.0.0 |
|
| 37 | - * @param string $var The HTML string to filter. Default = '</section>'. |
|
| 38 | - * @see 'geodir_before_widget' |
|
| 39 | - */ |
|
| 40 | - $after_widget = apply_filters('geodir_after_widget', '</section>');
|
|
| 41 | - /** |
|
| 42 | - * Filter the `$before_title` widget title opening HTML tag. |
|
| 43 | - * |
|
| 44 | - * @since 1.0.0 |
|
| 45 | - * @param string $var The HTML string to filter. Default = '<h3 class="widget-title">'. |
|
| 46 | - * @see 'geodir_after_title' |
|
| 47 | - */ |
|
| 48 | - $before_title = apply_filters('geodir_before_title', '<h3 class="widget-title">');
|
|
| 49 | - /** |
|
| 50 | - * Filter the `$after_title` widget title closing HTML tag. |
|
| 51 | - * |
|
| 52 | - * @since 1.0.0 |
|
| 53 | - * @param string $var The HTML string to filter. Default = '</h3>'. |
|
| 54 | - * @see 'geodir_before_title' |
|
| 55 | - */ |
|
| 56 | - $after_title = apply_filters('geodir_after_title', '</h3>');
|
|
| 57 | - |
|
| 58 | - if (get_option('geodir_show_home_top_section')) {
|
|
| 59 | - register_sidebars(1, array('id' => 'geodir_home_top', 'name' => __('GD Home Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 60 | - |
|
| 61 | - $geodir_sidebars[] = 'geodir_home_top'; |
|
| 62 | - } |
|
| 63 | - |
|
| 64 | - if (get_option('geodir_show_home_contant_section')) {
|
|
| 65 | - register_sidebars(1, array('id' => 'geodir_home_content', 'name' => __('GD Home Content Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 18 | + global $geodir_sidebars; |
|
| 66 | 19 | |
| 67 | - $geodir_sidebars[] = 'geodir_home_content'; |
|
| 68 | - } |
|
| 20 | + if (function_exists('register_sidebar')) {
|
|
| 21 | + /*===========================*/ |
|
| 22 | + /* Home page sidebars start*/ |
|
| 23 | + /*===========================*/ |
|
| 69 | 24 | |
| 70 | - if (get_option('geodir_show_home_right_section')) {
|
|
| 71 | - register_sidebars(1, array('id' => 'geodir_home_right', 'name' => __('GD Home Right Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 25 | + /** |
|
| 26 | + * Filter the `$before_widget` widget opening HTML tag. |
|
| 27 | + * |
|
| 28 | + * @since 1.0.0 |
|
| 29 | + * @param string $var The HTML string to filter. Default = '<section id="%1$s" class="widget geodir-widget %2$s">'. |
|
| 30 | + * @see 'geodir_after_widget' |
|
| 31 | + */ |
|
| 32 | + $before_widget = apply_filters('geodir_before_widget', '<section id="%1$s" class="widget geodir-widget %2$s">');
|
|
| 33 | + /** |
|
| 34 | + * Filter the `$after_widget` widget closing HTML tag. |
|
| 35 | + * |
|
| 36 | + * @since 1.0.0 |
|
| 37 | + * @param string $var The HTML string to filter. Default = '</section>'. |
|
| 38 | + * @see 'geodir_before_widget' |
|
| 39 | + */ |
|
| 40 | + $after_widget = apply_filters('geodir_after_widget', '</section>');
|
|
| 41 | + /** |
|
| 42 | + * Filter the `$before_title` widget title opening HTML tag. |
|
| 43 | + * |
|
| 44 | + * @since 1.0.0 |
|
| 45 | + * @param string $var The HTML string to filter. Default = '<h3 class="widget-title">'. |
|
| 46 | + * @see 'geodir_after_title' |
|
| 47 | + */ |
|
| 48 | + $before_title = apply_filters('geodir_before_title', '<h3 class="widget-title">');
|
|
| 49 | + /** |
|
| 50 | + * Filter the `$after_title` widget title closing HTML tag. |
|
| 51 | + * |
|
| 52 | + * @since 1.0.0 |
|
| 53 | + * @param string $var The HTML string to filter. Default = '</h3>'. |
|
| 54 | + * @see 'geodir_before_title' |
|
| 55 | + */ |
|
| 56 | + $after_title = apply_filters('geodir_after_title', '</h3>');
|
|
| 57 | + |
|
| 58 | + if (get_option('geodir_show_home_top_section')) {
|
|
| 59 | + register_sidebars(1, array('id' => 'geodir_home_top', 'name' => __('GD Home Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 72 | 60 | |
| 73 | - $geodir_sidebars[] = 'geodir_home_right'; |
|
| 74 | - } |
|
| 61 | + $geodir_sidebars[] = 'geodir_home_top'; |
|
| 62 | + } |
|
| 75 | 63 | |
| 76 | - if (get_option('geodir_show_home_left_section')) {
|
|
| 77 | - register_sidebars(1, array('id' => 'geodir_home_left', 'name' => __('GD Home Left Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 64 | + if (get_option('geodir_show_home_contant_section')) {
|
|
| 65 | + register_sidebars(1, array('id' => 'geodir_home_content', 'name' => __('GD Home Content Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 78 | 66 | |
| 79 | - $geodir_sidebars[] = 'geodir_home_left'; |
|
| 80 | - } |
|
| 67 | + $geodir_sidebars[] = 'geodir_home_content'; |
|
| 68 | + } |
|
| 81 | 69 | |
| 82 | - if (get_option('geodir_show_home_bottom_section')) {
|
|
| 83 | - register_sidebars(1, array('id' => 'geodir_home_bottom', 'name' => __('GD Home Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 70 | + if (get_option('geodir_show_home_right_section')) {
|
|
| 71 | + register_sidebars(1, array('id' => 'geodir_home_right', 'name' => __('GD Home Right Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 84 | 72 | |
| 85 | - $geodir_sidebars[] = 'geodir_home_bottom'; |
|
| 86 | - } |
|
| 73 | + $geodir_sidebars[] = 'geodir_home_right'; |
|
| 74 | + } |
|
| 87 | 75 | |
| 88 | - /*===========================*/ |
|
| 89 | - /* Home page sidebars end*/ |
|
| 90 | - /*===========================*/ |
|
| 76 | + if (get_option('geodir_show_home_left_section')) {
|
|
| 77 | + register_sidebars(1, array('id' => 'geodir_home_left', 'name' => __('GD Home Left Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 91 | 78 | |
| 92 | - /*===========================*/ |
|
| 93 | - /* Listing page sidebars start*/ |
|
| 94 | - /*===========================*/ |
|
| 79 | + $geodir_sidebars[] = 'geodir_home_left'; |
|
| 80 | + } |
|
| 95 | 81 | |
| 96 | - if (get_option('geodir_show_listing_top_section')) {
|
|
| 97 | - register_sidebars(1, array('id' => 'geodir_listing_top', 'name' => __('GD Listing Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 82 | + if (get_option('geodir_show_home_bottom_section')) {
|
|
| 83 | + register_sidebars(1, array('id' => 'geodir_home_bottom', 'name' => __('GD Home Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 98 | 84 | |
| 99 | - $geodir_sidebars[] = 'geodir_listing_top'; |
|
| 100 | - } |
|
| 85 | + $geodir_sidebars[] = 'geodir_home_bottom'; |
|
| 86 | + } |
|
| 101 | 87 | |
| 102 | - if (get_option('geodir_show_listing_left_section')) {
|
|
| 103 | - register_sidebars(1, array('id' => 'geodir_listing_left_sidebar', 'name' => __('GD Listing Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 88 | + /*===========================*/ |
|
| 89 | + /* Home page sidebars end*/ |
|
| 90 | + /*===========================*/ |
|
| 104 | 91 | |
| 105 | - $geodir_sidebars[] = 'geodir_listing_left_sidebar'; |
|
| 106 | - } |
|
| 92 | + /*===========================*/ |
|
| 93 | + /* Listing page sidebars start*/ |
|
| 94 | + /*===========================*/ |
|
| 107 | 95 | |
| 108 | - if (get_option('geodir_show_listing_right_section')) {
|
|
| 109 | - register_sidebars(1, array('id' => 'geodir_listing_right_sidebar', 'name' => __('GD Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 96 | + if (get_option('geodir_show_listing_top_section')) {
|
|
| 97 | + register_sidebars(1, array('id' => 'geodir_listing_top', 'name' => __('GD Listing Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 110 | 98 | |
| 111 | - $geodir_sidebars[] = 'geodir_listing_right_sidebar'; |
|
| 112 | - } |
|
| 99 | + $geodir_sidebars[] = 'geodir_listing_top'; |
|
| 100 | + } |
|
| 113 | 101 | |
| 114 | - if (get_option('geodir_show_listing_bottom_section')) {
|
|
| 115 | - register_sidebars(1, array('id' => 'geodir_listing_bottom', 'name' => __('GD Listing Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 102 | + if (get_option('geodir_show_listing_left_section')) {
|
|
| 103 | + register_sidebars(1, array('id' => 'geodir_listing_left_sidebar', 'name' => __('GD Listing Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 116 | 104 | |
| 117 | - $geodir_sidebars[] = 'geodir_listing_bottom'; |
|
| 118 | - } |
|
| 105 | + $geodir_sidebars[] = 'geodir_listing_left_sidebar'; |
|
| 106 | + } |
|
| 119 | 107 | |
| 120 | - /*===========================*/ |
|
| 121 | - /* Listing page sidebars start*/ |
|
| 122 | - /*===========================*/ |
|
| 108 | + if (get_option('geodir_show_listing_right_section')) {
|
|
| 109 | + register_sidebars(1, array('id' => 'geodir_listing_right_sidebar', 'name' => __('GD Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 123 | 110 | |
| 124 | - /*===========================*/ |
|
| 125 | - /* Search page sidebars start*/ |
|
| 126 | - /*===========================*/ |
|
| 111 | + $geodir_sidebars[] = 'geodir_listing_right_sidebar'; |
|
| 112 | + } |
|
| 127 | 113 | |
| 128 | - if (get_option('geodir_show_search_top_section')) {
|
|
| 129 | - register_sidebars(1, array('id' => 'geodir_search_top', 'name' => __('GD Search Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 114 | + if (get_option('geodir_show_listing_bottom_section')) {
|
|
| 115 | + register_sidebars(1, array('id' => 'geodir_listing_bottom', 'name' => __('GD Listing Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 130 | 116 | |
| 131 | - $geodir_sidebars[] = 'geodir_search_top'; |
|
| 132 | - } |
|
| 117 | + $geodir_sidebars[] = 'geodir_listing_bottom'; |
|
| 118 | + } |
|
| 133 | 119 | |
| 134 | - if (get_option('geodir_show_search_left_section')) {
|
|
| 135 | - register_sidebars(1, array('id' => 'geodir_search_left_sidebar', 'name' => __('GD Search Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 120 | + /*===========================*/ |
|
| 121 | + /* Listing page sidebars start*/ |
|
| 122 | + /*===========================*/ |
|
| 136 | 123 | |
| 137 | - $geodir_sidebars[] = 'geodir_search_left_sidebar'; |
|
| 138 | - } |
|
| 124 | + /*===========================*/ |
|
| 125 | + /* Search page sidebars start*/ |
|
| 126 | + /*===========================*/ |
|
| 139 | 127 | |
| 140 | - if (get_option('geodir_show_search_right_section')) {
|
|
| 141 | - register_sidebars(1, array('id' => 'geodir_search_right_sidebar', 'name' => __('GD Search Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 128 | + if (get_option('geodir_show_search_top_section')) {
|
|
| 129 | + register_sidebars(1, array('id' => 'geodir_search_top', 'name' => __('GD Search Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 142 | 130 | |
| 143 | - $geodir_sidebars[] = 'geodir_search_right_sidebar'; |
|
| 144 | - } |
|
| 131 | + $geodir_sidebars[] = 'geodir_search_top'; |
|
| 132 | + } |
|
| 145 | 133 | |
| 146 | - if (get_option('geodir_show_search_bottom_section')) {
|
|
| 147 | - register_sidebars(1, array('id' => 'geodir_search_bottom', 'name' => __('GD Search Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 134 | + if (get_option('geodir_show_search_left_section')) {
|
|
| 135 | + register_sidebars(1, array('id' => 'geodir_search_left_sidebar', 'name' => __('GD Search Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 148 | 136 | |
| 149 | - $geodir_sidebars[] = 'geodir_search_bottom'; |
|
| 150 | - } |
|
| 137 | + $geodir_sidebars[] = 'geodir_search_left_sidebar'; |
|
| 138 | + } |
|
| 151 | 139 | |
| 152 | - /*===========================*/ |
|
| 153 | - /* Search page sidebars end*/ |
|
| 154 | - /*===========================*/ |
|
| 140 | + if (get_option('geodir_show_search_right_section')) {
|
|
| 141 | + register_sidebars(1, array('id' => 'geodir_search_right_sidebar', 'name' => __('GD Search Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 155 | 142 | |
| 156 | - /*==================================*/ |
|
| 157 | - /* Detail/Single page sidebars start*/ |
|
| 158 | - /*==================================*/ |
|
| 159 | - if (get_option('geodir_show_detail_top_section')) {
|
|
| 160 | - register_sidebars(1, array('id' => 'geodir_detail_top', 'name' => __('GD Detail Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 143 | + $geodir_sidebars[] = 'geodir_search_right_sidebar'; |
|
| 144 | + } |
|
| 161 | 145 | |
| 162 | - $geodir_sidebars[] = 'geodir_detail_top'; |
|
| 163 | - } |
|
| 146 | + if (get_option('geodir_show_search_bottom_section')) {
|
|
| 147 | + register_sidebars(1, array('id' => 'geodir_search_bottom', 'name' => __('GD Search Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 164 | 148 | |
| 165 | - register_sidebars(1, array('id' => 'geodir_detail_sidebar', 'name' => __('GD Detail Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 149 | + $geodir_sidebars[] = 'geodir_search_bottom'; |
|
| 150 | + } |
|
| 166 | 151 | |
| 167 | - $geodir_sidebars[] = 'geodir_detail_sidebar'; |
|
| 152 | + /*===========================*/ |
|
| 153 | + /* Search page sidebars end*/ |
|
| 154 | + /*===========================*/ |
|
| 168 | 155 | |
| 169 | - if (get_option('geodir_show_detail_bottom_section')) {
|
|
| 170 | - register_sidebars(1, array('id' => 'geodir_detail_bottom', 'name' => __('GD Detail Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 156 | + /*==================================*/ |
|
| 157 | + /* Detail/Single page sidebars start*/ |
|
| 158 | + /*==================================*/ |
|
| 159 | + if (get_option('geodir_show_detail_top_section')) {
|
|
| 160 | + register_sidebars(1, array('id' => 'geodir_detail_top', 'name' => __('GD Detail Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 171 | 161 | |
| 172 | - $geodir_sidebars[] = 'geodir_detail_bottom'; |
|
| 173 | - } |
|
| 162 | + $geodir_sidebars[] = 'geodir_detail_top'; |
|
| 163 | + } |
|
| 174 | 164 | |
| 175 | - /*==================================*/ |
|
| 176 | - /* Detail/Single page sidebars end*/ |
|
| 177 | - /*==================================*/ |
|
| 165 | + register_sidebars(1, array('id' => 'geodir_detail_sidebar', 'name' => __('GD Detail Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 178 | 166 | |
| 179 | - /*==================================*/ |
|
| 180 | - /* Author page sidebars start */ |
|
| 181 | - /*==================================*/ |
|
| 167 | + $geodir_sidebars[] = 'geodir_detail_sidebar'; |
|
| 182 | 168 | |
| 183 | - if (get_option('geodir_show_author_top_section')) {
|
|
| 184 | - register_sidebars(1, array('id' => 'geodir_author_top', 'name' => __('GD Author Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 169 | + if (get_option('geodir_show_detail_bottom_section')) {
|
|
| 170 | + register_sidebars(1, array('id' => 'geodir_detail_bottom', 'name' => __('GD Detail Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 185 | 171 | |
| 186 | - $geodir_sidebars[] = 'geodir_author_top'; |
|
| 187 | - } |
|
| 172 | + $geodir_sidebars[] = 'geodir_detail_bottom'; |
|
| 173 | + } |
|
| 188 | 174 | |
| 189 | - if (get_option('geodir_show_author_left_section')) {
|
|
| 190 | - register_sidebars(1, array('id' => 'geodir_author_left_sidebar', 'name' => __('GD Author Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 175 | + /*==================================*/ |
|
| 176 | + /* Detail/Single page sidebars end*/ |
|
| 177 | + /*==================================*/ |
|
| 191 | 178 | |
| 192 | - $geodir_sidebars[] = 'geodir_author_left_sidebar'; |
|
| 193 | - } |
|
| 179 | + /*==================================*/ |
|
| 180 | + /* Author page sidebars start */ |
|
| 181 | + /*==================================*/ |
|
| 194 | 182 | |
| 195 | - if (get_option('geodir_show_author_right_section')) {
|
|
| 196 | - register_sidebars(1, array('id' => 'geodir_author_right_sidebar', 'name' => __('GD Author Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 183 | + if (get_option('geodir_show_author_top_section')) {
|
|
| 184 | + register_sidebars(1, array('id' => 'geodir_author_top', 'name' => __('GD Author Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 197 | 185 | |
| 198 | - $geodir_sidebars[] = 'geodir_author_right_sidebar'; |
|
| 199 | - } |
|
| 186 | + $geodir_sidebars[] = 'geodir_author_top'; |
|
| 187 | + } |
|
| 200 | 188 | |
| 201 | - if (get_option('geodir_show_author_bottom_section')) {
|
|
| 202 | - register_sidebars(1, array('id' => 'geodir_author_bottom', 'name' => __('GD Author Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 189 | + if (get_option('geodir_show_author_left_section')) {
|
|
| 190 | + register_sidebars(1, array('id' => 'geodir_author_left_sidebar', 'name' => __('GD Author Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 203 | 191 | |
| 204 | - $geodir_sidebars[] = 'geodir_author_bottom'; |
|
| 205 | - } |
|
| 192 | + $geodir_sidebars[] = 'geodir_author_left_sidebar'; |
|
| 193 | + } |
|
| 206 | 194 | |
| 207 | - /*==================================*/ |
|
| 208 | - /* Author page sidebars end */ |
|
| 209 | - /*==================================*/ |
|
| 195 | + if (get_option('geodir_show_author_right_section')) {
|
|
| 196 | + register_sidebars(1, array('id' => 'geodir_author_right_sidebar', 'name' => __('GD Author Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 210 | 197 | |
| 211 | - /*==================================*/ |
|
| 212 | - /* Add listing page sidebars start */ |
|
| 213 | - /*==================================*/ |
|
| 198 | + $geodir_sidebars[] = 'geodir_author_right_sidebar'; |
|
| 199 | + } |
|
| 214 | 200 | |
| 215 | - register_sidebars(1, array('id' => 'geodir_add_listing_sidebar', 'name' => __('GD Add Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 201 | + if (get_option('geodir_show_author_bottom_section')) {
|
|
| 202 | + register_sidebars(1, array('id' => 'geodir_author_bottom', 'name' => __('GD Author Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 216 | 203 | |
| 217 | - $geodir_sidebars[] = 'geodir_add_listing_sidebar'; |
|
| 204 | + $geodir_sidebars[] = 'geodir_author_bottom'; |
|
| 205 | + } |
|
| 218 | 206 | |
| 219 | - /*==================================*/ |
|
| 220 | - /* Add listing page sidebars end */ |
|
| 221 | - /*==================================*/ |
|
| 207 | + /*==================================*/ |
|
| 208 | + /* Author page sidebars end */ |
|
| 209 | + /*==================================*/ |
|
| 222 | 210 | |
| 223 | - } |
|
| 211 | + /*==================================*/ |
|
| 212 | + /* Add listing page sidebars start */ |
|
| 213 | + /*==================================*/ |
|
| 214 | + |
|
| 215 | + register_sidebars(1, array('id' => 'geodir_add_listing_sidebar', 'name' => __('GD Add Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title));
|
|
| 216 | + |
|
| 217 | + $geodir_sidebars[] = 'geodir_add_listing_sidebar'; |
|
| 218 | + |
|
| 219 | + /*==================================*/ |
|
| 220 | + /* Add listing page sidebars end */ |
|
| 221 | + /*==================================*/ |
|
| 222 | + |
|
| 223 | + } |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | |
| 227 | 227 | if (!function_exists('register_geodir_widgets')) {
|
| 228 | - /** |
|
| 229 | - * Registers all Widgets. |
|
| 230 | - * |
|
| 231 | - * @since 1.0.0 |
|
| 232 | - * @package GeoDirectory |
|
| 233 | - */ |
|
| 234 | - function register_geodir_widgets() |
|
| 235 | - {
|
|
| 236 | - /** |
|
| 237 | - * Login Widget. |
|
| 238 | - * |
|
| 239 | - * @since 1.0.0 |
|
| 240 | - */ |
|
| 241 | - class geodir_loginwidget extends WP_Widget |
|
| 242 | - {
|
|
| 243 | - /** |
|
| 244 | - * Register the login widget with WordPress. |
|
| 245 | - * |
|
| 246 | - * @since 1.0.0 |
|
| 247 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 248 | - */ |
|
| 249 | - public function __construct() {
|
|
| 250 | - $widget_ops = array('classname' => 'geodir_loginbox', 'description' => __('Geodirectory Loginbox Widget', 'geodirectory'));
|
|
| 251 | - parent::__construct( |
|
| 252 | - 'geodir_loginbox', // Base ID |
|
| 253 | - __('GD > Loginbox', 'geodirectory'), // Name
|
|
| 254 | - $widget_ops// Args |
|
| 255 | - ); |
|
| 256 | - } |
|
| 257 | - |
|
| 258 | - /** |
|
| 259 | - * Front-end display content for login widget. |
|
| 260 | - * |
|
| 261 | - * @since 1.0.0 |
|
| 262 | - * @since 1.5.1 Declare function public. |
|
| 263 | - * |
|
| 264 | - * @param array $args Widget arguments. |
|
| 265 | - * @param array $instance Saved values from database. |
|
| 266 | - */ |
|
| 267 | - public function widget($args, $instance) |
|
| 268 | - {
|
|
| 269 | - geodir_loginwidget_output($args, $instance); |
|
| 270 | - } |
|
| 271 | - |
|
| 272 | - /** |
|
| 273 | - * Sanitize login widget form values as they are saved. |
|
| 274 | - * |
|
| 275 | - * @since 1.0.0 |
|
| 276 | - * @since 1.5.1 Declare function public. |
|
| 277 | - * |
|
| 278 | - * @param array $new_instance Values just sent to be saved. |
|
| 279 | - * @param array $old_instance Previously saved values from database. |
|
| 280 | - * |
|
| 281 | - * @return array Updated safe values to be saved. |
|
| 282 | - */ |
|
| 283 | - public function update($new_instance, $old_instance) |
|
| 284 | - {
|
|
| 285 | - //save the widget |
|
| 286 | - $instance = $old_instance; |
|
| 287 | - $instance['title'] = strip_tags($new_instance['title']); |
|
| 288 | - |
|
| 289 | - return $instance; |
|
| 290 | - } |
|
| 291 | - |
|
| 292 | - /** |
|
| 293 | - * Back-end login widget settings form. |
|
| 294 | - * |
|
| 295 | - * @since 1.0.0 |
|
| 296 | - * @since 1.5.1 Declare function public. |
|
| 297 | - * |
|
| 298 | - * @param array $instance Previously saved values from database. |
|
| 299 | - * @return string|void |
|
| 300 | - */ |
|
| 301 | - public function form($instance) |
|
| 302 | - {
|
|
| 303 | - //widgetform in backend |
|
| 304 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 305 | - $title = strip_tags($instance['title']); |
|
| 306 | - |
|
| 307 | - ?> |
|
| 228 | + /** |
|
| 229 | + * Registers all Widgets. |
|
| 230 | + * |
|
| 231 | + * @since 1.0.0 |
|
| 232 | + * @package GeoDirectory |
|
| 233 | + */ |
|
| 234 | + function register_geodir_widgets() |
|
| 235 | + {
|
|
| 236 | + /** |
|
| 237 | + * Login Widget. |
|
| 238 | + * |
|
| 239 | + * @since 1.0.0 |
|
| 240 | + */ |
|
| 241 | + class geodir_loginwidget extends WP_Widget |
|
| 242 | + {
|
|
| 243 | + /** |
|
| 244 | + * Register the login widget with WordPress. |
|
| 245 | + * |
|
| 246 | + * @since 1.0.0 |
|
| 247 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 248 | + */ |
|
| 249 | + public function __construct() {
|
|
| 250 | + $widget_ops = array('classname' => 'geodir_loginbox', 'description' => __('Geodirectory Loginbox Widget', 'geodirectory'));
|
|
| 251 | + parent::__construct( |
|
| 252 | + 'geodir_loginbox', // Base ID |
|
| 253 | + __('GD > Loginbox', 'geodirectory'), // Name
|
|
| 254 | + $widget_ops// Args |
|
| 255 | + ); |
|
| 256 | + } |
|
| 257 | + |
|
| 258 | + /** |
|
| 259 | + * Front-end display content for login widget. |
|
| 260 | + * |
|
| 261 | + * @since 1.0.0 |
|
| 262 | + * @since 1.5.1 Declare function public. |
|
| 263 | + * |
|
| 264 | + * @param array $args Widget arguments. |
|
| 265 | + * @param array $instance Saved values from database. |
|
| 266 | + */ |
|
| 267 | + public function widget($args, $instance) |
|
| 268 | + {
|
|
| 269 | + geodir_loginwidget_output($args, $instance); |
|
| 270 | + } |
|
| 271 | + |
|
| 272 | + /** |
|
| 273 | + * Sanitize login widget form values as they are saved. |
|
| 274 | + * |
|
| 275 | + * @since 1.0.0 |
|
| 276 | + * @since 1.5.1 Declare function public. |
|
| 277 | + * |
|
| 278 | + * @param array $new_instance Values just sent to be saved. |
|
| 279 | + * @param array $old_instance Previously saved values from database. |
|
| 280 | + * |
|
| 281 | + * @return array Updated safe values to be saved. |
|
| 282 | + */ |
|
| 283 | + public function update($new_instance, $old_instance) |
|
| 284 | + {
|
|
| 285 | + //save the widget |
|
| 286 | + $instance = $old_instance; |
|
| 287 | + $instance['title'] = strip_tags($new_instance['title']); |
|
| 288 | + |
|
| 289 | + return $instance; |
|
| 290 | + } |
|
| 291 | + |
|
| 292 | + /** |
|
| 293 | + * Back-end login widget settings form. |
|
| 294 | + * |
|
| 295 | + * @since 1.0.0 |
|
| 296 | + * @since 1.5.1 Declare function public. |
|
| 297 | + * |
|
| 298 | + * @param array $instance Previously saved values from database. |
|
| 299 | + * @return string|void |
|
| 300 | + */ |
|
| 301 | + public function form($instance) |
|
| 302 | + {
|
|
| 303 | + //widgetform in backend |
|
| 304 | + $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 305 | + $title = strip_tags($instance['title']); |
|
| 306 | + |
|
| 307 | + ?> |
|
| 308 | 308 | <p><label |
| 309 | 309 | for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title', 'geodirectory'); ?>
|
| 310 | 310 | : <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
|
@@ -313,64 +313,64 @@ discard block |
||
| 313 | 313 | |
| 314 | 314 | |
| 315 | 315 | <?php |
| 316 | - } |
|
| 317 | - } |
|
| 318 | - |
|
| 319 | - register_widget('geodir_loginwidget');
|
|
| 320 | - |
|
| 321 | - |
|
| 322 | - /** |
|
| 323 | - * GeoDirectory Social Like Widget. |
|
| 324 | - * |
|
| 325 | - * @since 1.0.0 |
|
| 326 | - */ |
|
| 327 | - class geodir_social_like_widget extends WP_Widget |
|
| 328 | - {
|
|
| 329 | - |
|
| 330 | - /** |
|
| 331 | - * Register the social like widget with WordPress. |
|
| 332 | - * |
|
| 333 | - * @since 1.0.0 |
|
| 334 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 335 | - */ |
|
| 336 | - public function __construct() {
|
|
| 337 | - $widget_ops = array('classname' => 'geodir_social_like_widget', 'description' => __('GD > Twitter,Facebook and Google+ buttons', 'geodirectory'));
|
|
| 338 | - parent::__construct( |
|
| 339 | - 'social_like_widget', // Base ID |
|
| 340 | - __('GD > Social Like', 'geodirectory'), // Name
|
|
| 341 | - $widget_ops// Args |
|
| 342 | - ); |
|
| 343 | - } |
|
| 344 | - |
|
| 345 | - /** |
|
| 346 | - * Front-end display content for social like widget. |
|
| 347 | - * |
|
| 348 | - * @since 1.0.0 |
|
| 349 | - * @since 1.5.1 Declare function public. |
|
| 350 | - * |
|
| 351 | - * @param array $args Widget arguments. |
|
| 352 | - * @param array $instance Saved values from database. |
|
| 353 | - */ |
|
| 354 | - public function widget($args, $instance) |
|
| 355 | - {
|
|
| 356 | - // prints the widget |
|
| 357 | - extract($args, EXTR_SKIP); |
|
| 358 | - |
|
| 359 | - /** |
|
| 360 | - * Filter the widget title text. |
|
| 361 | - * |
|
| 362 | - * @since 1.0.0 |
|
| 363 | - * @global object $current_user Current user object. |
|
| 364 | - * @param string $title The widget title text. |
|
| 365 | - */ |
|
| 366 | - $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
|
| 367 | - |
|
| 368 | - global $current_user, $post; |
|
| 369 | - echo $before_widget; |
|
| 370 | - ?> |
|
| 316 | + } |
|
| 317 | + } |
|
| 318 | + |
|
| 319 | + register_widget('geodir_loginwidget');
|
|
| 320 | + |
|
| 321 | + |
|
| 322 | + /** |
|
| 323 | + * GeoDirectory Social Like Widget. |
|
| 324 | + * |
|
| 325 | + * @since 1.0.0 |
|
| 326 | + */ |
|
| 327 | + class geodir_social_like_widget extends WP_Widget |
|
| 328 | + {
|
|
| 329 | + |
|
| 330 | + /** |
|
| 331 | + * Register the social like widget with WordPress. |
|
| 332 | + * |
|
| 333 | + * @since 1.0.0 |
|
| 334 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 335 | + */ |
|
| 336 | + public function __construct() {
|
|
| 337 | + $widget_ops = array('classname' => 'geodir_social_like_widget', 'description' => __('GD > Twitter,Facebook and Google+ buttons', 'geodirectory'));
|
|
| 338 | + parent::__construct( |
|
| 339 | + 'social_like_widget', // Base ID |
|
| 340 | + __('GD > Social Like', 'geodirectory'), // Name
|
|
| 341 | + $widget_ops// Args |
|
| 342 | + ); |
|
| 343 | + } |
|
| 344 | + |
|
| 345 | + /** |
|
| 346 | + * Front-end display content for social like widget. |
|
| 347 | + * |
|
| 348 | + * @since 1.0.0 |
|
| 349 | + * @since 1.5.1 Declare function public. |
|
| 350 | + * |
|
| 351 | + * @param array $args Widget arguments. |
|
| 352 | + * @param array $instance Saved values from database. |
|
| 353 | + */ |
|
| 354 | + public function widget($args, $instance) |
|
| 355 | + {
|
|
| 356 | + // prints the widget |
|
| 357 | + extract($args, EXTR_SKIP); |
|
| 358 | + |
|
| 359 | + /** |
|
| 360 | + * Filter the widget title text. |
|
| 361 | + * |
|
| 362 | + * @since 1.0.0 |
|
| 363 | + * @global object $current_user Current user object. |
|
| 364 | + * @param string $title The widget title text. |
|
| 365 | + */ |
|
| 366 | + $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
|
| 367 | + |
|
| 368 | + global $current_user, $post; |
|
| 369 | + echo $before_widget; |
|
| 370 | + ?> |
|
| 371 | 371 | |
| 372 | 372 | <?php //if ( get_option('gd_tweet_button') ) {
|
| 373 | - ?> |
|
| 373 | + ?> |
|
| 374 | 374 | |
| 375 | 375 | <a href="http://twitter.com/share" |
| 376 | 376 | class="twitter-share-button"><?php _e('Tweet', 'geodirectory');?></a>
|
@@ -378,23 +378,23 @@ discard block |
||
| 378 | 378 | <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> |
| 379 | 379 | |
| 380 | 380 | <?php //} |
| 381 | - ?> |
|
| 381 | + ?> |
|
| 382 | 382 | |
| 383 | 383 | <?php // if ( get_option('gd_facebook_button') ) {
|
| 384 | - ?> |
|
| 384 | + ?> |
|
| 385 | 385 | |
| 386 | 386 | <iframe <?php if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) {
|
| 387 | - echo 'allowtransparency="true"'; |
|
| 388 | - }?> class="facebook" |
|
| 387 | + echo 'allowtransparency="true"'; |
|
| 388 | + }?> class="facebook" |
|
| 389 | 389 | src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode(geodir_curPageURL()); ?>&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light" |
| 390 | 390 | style="border:none; overflow:hidden; width:100px; height:20px"></iframe> |
| 391 | 391 | |
| 392 | 392 | |
| 393 | 393 | <?php //} |
| 394 | - ?> |
|
| 394 | + ?> |
|
| 395 | 395 | |
| 396 | 396 | <?php //if ( get_option('gd_google_button') ) {
|
| 397 | - ?> |
|
| 397 | + ?> |
|
| 398 | 398 | <script> |
| 399 | 399 | window.___gcfg = {
|
| 400 | 400 | parsetags: 'explicit' |
@@ -408,118 +408,118 @@ discard block |
||
| 408 | 408 | "count": "true" |
| 409 | 409 | });</script> |
| 410 | 410 | <?php //} |
| 411 | - echo $after_widget; |
|
| 412 | - |
|
| 413 | - } |
|
| 414 | - |
|
| 415 | - /** |
|
| 416 | - * Sanitize social like widget form values as they are saved. |
|
| 417 | - * |
|
| 418 | - * @since 1.0.0 |
|
| 419 | - * @since 1.5.1 Declare function public. |
|
| 420 | - * |
|
| 421 | - * @param array $new_instance Values just sent to be saved. |
|
| 422 | - * @param array $old_instance Previously saved values from database. |
|
| 423 | - * |
|
| 424 | - * @return array Updated safe values to be saved. |
|
| 425 | - */ |
|
| 426 | - public function update($new_instance, $old_instance) |
|
| 427 | - {
|
|
| 428 | - //save the widget |
|
| 429 | - $instance = $old_instance; |
|
| 430 | - $instance['title'] = strip_tags($new_instance['title']); |
|
| 431 | - return $instance; |
|
| 432 | - } |
|
| 433 | - |
|
| 434 | - /** |
|
| 435 | - * Back-end social like widget settings form. |
|
| 436 | - * |
|
| 437 | - * @since 1.0.0 |
|
| 438 | - * @since 1.5.1 Declare function public. |
|
| 439 | - * |
|
| 440 | - * @param array $instance Previously saved values from database. |
|
| 441 | - * @return string|void |
|
| 442 | - */ |
|
| 443 | - public function form($instance) |
|
| 444 | - {
|
|
| 445 | - //widgetform in backend |
|
| 446 | - $instance = wp_parse_args((array)$instance, array('title' => ''));
|
|
| 447 | - $title = strip_tags($instance['title']); |
|
| 448 | - ?> |
|
| 411 | + echo $after_widget; |
|
| 412 | + |
|
| 413 | + } |
|
| 414 | + |
|
| 415 | + /** |
|
| 416 | + * Sanitize social like widget form values as they are saved. |
|
| 417 | + * |
|
| 418 | + * @since 1.0.0 |
|
| 419 | + * @since 1.5.1 Declare function public. |
|
| 420 | + * |
|
| 421 | + * @param array $new_instance Values just sent to be saved. |
|
| 422 | + * @param array $old_instance Previously saved values from database. |
|
| 423 | + * |
|
| 424 | + * @return array Updated safe values to be saved. |
|
| 425 | + */ |
|
| 426 | + public function update($new_instance, $old_instance) |
|
| 427 | + {
|
|
| 428 | + //save the widget |
|
| 429 | + $instance = $old_instance; |
|
| 430 | + $instance['title'] = strip_tags($new_instance['title']); |
|
| 431 | + return $instance; |
|
| 432 | + } |
|
| 433 | + |
|
| 434 | + /** |
|
| 435 | + * Back-end social like widget settings form. |
|
| 436 | + * |
|
| 437 | + * @since 1.0.0 |
|
| 438 | + * @since 1.5.1 Declare function public. |
|
| 439 | + * |
|
| 440 | + * @param array $instance Previously saved values from database. |
|
| 441 | + * @return string|void |
|
| 442 | + */ |
|
| 443 | + public function form($instance) |
|
| 444 | + {
|
|
| 445 | + //widgetform in backend |
|
| 446 | + $instance = wp_parse_args((array)$instance, array('title' => ''));
|
|
| 447 | + $title = strip_tags($instance['title']); |
|
| 448 | + ?> |
|
| 449 | 449 | <p>No settings for this widget</p> |
| 450 | 450 | |
| 451 | 451 | |
| 452 | 452 | <?php |
| 453 | - } |
|
| 454 | - } |
|
| 455 | - |
|
| 456 | - register_widget('geodir_social_like_widget');
|
|
| 457 | - |
|
| 458 | - |
|
| 459 | - /** |
|
| 460 | - * GeoDirectory Feedburner Subscribe widget. |
|
| 461 | - * |
|
| 462 | - * @since 1.0.0 |
|
| 463 | - */ |
|
| 464 | - class geodirsubscribeWidget extends WP_Widget |
|
| 465 | - {
|
|
| 466 | - |
|
| 467 | - /** |
|
| 468 | - * Register the feedburner subscribe widget with WordPress. |
|
| 469 | - * |
|
| 470 | - * @since 1.0.0 |
|
| 471 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 472 | - */ |
|
| 473 | - public function __construct() {
|
|
| 474 | - $widget_ops = array('classname' => 'geodir-subscribe', 'description' => __('GD > Google Feedburner Subscribe', 'geodirectory'));
|
|
| 475 | - parent::__construct( |
|
| 476 | - 'widget_subscribeWidget', // Base ID |
|
| 477 | - __('GD > Subscribe', 'geodirectory'), // Name
|
|
| 478 | - $widget_ops// Args |
|
| 479 | - ); |
|
| 480 | - } |
|
| 481 | - |
|
| 482 | - /** |
|
| 483 | - * Front-end display content for feedburner subscribe widget. |
|
| 484 | - * |
|
| 485 | - * @since 1.0.0 |
|
| 486 | - * @since 1.5.1 Declare function public. |
|
| 487 | - * |
|
| 488 | - * @param array $args Widget arguments. |
|
| 489 | - * @param array $instance Saved values from database. |
|
| 490 | - */ |
|
| 491 | - public function widget($args, $instance) |
|
| 492 | - {
|
|
| 493 | - // prints the widget |
|
| 494 | - extract($args, EXTR_SKIP); |
|
| 495 | - |
|
| 496 | - /** |
|
| 497 | - * Filter the widget instance id. |
|
| 498 | - * |
|
| 499 | - * @since 1.0.0 |
|
| 500 | - * @param string $id The widget instance id. |
|
| 501 | - */ |
|
| 502 | - $id = empty($instance['id']) ? '' : apply_filters('widget_id', $instance['id']);
|
|
| 503 | - |
|
| 504 | - /** This filter is documented in geodirectory_widgets.php */ |
|
| 505 | - $title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
|
|
| 506 | - |
|
| 507 | - /** |
|
| 508 | - * Filter the widget text. |
|
| 509 | - * |
|
| 510 | - * @since 1.0.0 |
|
| 511 | - * @param string $text The widget text. |
|
| 512 | - */ |
|
| 513 | - $text = empty($instance['text']) ? '' : apply_filters('widget_text', $instance['text']);
|
|
| 514 | - |
|
| 515 | - echo $before_widget; |
|
| 516 | - ?> |
|
| 453 | + } |
|
| 454 | + } |
|
| 455 | + |
|
| 456 | + register_widget('geodir_social_like_widget');
|
|
| 457 | + |
|
| 458 | + |
|
| 459 | + /** |
|
| 460 | + * GeoDirectory Feedburner Subscribe widget. |
|
| 461 | + * |
|
| 462 | + * @since 1.0.0 |
|
| 463 | + */ |
|
| 464 | + class geodirsubscribeWidget extends WP_Widget |
|
| 465 | + {
|
|
| 466 | + |
|
| 467 | + /** |
|
| 468 | + * Register the feedburner subscribe widget with WordPress. |
|
| 469 | + * |
|
| 470 | + * @since 1.0.0 |
|
| 471 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 472 | + */ |
|
| 473 | + public function __construct() {
|
|
| 474 | + $widget_ops = array('classname' => 'geodir-subscribe', 'description' => __('GD > Google Feedburner Subscribe', 'geodirectory'));
|
|
| 475 | + parent::__construct( |
|
| 476 | + 'widget_subscribeWidget', // Base ID |
|
| 477 | + __('GD > Subscribe', 'geodirectory'), // Name
|
|
| 478 | + $widget_ops// Args |
|
| 479 | + ); |
|
| 480 | + } |
|
| 481 | + |
|
| 482 | + /** |
|
| 483 | + * Front-end display content for feedburner subscribe widget. |
|
| 484 | + * |
|
| 485 | + * @since 1.0.0 |
|
| 486 | + * @since 1.5.1 Declare function public. |
|
| 487 | + * |
|
| 488 | + * @param array $args Widget arguments. |
|
| 489 | + * @param array $instance Saved values from database. |
|
| 490 | + */ |
|
| 491 | + public function widget($args, $instance) |
|
| 492 | + {
|
|
| 493 | + // prints the widget |
|
| 494 | + extract($args, EXTR_SKIP); |
|
| 495 | + |
|
| 496 | + /** |
|
| 497 | + * Filter the widget instance id. |
|
| 498 | + * |
|
| 499 | + * @since 1.0.0 |
|
| 500 | + * @param string $id The widget instance id. |
|
| 501 | + */ |
|
| 502 | + $id = empty($instance['id']) ? '' : apply_filters('widget_id', $instance['id']);
|
|
| 503 | + |
|
| 504 | + /** This filter is documented in geodirectory_widgets.php */ |
|
| 505 | + $title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
|
|
| 506 | + |
|
| 507 | + /** |
|
| 508 | + * Filter the widget text. |
|
| 509 | + * |
|
| 510 | + * @since 1.0.0 |
|
| 511 | + * @param string $text The widget text. |
|
| 512 | + */ |
|
| 513 | + $text = empty($instance['text']) ? '' : apply_filters('widget_text', $instance['text']);
|
|
| 514 | + |
|
| 515 | + echo $before_widget; |
|
| 516 | + ?> |
|
| 517 | 517 | |
| 518 | 518 | <?php echo $before_title . $title; ?> <a href="<?php if ($id) {
|
| 519 | - echo 'http://feeds2.feedburner.com/' . $id; |
|
| 520 | - } else {
|
|
| 521 | - bloginfo('rss_url');
|
|
| 522 | - } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title;?> |
|
| 519 | + echo 'http://feeds2.feedburner.com/' . $id; |
|
| 520 | + } else {
|
|
| 521 | + bloginfo('rss_url');
|
|
| 522 | + } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title;?> |
|
| 523 | 523 | |
| 524 | 524 | <?php if ($text <> "") { ?>
|
| 525 | 525 | |
@@ -544,57 +544,57 @@ discard block |
||
| 544 | 544 | </form> |
| 545 | 545 | |
| 546 | 546 | <?php |
| 547 | - echo $after_widget; |
|
| 547 | + echo $after_widget; |
|
| 548 | 548 | |
| 549 | - } |
|
| 549 | + } |
|
| 550 | 550 | |
| 551 | - /** |
|
| 552 | - * Sanitize feedburner subscribe widget form values as they are saved. |
|
| 553 | - * |
|
| 554 | - * @since 1.0.0 |
|
| 555 | - * @since 1.5.1 Declare function public. |
|
| 556 | - * |
|
| 557 | - * @param array $new_instance Values just sent to be saved. |
|
| 558 | - * @param array $old_instance Previously saved values from database. |
|
| 559 | - * |
|
| 560 | - * @return array Updated safe values to be saved. |
|
| 561 | - */ |
|
| 562 | - public function update($new_instance, $old_instance) |
|
| 563 | - {
|
|
| 551 | + /** |
|
| 552 | + * Sanitize feedburner subscribe widget form values as they are saved. |
|
| 553 | + * |
|
| 554 | + * @since 1.0.0 |
|
| 555 | + * @since 1.5.1 Declare function public. |
|
| 556 | + * |
|
| 557 | + * @param array $new_instance Values just sent to be saved. |
|
| 558 | + * @param array $old_instance Previously saved values from database. |
|
| 559 | + * |
|
| 560 | + * @return array Updated safe values to be saved. |
|
| 561 | + */ |
|
| 562 | + public function update($new_instance, $old_instance) |
|
| 563 | + {
|
|
| 564 | 564 | |
| 565 | - //save the widget |
|
| 566 | - $instance = $old_instance; |
|
| 567 | - $instance['id'] = strip_tags($new_instance['id']); |
|
| 568 | - $instance['title'] = ($new_instance['title']); |
|
| 569 | - $instance['text'] = ($new_instance['text']); |
|
| 565 | + //save the widget |
|
| 566 | + $instance = $old_instance; |
|
| 567 | + $instance['id'] = strip_tags($new_instance['id']); |
|
| 568 | + $instance['title'] = ($new_instance['title']); |
|
| 569 | + $instance['text'] = ($new_instance['text']); |
|
| 570 | 570 | |
| 571 | 571 | |
| 572 | - return $instance; |
|
| 573 | - } |
|
| 572 | + return $instance; |
|
| 573 | + } |
|
| 574 | 574 | |
| 575 | - /** |
|
| 576 | - * Back-end feedburner subscribe widget settings form. |
|
| 577 | - * |
|
| 578 | - * @since 1.0.0 |
|
| 579 | - * @since 1.5.1 Declare function public. |
|
| 580 | - * |
|
| 581 | - * @param array $instance Previously saved values from database. |
|
| 582 | - * @return string|void |
|
| 583 | - */ |
|
| 584 | - public function form($instance) |
|
| 585 | - {
|
|
| 586 | - //widgetform in backend |
|
| 587 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => ''));
|
|
| 575 | + /** |
|
| 576 | + * Back-end feedburner subscribe widget settings form. |
|
| 577 | + * |
|
| 578 | + * @since 1.0.0 |
|
| 579 | + * @since 1.5.1 Declare function public. |
|
| 580 | + * |
|
| 581 | + * @param array $instance Previously saved values from database. |
|
| 582 | + * @return string|void |
|
| 583 | + */ |
|
| 584 | + public function form($instance) |
|
| 585 | + {
|
|
| 586 | + //widgetform in backend |
|
| 587 | + $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => ''));
|
|
| 588 | 588 | |
| 589 | - $id = strip_tags($instance['id']); |
|
| 589 | + $id = strip_tags($instance['id']); |
|
| 590 | 590 | |
| 591 | - $title = strip_tags($instance['title']); |
|
| 591 | + $title = strip_tags($instance['title']); |
|
| 592 | 592 | |
| 593 | - $text = strip_tags($instance['text']); |
|
| 593 | + $text = strip_tags($instance['text']); |
|
| 594 | 594 | |
| 595 | 595 | |
| 596 | 596 | |
| 597 | - ?> |
|
| 597 | + ?> |
|
| 598 | 598 | <p><label |
| 599 | 599 | for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'geodirectory');?>:
|
| 600 | 600 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
|
@@ -613,101 +613,101 @@ discard block |
||
| 613 | 613 | name="<?php echo $this->get_field_name('text'); ?>"><?php echo esc_attr($text); ?></textarea></label>
|
| 614 | 614 | </p> |
| 615 | 615 | <?php |
| 616 | - } |
|
| 617 | - } |
|
| 618 | - |
|
| 619 | - register_widget('geodirsubscribeWidget');
|
|
| 620 | - |
|
| 621 | - /** |
|
| 622 | - * GeoDirectory advertise widget. |
|
| 623 | - * |
|
| 624 | - * @since 1.0.0 |
|
| 625 | - */ |
|
| 626 | - class geodiradvtwidget extends WP_Widget |
|
| 627 | - {
|
|
| 628 | - |
|
| 629 | - /** |
|
| 630 | - * Register the advertise widget with WordPress. |
|
| 631 | - * |
|
| 632 | - * @since 1.0.0 |
|
| 633 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 634 | - */ |
|
| 635 | - public function __construct() {
|
|
| 636 | - $widget_ops = array('classname' => 'GeoDirectory Advertise', 'description' => __('GD > common advertise widget in sidebar, bottom section', 'geodirectory'));
|
|
| 637 | - parent::__construct( |
|
| 638 | - 'advtwidget', // Base ID |
|
| 639 | - __('GD > Advertise', 'geodirectory'), // Name
|
|
| 640 | - $widget_ops// Args |
|
| 641 | - ); |
|
| 642 | - } |
|
| 643 | - |
|
| 644 | - |
|
| 645 | - /** |
|
| 646 | - * Front-end display content for advertise widget. |
|
| 647 | - * |
|
| 648 | - * @since 1.0.0 |
|
| 649 | - * @since 1.5.1 Declare function public. |
|
| 650 | - * |
|
| 651 | - * @param array $args Widget arguments. |
|
| 652 | - * @param array $instance Saved values from database. |
|
| 653 | - */ |
|
| 654 | - public function widget($args, $instance) |
|
| 655 | - {
|
|
| 656 | - |
|
| 657 | - // prints the widget |
|
| 658 | - |
|
| 659 | - extract($args, EXTR_SKIP); |
|
| 660 | - |
|
| 661 | - /** |
|
| 662 | - * Filter the description text. |
|
| 663 | - * |
|
| 664 | - * @since 1.0.0 |
|
| 665 | - * @param string $desc1 The widget description text. |
|
| 666 | - */ |
|
| 667 | - $desc1 = empty($instance['desc1']) ? ' ' : apply_filters('widget_desc1', $instance['desc1']);
|
|
| 668 | - echo $before_widget; |
|
| 669 | - ?> |
|
| 616 | + } |
|
| 617 | + } |
|
| 618 | + |
|
| 619 | + register_widget('geodirsubscribeWidget');
|
|
| 620 | + |
|
| 621 | + /** |
|
| 622 | + * GeoDirectory advertise widget. |
|
| 623 | + * |
|
| 624 | + * @since 1.0.0 |
|
| 625 | + */ |
|
| 626 | + class geodiradvtwidget extends WP_Widget |
|
| 627 | + {
|
|
| 628 | + |
|
| 629 | + /** |
|
| 630 | + * Register the advertise widget with WordPress. |
|
| 631 | + * |
|
| 632 | + * @since 1.0.0 |
|
| 633 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 634 | + */ |
|
| 635 | + public function __construct() {
|
|
| 636 | + $widget_ops = array('classname' => 'GeoDirectory Advertise', 'description' => __('GD > common advertise widget in sidebar, bottom section', 'geodirectory'));
|
|
| 637 | + parent::__construct( |
|
| 638 | + 'advtwidget', // Base ID |
|
| 639 | + __('GD > Advertise', 'geodirectory'), // Name
|
|
| 640 | + $widget_ops// Args |
|
| 641 | + ); |
|
| 642 | + } |
|
| 643 | + |
|
| 644 | + |
|
| 645 | + /** |
|
| 646 | + * Front-end display content for advertise widget. |
|
| 647 | + * |
|
| 648 | + * @since 1.0.0 |
|
| 649 | + * @since 1.5.1 Declare function public. |
|
| 650 | + * |
|
| 651 | + * @param array $args Widget arguments. |
|
| 652 | + * @param array $instance Saved values from database. |
|
| 653 | + */ |
|
| 654 | + public function widget($args, $instance) |
|
| 655 | + {
|
|
| 656 | + |
|
| 657 | + // prints the widget |
|
| 658 | + |
|
| 659 | + extract($args, EXTR_SKIP); |
|
| 660 | + |
|
| 661 | + /** |
|
| 662 | + * Filter the description text. |
|
| 663 | + * |
|
| 664 | + * @since 1.0.0 |
|
| 665 | + * @param string $desc1 The widget description text. |
|
| 666 | + */ |
|
| 667 | + $desc1 = empty($instance['desc1']) ? ' ' : apply_filters('widget_desc1', $instance['desc1']);
|
|
| 668 | + echo $before_widget; |
|
| 669 | + ?> |
|
| 670 | 670 | <?php if ($desc1 <> "") { ?>
|
| 671 | 671 | <?php echo $desc1; ?> |
| 672 | 672 | <?php } |
| 673 | - echo $after_widget; |
|
| 674 | - } |
|
| 675 | - |
|
| 676 | - /** |
|
| 677 | - * Sanitize advertise widget form values as they are saved. |
|
| 678 | - * |
|
| 679 | - * @since 1.0.0 |
|
| 680 | - * @since 1.5.1 Declare function public. |
|
| 681 | - * |
|
| 682 | - * @param array $new_instance Values just sent to be saved. |
|
| 683 | - * @param array $old_instance Previously saved values from database. |
|
| 684 | - * |
|
| 685 | - * @return array Updated safe values to be saved. |
|
| 686 | - */ |
|
| 687 | - public function update($new_instance, $old_instance) |
|
| 688 | - {
|
|
| 689 | - //save the widget |
|
| 690 | - $instance = $old_instance; |
|
| 691 | - $instance['desc1'] = ($new_instance['desc1']); |
|
| 692 | - return $instance; |
|
| 693 | - } |
|
| 694 | - |
|
| 695 | - /** |
|
| 696 | - * Back-end advertise widget settings form. |
|
| 697 | - * |
|
| 698 | - * @since 1.0.0 |
|
| 699 | - * @since 1.5.1 Declare function public. |
|
| 700 | - * |
|
| 701 | - * @param array $instance Previously saved values from database. |
|
| 702 | - * @return string|void |
|
| 703 | - */ |
|
| 704 | - public function form($instance) |
|
| 705 | - {
|
|
| 706 | - //widgetform in backend |
|
| 707 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 708 | - |
|
| 709 | - $desc1 = ($instance['desc1']); |
|
| 710 | - ?> |
|
| 673 | + echo $after_widget; |
|
| 674 | + } |
|
| 675 | + |
|
| 676 | + /** |
|
| 677 | + * Sanitize advertise widget form values as they are saved. |
|
| 678 | + * |
|
| 679 | + * @since 1.0.0 |
|
| 680 | + * @since 1.5.1 Declare function public. |
|
| 681 | + * |
|
| 682 | + * @param array $new_instance Values just sent to be saved. |
|
| 683 | + * @param array $old_instance Previously saved values from database. |
|
| 684 | + * |
|
| 685 | + * @return array Updated safe values to be saved. |
|
| 686 | + */ |
|
| 687 | + public function update($new_instance, $old_instance) |
|
| 688 | + {
|
|
| 689 | + //save the widget |
|
| 690 | + $instance = $old_instance; |
|
| 691 | + $instance['desc1'] = ($new_instance['desc1']); |
|
| 692 | + return $instance; |
|
| 693 | + } |
|
| 694 | + |
|
| 695 | + /** |
|
| 696 | + * Back-end advertise widget settings form. |
|
| 697 | + * |
|
| 698 | + * @since 1.0.0 |
|
| 699 | + * @since 1.5.1 Declare function public. |
|
| 700 | + * |
|
| 701 | + * @param array $instance Previously saved values from database. |
|
| 702 | + * @return string|void |
|
| 703 | + */ |
|
| 704 | + public function form($instance) |
|
| 705 | + {
|
|
| 706 | + //widgetform in backend |
|
| 707 | + $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => ''));
|
|
| 708 | + |
|
| 709 | + $desc1 = ($instance['desc1']); |
|
| 710 | + ?> |
|
| 711 | 711 | <p><label |
| 712 | 712 | for="<?php echo $this->get_field_id('desc1'); ?>"><?php _e('Your Advt code (ex.google adsense, etc.)', 'geodirectory');?>
|
| 713 | 713 | <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id('desc1'); ?>"
|
@@ -715,65 +715,65 @@ discard block |
||
| 715 | 715 | </p> |
| 716 | 716 | |
| 717 | 717 | <?php |
| 718 | - } |
|
| 719 | - } |
|
| 720 | - |
|
| 721 | - register_widget('geodiradvtwidget');
|
|
| 722 | - |
|
| 723 | - /** |
|
| 724 | - * GeoDirectory Flickr widget. |
|
| 725 | - * |
|
| 726 | - * @since 1.0.0 |
|
| 727 | - */ |
|
| 728 | - class GeodirFlickrWidget extends WP_Widget |
|
| 729 | - {
|
|
| 730 | - |
|
| 731 | - /** |
|
| 732 | - * Register the flickr widget with WordPress. |
|
| 733 | - * |
|
| 734 | - * @since 1.0.0 |
|
| 735 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 736 | - */ |
|
| 737 | - public function __construct() {
|
|
| 738 | - $widget_ops = array('classname' => 'Geo Dir Flickr Photos ', 'description' => __('GD > Flickr Photos', 'geodirectory'));
|
|
| 739 | - parent::__construct( |
|
| 740 | - 'widget_flickrwidget', // Base ID |
|
| 741 | - __('GD > Flickr Photos', 'geodirectory'), // Name
|
|
| 742 | - $widget_ops// Args |
|
| 743 | - ); |
|
| 744 | - } |
|
| 745 | - |
|
| 746 | - /** |
|
| 747 | - * Front-end display content for flickr widget. |
|
| 748 | - * |
|
| 749 | - * @since 1.0.0 |
|
| 750 | - * @since 1.5.1 Declare function public. |
|
| 751 | - * |
|
| 752 | - * @param array $args Widget arguments. |
|
| 753 | - * @param array $instance Saved values from database. |
|
| 754 | - */ |
|
| 755 | - public function widget($args, $instance) |
|
| 756 | - {
|
|
| 757 | - |
|
| 758 | - // prints the widget |
|
| 759 | - extract($args, EXTR_SKIP); |
|
| 760 | - |
|
| 761 | - echo $before_widget; |
|
| 762 | - |
|
| 763 | - /** This filter is documented in geodirectory_widgets.php */ |
|
| 764 | - $id = empty($instance['id']) ? ' ' : apply_filters('widget_id', $instance['id']);
|
|
| 765 | - |
|
| 766 | - /** |
|
| 767 | - * Filter the widget number. |
|
| 768 | - * |
|
| 769 | - * This is used in the flicker widget to show how many images to show. |
|
| 770 | - * |
|
| 771 | - * @since 1.0.0 |
|
| 772 | - * @param string $number The image count. |
|
| 773 | - */ |
|
| 774 | - $number = empty($instance['number']) ? ' ' : apply_filters('widget_number', $instance['number']);
|
|
| 775 | - echo $before_title . __('Photo Gallery', 'geodirectory') . $after_title;
|
|
| 776 | - ?> |
|
| 718 | + } |
|
| 719 | + } |
|
| 720 | + |
|
| 721 | + register_widget('geodiradvtwidget');
|
|
| 722 | + |
|
| 723 | + /** |
|
| 724 | + * GeoDirectory Flickr widget. |
|
| 725 | + * |
|
| 726 | + * @since 1.0.0 |
|
| 727 | + */ |
|
| 728 | + class GeodirFlickrWidget extends WP_Widget |
|
| 729 | + {
|
|
| 730 | + |
|
| 731 | + /** |
|
| 732 | + * Register the flickr widget with WordPress. |
|
| 733 | + * |
|
| 734 | + * @since 1.0.0 |
|
| 735 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 736 | + */ |
|
| 737 | + public function __construct() {
|
|
| 738 | + $widget_ops = array('classname' => 'Geo Dir Flickr Photos ', 'description' => __('GD > Flickr Photos', 'geodirectory'));
|
|
| 739 | + parent::__construct( |
|
| 740 | + 'widget_flickrwidget', // Base ID |
|
| 741 | + __('GD > Flickr Photos', 'geodirectory'), // Name
|
|
| 742 | + $widget_ops// Args |
|
| 743 | + ); |
|
| 744 | + } |
|
| 745 | + |
|
| 746 | + /** |
|
| 747 | + * Front-end display content for flickr widget. |
|
| 748 | + * |
|
| 749 | + * @since 1.0.0 |
|
| 750 | + * @since 1.5.1 Declare function public. |
|
| 751 | + * |
|
| 752 | + * @param array $args Widget arguments. |
|
| 753 | + * @param array $instance Saved values from database. |
|
| 754 | + */ |
|
| 755 | + public function widget($args, $instance) |
|
| 756 | + {
|
|
| 757 | + |
|
| 758 | + // prints the widget |
|
| 759 | + extract($args, EXTR_SKIP); |
|
| 760 | + |
|
| 761 | + echo $before_widget; |
|
| 762 | + |
|
| 763 | + /** This filter is documented in geodirectory_widgets.php */ |
|
| 764 | + $id = empty($instance['id']) ? ' ' : apply_filters('widget_id', $instance['id']);
|
|
| 765 | + |
|
| 766 | + /** |
|
| 767 | + * Filter the widget number. |
|
| 768 | + * |
|
| 769 | + * This is used in the flicker widget to show how many images to show. |
|
| 770 | + * |
|
| 771 | + * @since 1.0.0 |
|
| 772 | + * @param string $number The image count. |
|
| 773 | + */ |
|
| 774 | + $number = empty($instance['number']) ? ' ' : apply_filters('widget_number', $instance['number']);
|
|
| 775 | + echo $before_title . __('Photo Gallery', 'geodirectory') . $after_title;
|
|
| 776 | + ?> |
|
| 777 | 777 | |
| 778 | 778 | <div class="geodir-flickr clearfix"> |
| 779 | 779 | |
@@ -784,45 +784,45 @@ discard block |
||
| 784 | 784 | |
| 785 | 785 | |
| 786 | 786 | <?php echo $after_widget; |
| 787 | - } |
|
| 788 | - |
|
| 789 | - /** |
|
| 790 | - * Sanitize flickr widget form values as they are saved. |
|
| 791 | - * |
|
| 792 | - * @since 1.0.0 |
|
| 793 | - * @since 1.5.1 Declare function public. |
|
| 794 | - * |
|
| 795 | - * @param array $new_instance Values just sent to be saved. |
|
| 796 | - * @param array $old_instance Previously saved values from database. |
|
| 797 | - * |
|
| 798 | - * @return array Updated safe values to be saved. |
|
| 799 | - */ |
|
| 800 | - public function update($new_instance, $old_instance) |
|
| 801 | - {
|
|
| 802 | - //save the widget |
|
| 803 | - $instance = $old_instance; |
|
| 804 | - $instance['id'] = strip_tags($new_instance['id']); |
|
| 805 | - $instance['number'] = strip_tags($new_instance['number']); |
|
| 806 | - return $instance; |
|
| 807 | - } |
|
| 808 | - |
|
| 809 | - /** |
|
| 810 | - * Back-end flickr widget settings form. |
|
| 811 | - * |
|
| 812 | - * @since 1.0.0 |
|
| 813 | - * @since 1.5.1 Declare function public. |
|
| 814 | - * |
|
| 815 | - * @param array $instance Previously saved values from database. |
|
| 816 | - * @return string|void |
|
| 817 | - */ |
|
| 818 | - public function form($instance) |
|
| 819 | - {
|
|
| 820 | - |
|
| 821 | - //widgetform in backend |
|
| 822 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'number' => ''));
|
|
| 823 | - $id = strip_tags($instance['id']); |
|
| 824 | - $number = strip_tags($instance['number']); |
|
| 825 | - ?> |
|
| 787 | + } |
|
| 788 | + |
|
| 789 | + /** |
|
| 790 | + * Sanitize flickr widget form values as they are saved. |
|
| 791 | + * |
|
| 792 | + * @since 1.0.0 |
|
| 793 | + * @since 1.5.1 Declare function public. |
|
| 794 | + * |
|
| 795 | + * @param array $new_instance Values just sent to be saved. |
|
| 796 | + * @param array $old_instance Previously saved values from database. |
|
| 797 | + * |
|
| 798 | + * @return array Updated safe values to be saved. |
|
| 799 | + */ |
|
| 800 | + public function update($new_instance, $old_instance) |
|
| 801 | + {
|
|
| 802 | + //save the widget |
|
| 803 | + $instance = $old_instance; |
|
| 804 | + $instance['id'] = strip_tags($new_instance['id']); |
|
| 805 | + $instance['number'] = strip_tags($new_instance['number']); |
|
| 806 | + return $instance; |
|
| 807 | + } |
|
| 808 | + |
|
| 809 | + /** |
|
| 810 | + * Back-end flickr widget settings form. |
|
| 811 | + * |
|
| 812 | + * @since 1.0.0 |
|
| 813 | + * @since 1.5.1 Declare function public. |
|
| 814 | + * |
|
| 815 | + * @param array $instance Previously saved values from database. |
|
| 816 | + * @return string|void |
|
| 817 | + */ |
|
| 818 | + public function form($instance) |
|
| 819 | + {
|
|
| 820 | + |
|
| 821 | + //widgetform in backend |
|
| 822 | + $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'number' => ''));
|
|
| 823 | + $id = strip_tags($instance['id']); |
|
| 824 | + $number = strip_tags($instance['number']); |
|
| 825 | + ?> |
|
| 826 | 826 | |
| 827 | 827 | <p> |
| 828 | 828 | <label |
@@ -843,99 +843,99 @@ discard block |
||
| 843 | 843 | </label> |
| 844 | 844 | </p> |
| 845 | 845 | <?php |
| 846 | - } |
|
| 847 | - } |
|
| 848 | - |
|
| 849 | - register_widget('GeodirFlickrWidget');
|
|
| 850 | - |
|
| 851 | - /** |
|
| 852 | - * GeoDirectory Twitter widget. |
|
| 853 | - * |
|
| 854 | - * @since 1.0.0 |
|
| 855 | - */ |
|
| 856 | - class geodir_twitter extends WP_Widget |
|
| 857 | - {
|
|
| 858 | - /** |
|
| 859 | - * Register the Twitter widget with WordPress. |
|
| 860 | - * |
|
| 861 | - * @since 1.0.0 |
|
| 862 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 863 | - */ |
|
| 864 | - public function __construct() {
|
|
| 865 | - $widget_ops = array('classname' => 'Twitter', 'description' => __('GD > Twitter Feed', 'geodirectory'));
|
|
| 866 | - parent::__construct( |
|
| 867 | - 'widget_Twidget', // Base ID |
|
| 868 | - __('GD > Twitter', 'geodirectory'), // Name
|
|
| 869 | - $widget_ops// Args |
|
| 870 | - ); |
|
| 871 | - } |
|
| 872 | - |
|
| 873 | - |
|
| 874 | - /** |
|
| 875 | - * Front-end display content for Twitter widget. |
|
| 876 | - * |
|
| 877 | - * @since 1.0.0 |
|
| 878 | - * @since 1.5.1 Declare function public. |
|
| 879 | - * |
|
| 880 | - * @param array $args Widget arguments. |
|
| 881 | - * @param array $instance Saved values from database. |
|
| 882 | - */ |
|
| 883 | - public function widget($args, $instance) |
|
| 884 | - {
|
|
| 885 | - |
|
| 886 | - // prints the widget |
|
| 887 | - |
|
| 888 | - extract($args, EXTR_SKIP); |
|
| 889 | - |
|
| 890 | - /** |
|
| 891 | - * Filter the twitter widget description text. |
|
| 892 | - * |
|
| 893 | - * @since 1.0.0 |
|
| 894 | - * @param string $desc1 The widget description text. |
|
| 895 | - */ |
|
| 896 | - $desc1 = empty($instance['gd_tw_desc1']) ? ' ' : apply_filters('gd_tw_widget_desc1', $instance['gd_tw_desc1']);
|
|
| 897 | - echo $before_widget; |
|
| 898 | - if ($desc1 <> "") {
|
|
| 899 | - echo $desc1; |
|
| 900 | - } |
|
| 901 | - echo $after_widget; |
|
| 902 | - } |
|
| 903 | - |
|
| 904 | - /** |
|
| 905 | - * Sanitize twitter widget form values as they are saved. |
|
| 906 | - * |
|
| 907 | - * @since 1.0.0 |
|
| 908 | - * @since 1.5.1 Declare function public. |
|
| 909 | - * |
|
| 910 | - * @param array $new_instance Values just sent to be saved. |
|
| 911 | - * @param array $old_instance Previously saved values from database. |
|
| 912 | - * |
|
| 913 | - * @return array Updated safe values to be saved. |
|
| 914 | - */ |
|
| 915 | - public function update($new_instance, $old_instance) |
|
| 916 | - {
|
|
| 917 | - //save the widget |
|
| 918 | - $instance = $old_instance; |
|
| 919 | - $instance['gd_tw_desc1'] = ($new_instance['gd_tw_desc1']); |
|
| 920 | - return $instance; |
|
| 921 | - } |
|
| 922 | - |
|
| 923 | - /** |
|
| 924 | - * Back-end twitter widget settings form. |
|
| 925 | - * |
|
| 926 | - * @since 1.0.0 |
|
| 927 | - * @since 1.5.1 Declare function public. |
|
| 928 | - * |
|
| 929 | - * @param array $instance Previously saved values from database. |
|
| 930 | - * @return string|void |
|
| 931 | - */ |
|
| 932 | - public function form($instance) |
|
| 933 | - {
|
|
| 934 | - //widgetform in backend |
|
| 935 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => ''));
|
|
| 936 | - |
|
| 937 | - $desc1 = ($instance['gd_tw_desc1']); |
|
| 938 | - ?> |
|
| 846 | + } |
|
| 847 | + } |
|
| 848 | + |
|
| 849 | + register_widget('GeodirFlickrWidget');
|
|
| 850 | + |
|
| 851 | + /** |
|
| 852 | + * GeoDirectory Twitter widget. |
|
| 853 | + * |
|
| 854 | + * @since 1.0.0 |
|
| 855 | + */ |
|
| 856 | + class geodir_twitter extends WP_Widget |
|
| 857 | + {
|
|
| 858 | + /** |
|
| 859 | + * Register the Twitter widget with WordPress. |
|
| 860 | + * |
|
| 861 | + * @since 1.0.0 |
|
| 862 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 863 | + */ |
|
| 864 | + public function __construct() {
|
|
| 865 | + $widget_ops = array('classname' => 'Twitter', 'description' => __('GD > Twitter Feed', 'geodirectory'));
|
|
| 866 | + parent::__construct( |
|
| 867 | + 'widget_Twidget', // Base ID |
|
| 868 | + __('GD > Twitter', 'geodirectory'), // Name
|
|
| 869 | + $widget_ops// Args |
|
| 870 | + ); |
|
| 871 | + } |
|
| 872 | + |
|
| 873 | + |
|
| 874 | + /** |
|
| 875 | + * Front-end display content for Twitter widget. |
|
| 876 | + * |
|
| 877 | + * @since 1.0.0 |
|
| 878 | + * @since 1.5.1 Declare function public. |
|
| 879 | + * |
|
| 880 | + * @param array $args Widget arguments. |
|
| 881 | + * @param array $instance Saved values from database. |
|
| 882 | + */ |
|
| 883 | + public function widget($args, $instance) |
|
| 884 | + {
|
|
| 885 | + |
|
| 886 | + // prints the widget |
|
| 887 | + |
|
| 888 | + extract($args, EXTR_SKIP); |
|
| 889 | + |
|
| 890 | + /** |
|
| 891 | + * Filter the twitter widget description text. |
|
| 892 | + * |
|
| 893 | + * @since 1.0.0 |
|
| 894 | + * @param string $desc1 The widget description text. |
|
| 895 | + */ |
|
| 896 | + $desc1 = empty($instance['gd_tw_desc1']) ? ' ' : apply_filters('gd_tw_widget_desc1', $instance['gd_tw_desc1']);
|
|
| 897 | + echo $before_widget; |
|
| 898 | + if ($desc1 <> "") {
|
|
| 899 | + echo $desc1; |
|
| 900 | + } |
|
| 901 | + echo $after_widget; |
|
| 902 | + } |
|
| 903 | + |
|
| 904 | + /** |
|
| 905 | + * Sanitize twitter widget form values as they are saved. |
|
| 906 | + * |
|
| 907 | + * @since 1.0.0 |
|
| 908 | + * @since 1.5.1 Declare function public. |
|
| 909 | + * |
|
| 910 | + * @param array $new_instance Values just sent to be saved. |
|
| 911 | + * @param array $old_instance Previously saved values from database. |
|
| 912 | + * |
|
| 913 | + * @return array Updated safe values to be saved. |
|
| 914 | + */ |
|
| 915 | + public function update($new_instance, $old_instance) |
|
| 916 | + {
|
|
| 917 | + //save the widget |
|
| 918 | + $instance = $old_instance; |
|
| 919 | + $instance['gd_tw_desc1'] = ($new_instance['gd_tw_desc1']); |
|
| 920 | + return $instance; |
|
| 921 | + } |
|
| 922 | + |
|
| 923 | + /** |
|
| 924 | + * Back-end twitter widget settings form. |
|
| 925 | + * |
|
| 926 | + * @since 1.0.0 |
|
| 927 | + * @since 1.5.1 Declare function public. |
|
| 928 | + * |
|
| 929 | + * @param array $instance Previously saved values from database. |
|
| 930 | + * @return string|void |
|
| 931 | + */ |
|
| 932 | + public function form($instance) |
|
| 933 | + {
|
|
| 934 | + //widgetform in backend |
|
| 935 | + $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => ''));
|
|
| 936 | + |
|
| 937 | + $desc1 = ($instance['gd_tw_desc1']); |
|
| 938 | + ?> |
|
| 939 | 939 | <p><label |
| 940 | 940 | for="<?php echo $this->get_field_id('gd_tw_desc1'); ?>"><?php _e('Your twitter code', 'geodirectory');?>
|
| 941 | 941 | <textarea class="widefat" rows="6" cols="20" |
@@ -944,169 +944,169 @@ discard block |
||
| 944 | 944 | </p> |
| 945 | 945 | |
| 946 | 946 | <?php |
| 947 | - } |
|
| 948 | - } |
|
| 949 | - |
|
| 950 | - register_widget('geodir_twitter');
|
|
| 951 | - |
|
| 952 | - /** |
|
| 953 | - * GeoDirectory Advanced Search widget. |
|
| 954 | - * |
|
| 955 | - * @since 1.0.0 |
|
| 956 | - */ |
|
| 957 | - class geodir_advance_search_widget extends WP_Widget |
|
| 958 | - {
|
|
| 959 | - /** |
|
| 960 | - * Register the advanced search widget with WordPress. |
|
| 961 | - * |
|
| 962 | - * @since 1.0.0 |
|
| 963 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 964 | - */ |
|
| 965 | - public function __construct() {
|
|
| 966 | - $widget_ops = array('classname' => 'geodir_advance_search_widget', 'description' => __('GD > Search', 'geodirectory'));
|
|
| 967 | - parent::__construct( |
|
| 968 | - 'geodir_advance_search', // Base ID |
|
| 969 | - __('GD > Search', 'geodirectory'), // Name
|
|
| 970 | - $widget_ops// Args |
|
| 971 | - ); |
|
| 972 | - } |
|
| 973 | - |
|
| 974 | - |
|
| 975 | - /** |
|
| 976 | - * Front-end display content for advanced search widget. |
|
| 977 | - * |
|
| 978 | - * @since 1.0.0 |
|
| 979 | - * @since 1.5.1 Declare function public. |
|
| 980 | - * |
|
| 981 | - * @param array $args Widget arguments. |
|
| 982 | - * @param array $instance Saved values from database. |
|
| 983 | - */ |
|
| 984 | - public function widget($args, $instance) |
|
| 985 | - {
|
|
| 986 | - /** |
|
| 987 | - * Filter the search widget arguments. |
|
| 988 | - * |
|
| 989 | - * @since 1.5.7 |
|
| 990 | - * @param array $args The widget arguments. |
|
| 991 | - * @param array $instance The widget instance. |
|
| 992 | - */ |
|
| 993 | - $args = apply_filters('widget_geodir_advance_search_args',$args,$instance);
|
|
| 994 | - |
|
| 995 | - // prints the widget |
|
| 996 | - extract($args, EXTR_SKIP); |
|
| 997 | - |
|
| 998 | - echo $before_widget; |
|
| 999 | - |
|
| 1000 | - /** This filter is documented in geodirectory_widgets.php */ |
|
| 1001 | - $title = empty($instance['title']) ? __('Search', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
|
|
| 1002 | - |
|
| 1003 | - geodir_get_template_part('listing', 'filter-form');
|
|
| 1004 | - |
|
| 1005 | - echo $after_widget; |
|
| 1006 | - } |
|
| 1007 | - |
|
| 1008 | - /** |
|
| 1009 | - * Sanitize advanced search widget form values as they are saved. |
|
| 1010 | - * |
|
| 1011 | - * @since 1.0.0 |
|
| 1012 | - * @since 1.5.1 Declare function public. |
|
| 1013 | - * |
|
| 1014 | - * @param array $new_instance Values just sent to be saved. |
|
| 1015 | - * @param array $old_instance Previously saved values from database. |
|
| 1016 | - * |
|
| 1017 | - * @return array Updated safe values to be saved. |
|
| 1018 | - */ |
|
| 1019 | - public function update($new_instance, $old_instance) |
|
| 1020 | - {
|
|
| 1021 | - //save the widget |
|
| 1022 | - //Nothing to save |
|
| 1023 | - return isset($instance) ? $instance : array(); |
|
| 1024 | - } |
|
| 1025 | - |
|
| 1026 | - /** |
|
| 1027 | - * Back-end advanced search widget settings form. |
|
| 1028 | - * |
|
| 1029 | - * @since 1.0.0 |
|
| 1030 | - * @since 1.5.1 Declare function public. |
|
| 1031 | - * |
|
| 1032 | - * @param array $instance Previously saved values from database. |
|
| 1033 | - * @return string|void |
|
| 1034 | - */ |
|
| 1035 | - public function form($instance) |
|
| 1036 | - {
|
|
| 1037 | - //widgetform in backend |
|
| 1038 | - echo __("This is a search widget to show advance search for gedodirectory listings.", 'geodirectory');
|
|
| 1039 | - } |
|
| 1040 | - } |
|
| 1041 | - |
|
| 1042 | - register_widget('geodir_advance_search_widget');
|
|
| 1043 | - |
|
| 1044 | - |
|
| 1045 | - /** |
|
| 1046 | - * Contains all functions for popular widget. |
|
| 1047 | - * |
|
| 1048 | - * @since 1.0.0 |
|
| 1049 | - * @package GeoDirectory |
|
| 1050 | - */ |
|
| 1051 | - include_once('geodirectory-widgets/geodirectory_popular_widget.php');
|
|
| 1052 | - /** |
|
| 1053 | - * Contains all functions for listing slider widget. |
|
| 1054 | - * |
|
| 1055 | - * @since 1.0.0 |
|
| 1056 | - * @package GeoDirectory |
|
| 1057 | - */ |
|
| 1058 | - include_once('geodirectory-widgets/geodirectory_listing_slider_widget.php');
|
|
| 1059 | - /** |
|
| 1060 | - * Contains all functions for home map widget. |
|
| 1061 | - * |
|
| 1062 | - * @since 1.0.0 |
|
| 1063 | - * @package GeoDirectory |
|
| 1064 | - */ |
|
| 1065 | - include_once('geodirectory-widgets/home_map_widget.php');
|
|
| 1066 | - /** |
|
| 1067 | - * Contains all functions for listing map widget. |
|
| 1068 | - * |
|
| 1069 | - * @since 1.0.0 |
|
| 1070 | - * @package GeoDirectory |
|
| 1071 | - */ |
|
| 1072 | - include_once('geodirectory-widgets/listing_map_widget.php');
|
|
| 1073 | - /** |
|
| 1074 | - * Contains all functions for reviews widget. |
|
| 1075 | - * |
|
| 1076 | - * @since 1.0.0 |
|
| 1077 | - * @package GeoDirectory |
|
| 1078 | - */ |
|
| 1079 | - include_once('geodirectory-widgets/geodirectory_reviews_widget.php');
|
|
| 1080 | - /** |
|
| 1081 | - * Contains all functions for related listing widget. |
|
| 1082 | - * |
|
| 1083 | - * @since 1.0.0 |
|
| 1084 | - * @package GeoDirectory |
|
| 1085 | - */ |
|
| 1086 | - include_once('geodirectory-widgets/geodirectory_related_listing_widget.php');
|
|
| 1087 | - /** |
|
| 1088 | - * Contains all functions for bestof widget. |
|
| 1089 | - * |
|
| 1090 | - * @since 1.0.0 |
|
| 1091 | - * @package GeoDirectory |
|
| 1092 | - */ |
|
| 1093 | - include_once('geodirectory-widgets/geodirectory_bestof_widget.php');
|
|
| 947 | + } |
|
| 948 | + } |
|
| 949 | + |
|
| 950 | + register_widget('geodir_twitter');
|
|
| 951 | + |
|
| 952 | + /** |
|
| 953 | + * GeoDirectory Advanced Search widget. |
|
| 954 | + * |
|
| 955 | + * @since 1.0.0 |
|
| 956 | + */ |
|
| 957 | + class geodir_advance_search_widget extends WP_Widget |
|
| 958 | + {
|
|
| 959 | + /** |
|
| 960 | + * Register the advanced search widget with WordPress. |
|
| 961 | + * |
|
| 962 | + * @since 1.0.0 |
|
| 963 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
| 964 | + */ |
|
| 965 | + public function __construct() {
|
|
| 966 | + $widget_ops = array('classname' => 'geodir_advance_search_widget', 'description' => __('GD > Search', 'geodirectory'));
|
|
| 967 | + parent::__construct( |
|
| 968 | + 'geodir_advance_search', // Base ID |
|
| 969 | + __('GD > Search', 'geodirectory'), // Name
|
|
| 970 | + $widget_ops// Args |
|
| 971 | + ); |
|
| 972 | + } |
|
| 973 | + |
|
| 974 | + |
|
| 975 | + /** |
|
| 976 | + * Front-end display content for advanced search widget. |
|
| 977 | + * |
|
| 978 | + * @since 1.0.0 |
|
| 979 | + * @since 1.5.1 Declare function public. |
|
| 980 | + * |
|
| 981 | + * @param array $args Widget arguments. |
|
| 982 | + * @param array $instance Saved values from database. |
|
| 983 | + */ |
|
| 984 | + public function widget($args, $instance) |
|
| 985 | + {
|
|
| 986 | + /** |
|
| 987 | + * Filter the search widget arguments. |
|
| 988 | + * |
|
| 989 | + * @since 1.5.7 |
|
| 990 | + * @param array $args The widget arguments. |
|
| 991 | + * @param array $instance The widget instance. |
|
| 992 | + */ |
|
| 993 | + $args = apply_filters('widget_geodir_advance_search_args',$args,$instance);
|
|
| 994 | + |
|
| 995 | + // prints the widget |
|
| 996 | + extract($args, EXTR_SKIP); |
|
| 997 | + |
|
| 998 | + echo $before_widget; |
|
| 999 | + |
|
| 1000 | + /** This filter is documented in geodirectory_widgets.php */ |
|
| 1001 | + $title = empty($instance['title']) ? __('Search', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
|
|
| 1002 | + |
|
| 1003 | + geodir_get_template_part('listing', 'filter-form');
|
|
| 1004 | + |
|
| 1005 | + echo $after_widget; |
|
| 1006 | + } |
|
| 1007 | + |
|
| 1008 | + /** |
|
| 1009 | + * Sanitize advanced search widget form values as they are saved. |
|
| 1010 | + * |
|
| 1011 | + * @since 1.0.0 |
|
| 1012 | + * @since 1.5.1 Declare function public. |
|
| 1013 | + * |
|
| 1014 | + * @param array $new_instance Values just sent to be saved. |
|
| 1015 | + * @param array $old_instance Previously saved values from database. |
|
| 1016 | + * |
|
| 1017 | + * @return array Updated safe values to be saved. |
|
| 1018 | + */ |
|
| 1019 | + public function update($new_instance, $old_instance) |
|
| 1020 | + {
|
|
| 1021 | + //save the widget |
|
| 1022 | + //Nothing to save |
|
| 1023 | + return isset($instance) ? $instance : array(); |
|
| 1024 | + } |
|
| 1025 | + |
|
| 1026 | + /** |
|
| 1027 | + * Back-end advanced search widget settings form. |
|
| 1028 | + * |
|
| 1029 | + * @since 1.0.0 |
|
| 1030 | + * @since 1.5.1 Declare function public. |
|
| 1031 | + * |
|
| 1032 | + * @param array $instance Previously saved values from database. |
|
| 1033 | + * @return string|void |
|
| 1034 | + */ |
|
| 1035 | + public function form($instance) |
|
| 1036 | + {
|
|
| 1037 | + //widgetform in backend |
|
| 1038 | + echo __("This is a search widget to show advance search for gedodirectory listings.", 'geodirectory');
|
|
| 1039 | + } |
|
| 1040 | + } |
|
| 1041 | + |
|
| 1042 | + register_widget('geodir_advance_search_widget');
|
|
| 1043 | + |
|
| 1044 | + |
|
| 1045 | + /** |
|
| 1046 | + * Contains all functions for popular widget. |
|
| 1047 | + * |
|
| 1048 | + * @since 1.0.0 |
|
| 1049 | + * @package GeoDirectory |
|
| 1050 | + */ |
|
| 1051 | + include_once('geodirectory-widgets/geodirectory_popular_widget.php');
|
|
| 1052 | + /** |
|
| 1053 | + * Contains all functions for listing slider widget. |
|
| 1054 | + * |
|
| 1055 | + * @since 1.0.0 |
|
| 1056 | + * @package GeoDirectory |
|
| 1057 | + */ |
|
| 1058 | + include_once('geodirectory-widgets/geodirectory_listing_slider_widget.php');
|
|
| 1059 | + /** |
|
| 1060 | + * Contains all functions for home map widget. |
|
| 1061 | + * |
|
| 1062 | + * @since 1.0.0 |
|
| 1063 | + * @package GeoDirectory |
|
| 1064 | + */ |
|
| 1065 | + include_once('geodirectory-widgets/home_map_widget.php');
|
|
| 1066 | + /** |
|
| 1067 | + * Contains all functions for listing map widget. |
|
| 1068 | + * |
|
| 1069 | + * @since 1.0.0 |
|
| 1070 | + * @package GeoDirectory |
|
| 1071 | + */ |
|
| 1072 | + include_once('geodirectory-widgets/listing_map_widget.php');
|
|
| 1073 | + /** |
|
| 1074 | + * Contains all functions for reviews widget. |
|
| 1075 | + * |
|
| 1076 | + * @since 1.0.0 |
|
| 1077 | + * @package GeoDirectory |
|
| 1078 | + */ |
|
| 1079 | + include_once('geodirectory-widgets/geodirectory_reviews_widget.php');
|
|
| 1080 | + /** |
|
| 1081 | + * Contains all functions for related listing widget. |
|
| 1082 | + * |
|
| 1083 | + * @since 1.0.0 |
|
| 1084 | + * @package GeoDirectory |
|
| 1085 | + */ |
|
| 1086 | + include_once('geodirectory-widgets/geodirectory_related_listing_widget.php');
|
|
| 1087 | + /** |
|
| 1088 | + * Contains all functions for bestof widget. |
|
| 1089 | + * |
|
| 1090 | + * @since 1.0.0 |
|
| 1091 | + * @package GeoDirectory |
|
| 1092 | + */ |
|
| 1093 | + include_once('geodirectory-widgets/geodirectory_bestof_widget.php');
|
|
| 1094 | + /** |
|
| 1095 | + * Contains all functions for cpt categories widget. |
|
| 1096 | + * |
|
| 1097 | + * @since 1.5.4 |
|
| 1098 | + * @package GeoDirectory |
|
| 1099 | + */ |
|
| 1100 | + include_once('geodirectory-widgets/geodirectory_cpt_categories_widget.php');
|
|
| 1094 | 1101 | /** |
| 1095 | - * Contains all functions for cpt categories widget. |
|
| 1096 | - * |
|
| 1097 | - * @since 1.5.4 |
|
| 1098 | - * @package GeoDirectory |
|
| 1099 | - */ |
|
| 1100 | - include_once('geodirectory-widgets/geodirectory_cpt_categories_widget.php');
|
|
| 1101 | - /** |
|
| 1102 | - * Contains all functions for features widget. |
|
| 1103 | - * |
|
| 1104 | - * @since 1.5.6 |
|
| 1105 | - * @package GeoDirectory |
|
| 1106 | - * @todo make the image field recurring |
|
| 1107 | - */ |
|
| 1108 | - include_once('geodirectory-widgets/geodirectory_features_widget.php');
|
|
| 1109 | - } |
|
| 1102 | + * Contains all functions for features widget. |
|
| 1103 | + * |
|
| 1104 | + * @since 1.5.6 |
|
| 1105 | + * @package GeoDirectory |
|
| 1106 | + * @todo make the image field recurring |
|
| 1107 | + */ |
|
| 1108 | + include_once('geodirectory-widgets/geodirectory_features_widget.php');
|
|
| 1109 | + } |
|
| 1110 | 1110 | |
| 1111 | 1111 | } |
| 1112 | 1112 | |