@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | 'id' => 'geodir_post_submited_success_email_subject_admin', |
| 130 | 130 | 'type' => 'text', |
| 131 | 131 | 'css' => 'min-width:300px;', |
| 132 | - 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
|
|
| 132 | + 'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
|
|
| 133 | 133 | ), |
| 134 | 134 | array( |
| 135 | 135 | 'name' => '', |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | 'id' => 'geodir_post_submited_success_email_content_admin', |
| 138 | 138 | 'css' => 'width:500px; height: 150px;', |
| 139 | 139 | 'type' => 'textarea', |
| 140 | - 'std' => __('<p>Dear Admin,</p><p>A new listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
|
|
| 140 | + 'std' => __('<p>Dear Admin,</p><p>A new listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>', 'geodirectory')
|
|
| 141 | 141 | ), |
| 142 | 142 | |
| 143 | 143 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | 'id' => 'geodir_post_submited_success_email_subject', |
| 155 | 155 | 'type' => 'text', |
| 156 | 156 | 'css' => 'min-width:300px;', |
| 157 | - 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
|
|
| 157 | + 'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
|
|
| 158 | 158 | ), |
| 159 | 159 | array( |
| 160 | 160 | 'name' => '', |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | 'id' => 'geodir_post_submited_success_email_content', |
| 163 | 163 | 'css' => 'width:500px; height: 150px;', |
| 164 | 164 | 'type' => 'textarea', |
| 165 | - 'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
|
|
| 165 | + 'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>', 'geodirectory')
|
|
| 166 | 166 | ), |
| 167 | 167 | |
| 168 | 168 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | 'id' => 'geodir_forgot_password_content', |
| 181 | 181 | 'css' => 'width:500px; height: 150px;', |
| 182 | 182 | 'type' => 'textarea', |
| 183 | - 'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
|
|
| 183 | + 'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
|
|
| 184 | 184 | ), |
| 185 | 185 | |
| 186 | 186 | array( |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | 'id' => 'geodir_registration_success_email_content', |
| 198 | 198 | 'css' => 'width:500px; height: 150px;', |
| 199 | 199 | 'type' => 'textarea', |
| 200 | - 'std' => __("<p>Dear [#client_name#],</p><p>You can log in with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
|
|
| 200 | + 'std' => __("<p>Dear [#client_name#],</p><p>You can log in with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
|
|
| 201 | 201 | ), |
| 202 | 202 | array( |
| 203 | 203 | 'name' => __('Listing published email', 'geodirectory'),
|
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | 'id' => 'geodir_email_friend_content', |
| 237 | 237 | 'css' => 'width:500px; height: 150px;', |
| 238 | 238 | 'type' => 'textarea', |
| 239 | - 'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
|
|
| 239 | + 'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>", 'geodirectory')
|
|
| 240 | 240 | ), |
| 241 | 241 | |
| 242 | 242 | array( |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | 'id' => 'geodir_email_enquiry_content', |
| 254 | 254 | 'css' => 'width:500px; height: 150px;', |
| 255 | 255 | 'type' => 'textarea', |
| 256 | - 'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
|
|
| 256 | + 'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
|
|
| 257 | 257 | ), |
| 258 | 258 | |
| 259 | 259 | array('type' => 'sectionend', 'id' => 'other_emails'),
|
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | 'id' => 'geodir_post_added_success_msg_content', |
| 270 | 270 | 'css' => 'width:500px; height: 150px;', |
| 271 | 271 | 'type' => 'textarea', |
| 272 | - 'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information »</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
|
|
| 272 | + 'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information »</a></p><p>Thank you for visiting us at [#site_name#].</p>', 'geodirectory')
|
|
| 273 | 273 | ), |
| 274 | 274 | |
| 275 | 275 | |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | // Exit if accessed directly |
| 14 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 14 | +if (!defined('ABSPATH')) exit; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * Recursive array class to allow multidimensional array access. |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @param array $data |
| 41 | 41 | */ |
| 42 | - protected function __construct( $data = array() ) { |
|
| 43 | - foreach ( $data as $key => $value ) { |
|
| 44 | - $this[ $key ] = $value; |
|
| 42 | + protected function __construct($data = array()) { |
|
| 43 | + foreach ($data as $key => $value) { |
|
| 44 | + $this[$key] = $value; |
|
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | * Allow deep copies of objects |
| 50 | 50 | */ |
| 51 | 51 | public function __clone() { |
| 52 | - foreach ( $this->container as $key => $value ) { |
|
| 53 | - if ( $value instanceof self ) { |
|
| 54 | - $this[ $key ] = clone $value; |
|
| 52 | + foreach ($this->container as $key => $value) { |
|
| 53 | + if ($value instanceof self) { |
|
| 54 | + $this[$key] = clone $value; |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function toArray() { |
| 65 | 65 | $data = $this->container; |
| 66 | - foreach ( $data as $key => $value ) { |
|
| 67 | - if ( $value instanceof self ) { |
|
| 68 | - $data[ $key ] = $value->toArray(); |
|
| 66 | + foreach ($data as $key => $value) { |
|
| 67 | + if ($value instanceof self) { |
|
| 68 | + $data[$key] = $value->toArray(); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | return $data; |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * @return boolean true on success or false on failure. |
| 86 | 86 | */ |
| 87 | - public function offsetExists( $offset ) { |
|
| 88 | - return isset( $this->container[ $offset ]) ; |
|
| 87 | + public function offsetExists($offset) { |
|
| 88 | + return isset($this->container[$offset]); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | * |
| 98 | 98 | * @return mixed Can return all value types. |
| 99 | 99 | */ |
| 100 | - public function offsetGet( $offset ) { |
|
| 101 | - return isset( $this->container[ $offset ] ) ? $this->container[ $offset ] : null; |
|
| 100 | + public function offsetGet($offset) { |
|
| 101 | + return isset($this->container[$offset]) ? $this->container[$offset] : null; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -111,14 +111,14 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * @return void |
| 113 | 113 | */ |
| 114 | - public function offsetSet( $offset, $data ) { |
|
| 115 | - if ( is_array( $data ) ) { |
|
| 116 | - $data = new self( $data ); |
|
| 114 | + public function offsetSet($offset, $data) { |
|
| 115 | + if (is_array($data)) { |
|
| 116 | + $data = new self($data); |
|
| 117 | 117 | } |
| 118 | - if ( $offset === null ) { // don't forget this! |
|
| 118 | + if ($offset === null) { // don't forget this! |
|
| 119 | 119 | $this->container[] = $data; |
| 120 | 120 | } else { |
| 121 | - $this->container[ $offset ] = $data; |
|
| 121 | + $this->container[$offset] = $data; |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | $this->dirty = true; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * |
| 134 | 134 | * @return void |
| 135 | 135 | */ |
| 136 | - public function offsetUnset( $offset ) { |
|
| 137 | - unset( $this->container[ $offset ] ); |
|
| 136 | + public function offsetUnset($offset) { |
|
| 137 | + unset($this->container[$offset]); |
|
| 138 | 138 | } |
| 139 | 139 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | // Exit if accessed directly |
| 14 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 14 | +if (!defined('ABSPATH')) exit; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * Return the current cache expire setting. |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @param string $data |
| 38 | 38 | */ |
| 39 | -function wp_session_decode( $data ) { |
|
| 39 | +function wp_session_decode($data) { |
|
| 40 | 40 | $wp_session = WP_Session::get_instance(); |
| 41 | 41 | |
| 42 | - return $wp_session->json_in( $data ); |
|
| 42 | + return $wp_session->json_in($data); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -60,10 +60,10 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @return bool |
| 62 | 62 | */ |
| 63 | -function wp_session_regenerate_id( $delete_old_session = false ) { |
|
| 63 | +function wp_session_regenerate_id($delete_old_session = false) { |
|
| 64 | 64 | $wp_session = WP_Session::get_instance(); |
| 65 | 65 | |
| 66 | - $wp_session->regenerate_id( $delete_old_session ); |
|
| 66 | + $wp_session->regenerate_id($delete_old_session); |
|
| 67 | 67 | |
| 68 | 68 | return true; |
| 69 | 69 | } |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | function wp_session_start() { |
| 79 | 79 | $wp_session = WP_Session::get_instance(); |
| 80 | - do_action( 'wp_session_start' ); |
|
| 80 | + do_action('wp_session_start'); |
|
| 81 | 81 | |
| 82 | 82 | return $wp_session->session_started(); |
| 83 | 83 | } |
| 84 | -add_action( 'plugins_loaded', 'wp_session_start' ); |
|
| 84 | +add_action('plugins_loaded', 'wp_session_start'); |
|
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Return the current session status. |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | function wp_session_status() { |
| 92 | 92 | $wp_session = WP_Session::get_instance(); |
| 93 | 93 | |
| 94 | - if ( $wp_session->session_started() ) { |
|
| 94 | + if ($wp_session->session_started()) { |
|
| 95 | 95 | return PHP_SESSION_ACTIVE; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -114,9 +114,9 @@ discard block |
||
| 114 | 114 | $wp_session = WP_Session::get_instance(); |
| 115 | 115 | |
| 116 | 116 | $wp_session->write_data(); |
| 117 | - do_action( 'wp_session_commit' ); |
|
| 117 | + do_action('wp_session_commit'); |
|
| 118 | 118 | } |
| 119 | -add_action( 'shutdown', 'wp_session_write_close' ); |
|
| 119 | +add_action('shutdown', 'wp_session_write_close'); |
|
| 120 | 120 | |
| 121 | 121 | /** |
| 122 | 122 | * Clean up expired sessions by removing data and their expiration entries from |
@@ -128,51 +128,51 @@ discard block |
||
| 128 | 128 | function wp_session_cleanup() { |
| 129 | 129 | global $wpdb; |
| 130 | 130 | |
| 131 | - if ( defined( 'WP_SETUP_CONFIG' ) ) { |
|
| 131 | + if (defined('WP_SETUP_CONFIG')) { |
|
| 132 | 132 | return; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - if ( ! defined( 'WP_INSTALLING' ) ) { |
|
| 136 | - $expiration_keys = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'" ); |
|
| 135 | + if (!defined('WP_INSTALLING')) { |
|
| 136 | + $expiration_keys = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'"); |
|
| 137 | 137 | |
| 138 | - $now = current_time( 'timestamp' ); |
|
| 138 | + $now = current_time('timestamp'); |
|
| 139 | 139 | $expired_sessions = array(); |
| 140 | 140 | |
| 141 | - foreach( $expiration_keys as $expiration ) { |
|
| 141 | + foreach ($expiration_keys as $expiration) { |
|
| 142 | 142 | |
| 143 | 143 | // If the session has expired |
| 144 | - if ( $now > intval( $expiration->option_value ) ) { |
|
| 144 | + if ($now > intval($expiration->option_value)) { |
|
| 145 | 145 | |
| 146 | 146 | // Get the session ID by parsing the option_name |
| 147 | - $session_id = substr( $expiration->option_name, 20 ); |
|
| 147 | + $session_id = substr($expiration->option_name, 20); |
|
| 148 | 148 | |
| 149 | - if( (int) -1 === (int) $session_id || ! preg_match( '/^[a-f0-9]{32}$/', $session_id ) ) { |
|
| 149 | + if ((int) -1 === (int) $session_id || !preg_match('/^[a-f0-9]{32}$/', $session_id)) { |
|
| 150 | 150 | continue; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | $expired_sessions[] = $expiration->option_name; |
| 154 | - $expired_sessions[] = esc_sql( "_wp_session_$session_id" ); |
|
| 154 | + $expired_sessions[] = esc_sql("_wp_session_$session_id"); |
|
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | // Delete all expired sessions in a single query |
| 159 | - if ( ! empty( $expired_sessions ) ) { |
|
| 160 | - $option_names = implode( "','", $expired_sessions ); |
|
| 161 | - $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')" ); |
|
| 159 | + if (!empty($expired_sessions)) { |
|
| 160 | + $option_names = implode("','", $expired_sessions); |
|
| 161 | + $wpdb->query("DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')"); |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | // Allow other plugins to hook in to the garbage collection process. |
| 166 | - do_action( 'wp_session_cleanup' ); |
|
| 166 | + do_action('wp_session_cleanup'); |
|
| 167 | 167 | } |
| 168 | -add_action( 'wp_session_garbage_collection', 'wp_session_cleanup' ); |
|
| 168 | +add_action('wp_session_garbage_collection', 'wp_session_cleanup'); |
|
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | 171 | * Register the garbage collector as a twice daily event. |
| 172 | 172 | */ |
| 173 | 173 | function wp_session_register_garbage_collection() { |
| 174 | - if ( ! wp_next_scheduled( 'wp_session_garbage_collection' ) ) { |
|
| 175 | - wp_schedule_event( current_time( 'timestamp' ), 'twicedaily', 'wp_session_garbage_collection' ); |
|
| 174 | + if (!wp_next_scheduled('wp_session_garbage_collection')) { |
|
| 175 | + wp_schedule_event(current_time('timestamp'), 'twicedaily', 'wp_session_garbage_collection'); |
|
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | -add_action( 'wp', 'wp_session_register_garbage_collection' ); |
|
| 178 | +add_action('wp', 'wp_session_register_garbage_collection'); |
|
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | {
|
| 91 | 91 | |
| 92 | 92 | //widgetform in backend |
| 93 | - $instance = wp_parse_args((array)$instance, |
|
| 93 | + $instance = wp_parse_args((array) $instance, |
|
| 94 | 94 | array('title' => '',
|
| 95 | 95 | 'post_type' => '', |
| 96 | 96 | 'category' => '', |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | ?> |
| 147 | 147 | |
| 148 | 148 | <p> |
| 149 | - <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory');?>
|
|
| 149 | + <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory'); ?>
|
|
| 150 | 150 | |
| 151 | 151 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
|
| 152 | 152 | name="<?php echo $this->get_field_name('title'); ?>" type="text"
|
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | <p> |
| 158 | 158 | <label |
| 159 | - for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Post Type:', 'geodirectory');?>
|
|
| 159 | + for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Post Type:', 'geodirectory'); ?>
|
|
| 160 | 160 | |
| 161 | 161 | <?php $postypes = geodir_get_posttypes(); ?> |
| 162 | 162 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | <p> |
| 182 | 182 | <label |
| 183 | - for="<?php echo $this->get_field_id('category'); ?>"><?php _e('Post Category:', 'geodirectory');?>
|
|
| 183 | + for="<?php echo $this->get_field_id('category'); ?>"><?php _e('Post Category:', 'geodirectory'); ?>
|
|
| 184 | 184 | |
| 185 | 185 | <?php |
| 186 | 186 | $category_taxonomy = geodir_get_taxonomies('gd_place');
|
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | </p> |
| 218 | 218 | <p> |
| 219 | 219 | <label |
| 220 | - for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts(total):', 'geodirectory');?>
|
|
| 220 | + for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts(total):', 'geodirectory'); ?>
|
|
| 221 | 221 | <input class="widefat" id="<?php echo $this->get_field_id('post_number'); ?>"
|
| 222 | 222 | name="<?php echo $this->get_field_name('post_number'); ?>" type="text"
|
| 223 | 223 | value="<?php echo esc_attr($post_number); ?>"/> |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | |
| 227 | 227 | <p> |
| 228 | 228 | <label |
| 229 | - for="<?php echo $this->get_field_id('max_show'); ?>"><?php _e('Number of posts(shown at one time, requires a slide width to be set):', 'geodirectory');?>
|
|
| 229 | + for="<?php echo $this->get_field_id('max_show'); ?>"><?php _e('Number of posts(shown at one time, requires a slide width to be set):', 'geodirectory'); ?>
|
|
| 230 | 230 | <input class="widefat" id="<?php echo $this->get_field_id('max_show'); ?>"
|
| 231 | 231 | name="<?php echo $this->get_field_name('max_show'); ?>" type="text"
|
| 232 | 232 | value="<?php echo esc_attr($max_show); ?>"/> |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | <p> |
| 237 | 237 | <label |
| 238 | - for="<?php echo $this->get_field_id('slide_width'); ?>"><?php _e('Slide width(leave blank unless showing more than one slide at a time, ex: 210):', 'geodirectory');?>
|
|
| 238 | + for="<?php echo $this->get_field_id('slide_width'); ?>"><?php _e('Slide width(leave blank unless showing more than one slide at a time, ex: 210):', 'geodirectory'); ?>
|
|
| 239 | 239 | <input class="widefat" id="<?php echo $this->get_field_id('slide_width'); ?>"
|
| 240 | 240 | name="<?php echo $this->get_field_name('slide_width'); ?>" type="text"
|
| 241 | 241 | value="<?php echo esc_attr($slide_width); ?>"/> |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | <p> |
| 246 | 246 | <label |
| 247 | - for="<?php echo $this->get_field_id('animation'); ?>"><?php _e('Animation:', 'geodirectory');?>
|
|
| 247 | + for="<?php echo $this->get_field_id('animation'); ?>"><?php _e('Animation:', 'geodirectory'); ?>
|
|
| 248 | 248 | |
| 249 | 249 | <select class="widefat" id="<?php echo $this->get_field_id('animation'); ?>"
|
| 250 | 250 | name="<?php echo $this->get_field_name('animation'); ?>">
|
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | <p> |
| 264 | 264 | <label |
| 265 | - for="<?php echo $this->get_field_id('slideshowSpeed'); ?>"><?php _e('Slide Show Speed: (milliseconds)', 'geodirectory');?>
|
|
| 265 | + for="<?php echo $this->get_field_id('slideshowSpeed'); ?>"><?php _e('Slide Show Speed: (milliseconds)', 'geodirectory'); ?>
|
|
| 266 | 266 | |
| 267 | 267 | <input class="widefat" id="<?php echo $this->get_field_id('slideshowSpeed'); ?>"
|
| 268 | 268 | name="<?php echo $this->get_field_name('slideshowSpeed'); ?>" type="text"
|
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | <p> |
| 274 | 274 | <label |
| 275 | - for="<?php echo $this->get_field_id('animationSpeed'); ?>"><?php _e('Animation Speed: (milliseconds)', 'geodirectory');?>
|
|
| 275 | + for="<?php echo $this->get_field_id('animationSpeed'); ?>"><?php _e('Animation Speed: (milliseconds)', 'geodirectory'); ?>
|
|
| 276 | 276 | |
| 277 | 277 | <input class="widefat" id="<?php echo $this->get_field_id('animationSpeed'); ?>"
|
| 278 | 278 | name="<?php echo $this->get_field_name('animationSpeed'); ?>" type="text"
|
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | |
| 283 | 283 | <p> |
| 284 | 284 | <label |
| 285 | - for="<?php echo $this->get_field_id('slideshow'); ?>"><?php _e('SlideShow:', 'geodirectory');?>
|
|
| 285 | + for="<?php echo $this->get_field_id('slideshow'); ?>"><?php _e('SlideShow:', 'geodirectory'); ?>
|
|
| 286 | 286 | |
| 287 | 287 | <input type="checkbox" <?php if ($slideshow) {
|
| 288 | 288 | echo 'checked="checked"'; |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | |
| 295 | 295 | <p> |
| 296 | 296 | <label |
| 297 | - for="<?php echo $this->get_field_id('animationLoop'); ?>"><?php _e('AnimationLoop:', 'geodirectory');?>
|
|
| 297 | + for="<?php echo $this->get_field_id('animationLoop'); ?>"><?php _e('AnimationLoop:', 'geodirectory'); ?>
|
|
| 298 | 298 | |
| 299 | 299 | <input type="checkbox" <?php if ($animationLoop) {
|
| 300 | 300 | echo 'checked="checked"'; |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | <p> |
| 308 | 308 | <label |
| 309 | - for="<?php echo $this->get_field_id('directionNav'); ?>"><?php _e('DirectionNav:', 'geodirectory');?>
|
|
| 309 | + for="<?php echo $this->get_field_id('directionNav'); ?>"><?php _e('DirectionNav:', 'geodirectory'); ?>
|
|
| 310 | 310 | |
| 311 | 311 | <input type="checkbox" <?php if ($directionNav) {
|
| 312 | 312 | echo 'checked="checked"'; |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | |
| 320 | 320 | <p> |
| 321 | 321 | <label |
| 322 | - for="<?php echo $this->get_field_id('show_title'); ?>"><?php _e('Show Title:', 'geodirectory');?>
|
|
| 322 | + for="<?php echo $this->get_field_id('show_title'); ?>"><?php _e('Show Title:', 'geodirectory'); ?>
|
|
| 323 | 323 | |
| 324 | 324 | <input type="checkbox" <?php if ($show_title) {
|
| 325 | 325 | echo 'checked="checked"'; |
@@ -353,10 +353,10 @@ discard block |
||
| 353 | 353 | |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | - <?php if(is_active_widget( false, false, $this->id_base, true )){ ?>
|
|
| 356 | + <?php if (is_active_widget(false, false, $this->id_base, true)) { ?>
|
|
| 357 | 357 | var post_type = jQuery('#<?php echo $this->get_field_id('post_type'); ?>').val();
|
| 358 | 358 | |
| 359 | - geodir_change_category_list(post_type, '<?php echo $category;?>'); |
|
| 359 | + geodir_change_category_list(post_type, '<?php echo $category; ?>'); |
|
| 360 | 360 | <?php } ?> |
| 361 | 361 | |
| 362 | 362 | </script> |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | //save the widget |
| 61 | 61 | $instance = $old_instance; |
| 62 | 62 | $instance['title'] = strip_tags($new_instance['title']); |
| 63 | - $category_limit = (int)$new_instance['category_limit']; |
|
| 63 | + $category_limit = (int) $new_instance['category_limit']; |
|
| 64 | 64 | $instance['category_limit'] = $category_limit > 0 ? $category_limit : 15; |
| 65 | 65 | $instance['default_post_type'] = isset($new_instance['default_post_type']) ? $new_instance['default_post_type'] : ''; |
| 66 | 66 | return $instance; |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | public function form($instance) |
| 79 | 79 | {
|
| 80 | 80 | //widgetform in backend |
| 81 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'category_limit' => 15, 'default_post_type' => ''));
|
|
| 81 | + $instance = wp_parse_args((array) $instance, array('title' => '', 'category_limit' => 15, 'default_post_type' => ''));
|
|
| 82 | 82 | |
| 83 | 83 | $title = strip_tags($instance['title']); |
| 84 | - $category_limit = (int)$instance['category_limit']; |
|
| 84 | + $category_limit = (int) $instance['category_limit']; |
|
| 85 | 85 | $category_limit = $category_limit > 0 ? $category_limit : 15; |
| 86 | 86 | $default_post_type = isset($instance['default_post_type']) ? $instance['default_post_type'] : ''; |
| 87 | 87 | |
@@ -96,10 +96,10 @@ discard block |
||
| 96 | 96 | </p> |
| 97 | 97 | <p> |
| 98 | 98 | <label for="<?php echo $this->get_field_id('post_type'); ?>">
|
| 99 | - <?php _e('Default post type to use (if not set by page)', 'geodirectory');?>
|
|
| 99 | + <?php _e('Default post type to use (if not set by page)', 'geodirectory'); ?>
|
|
| 100 | 100 | <select class="widefat" id="<?php echo $this->get_field_id('default_post_type'); ?>" name="<?php echo $this->get_field_name('default_post_type'); ?>">
|
| 101 | 101 | <?php foreach ($post_type_options as $name => $title) { ?>
|
| 102 | - <option value="<?php echo $name;?>" <?php selected($name, $default_post_type);?>><?php echo $title; ?></option> |
|
| 102 | + <option value="<?php echo $name; ?>" <?php selected($name, $default_post_type); ?>><?php echo $title; ?></option> |
|
| 103 | 103 | <?php } ?> |
| 104 | 104 | </select> |
| 105 | 105 | </label> |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | for="<?php echo $this->get_field_id('category_limit'); ?>"><?php _e('Customize categories count to appear by default:', 'geodirectory'); ?>
|
| 110 | 110 | <input class="widefat" id="<?php echo $this->get_field_id('category_limit'); ?>"
|
| 111 | 111 | name="<?php echo $this->get_field_name('category_limit'); ?>" type="text"
|
| 112 | - value="<?php echo (int)esc_attr($category_limit); ?>"/> |
|
| 112 | + value="<?php echo (int) esc_attr($category_limit); ?>"/> |
|
| 113 | 113 | |
| 114 | 114 | <p class="description" |
| 115 | 115 | style="padding:0"><?php _e('After categories count reaches this limit option More Categories / Less Categoris will be displayed to show/hide categories. Default: 15', 'geodirectory'); ?></p>
|
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | public function form($instance) |
| 216 | 216 | {
|
| 217 | 217 | //widgetform in backend |
| 218 | - $instance = wp_parse_args((array)$instance, |
|
| 218 | + $instance = wp_parse_args((array) $instance, |
|
| 219 | 219 | array('title' => '',
|
| 220 | 220 | 'post_type' => '', |
| 221 | 221 | 'category' => array(), |
@@ -266,9 +266,9 @@ discard block |
||
| 266 | 266 | ?> |
| 267 | 267 | |
| 268 | 268 | <p> |
| 269 | - <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory');?>
|
|
| 269 | + <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory'); ?>
|
|
| 270 | 270 | <small>(%posttype_singular_label% , |
| 271 | - %posttype_plural_label% <?php _e('can be used', 'geodirectory');?>)
|
|
| 271 | + %posttype_plural_label% <?php _e('can be used', 'geodirectory'); ?>)
|
|
| 272 | 272 | </small> |
| 273 | 273 | |
| 274 | 274 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
|
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | <p> |
| 281 | 281 | <label |
| 282 | - for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Post Type:', 'geodirectory');?>
|
|
| 282 | + for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Post Type:', 'geodirectory'); ?>
|
|
| 283 | 283 | |
| 284 | 284 | <?php $postypes = geodir_get_posttypes(); |
| 285 | 285 | /** |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | |
| 312 | 312 | <p id="post_type_cats"> |
| 313 | 313 | <label |
| 314 | - for="<?php echo $this->get_field_id('category'); ?>"><?php _e('Post Category:', 'geodirectory');?>
|
|
| 314 | + for="<?php echo $this->get_field_id('category'); ?>"><?php _e('Post Category:', 'geodirectory'); ?>
|
|
| 315 | 315 | |
| 316 | 316 | <?php |
| 317 | 317 | |
@@ -350,14 +350,14 @@ discard block |
||
| 350 | 350 | |
| 351 | 351 | <input type="hidden" name="<?php echo $this->get_field_name('category_title'); ?>"
|
| 352 | 352 | id="<?php echo $this->get_field_id('category_title'); ?>"
|
| 353 | - value="<?php if ($category_title != '') echo $category_title; else echo __('All', 'geodirectory');?>"/>
|
|
| 353 | + value="<?php if ($category_title != '') echo $category_title; else echo __('All', 'geodirectory'); ?>"/>
|
|
| 354 | 354 | |
| 355 | 355 | </label> |
| 356 | 356 | </p> |
| 357 | 357 | |
| 358 | 358 | <p> |
| 359 | 359 | <label |
| 360 | - for="<?php echo $this->get_field_id('list_sort'); ?>"><?php _e('Sort by:', 'geodirectory');?>
|
|
| 360 | + for="<?php echo $this->get_field_id('list_sort'); ?>"><?php _e('Sort by:', 'geodirectory'); ?>
|
|
| 361 | 361 | |
| 362 | 362 | <select class="widefat" id="<?php echo $this->get_field_id('list_sort'); ?>"
|
| 363 | 363 | name="<?php echo $this->get_field_name('list_sort'); ?>">
|
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | <p> |
| 394 | 394 | |
| 395 | 395 | <label |
| 396 | - for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts:', 'geodirectory');?>
|
|
| 396 | + for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts:', 'geodirectory'); ?>
|
|
| 397 | 397 | |
| 398 | 398 | <input class="widefat" id="<?php echo $this->get_field_id('post_number'); ?>"
|
| 399 | 399 | name="<?php echo $this->get_field_name('post_number'); ?>" type="text"
|
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | |
| 404 | 404 | <p> |
| 405 | 405 | <label for="<?php echo $this->get_field_id('layout'); ?>">
|
| 406 | - <?php _e('Layout:', 'geodirectory');?>
|
|
| 406 | + <?php _e('Layout:', 'geodirectory'); ?>
|
|
| 407 | 407 | <select class="widefat" id="<?php echo $this->get_field_id('layout'); ?>"
|
| 408 | 408 | name="<?php echo $this->get_field_name('layout'); ?>">
|
| 409 | 409 | <option <?php if ($layout == 'gridview_onehalf') {
|
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | |
| 433 | 433 | <p> |
| 434 | 434 | <label |
| 435 | - for="<?php echo $this->get_field_id('listing_width'); ?>"><?php _e('Listing width:', 'geodirectory');?>
|
|
| 435 | + for="<?php echo $this->get_field_id('listing_width'); ?>"><?php _e('Listing width:', 'geodirectory'); ?>
|
|
| 436 | 436 | |
| 437 | 437 | <input class="widefat" id="<?php echo $this->get_field_id('listing_width'); ?>"
|
| 438 | 438 | name="<?php echo $this->get_field_name('listing_width'); ?>" type="text"
|
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | |
| 443 | 443 | <p> |
| 444 | 444 | <label |
| 445 | - for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory');?>
|
|
| 445 | + for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory'); ?>
|
|
| 446 | 446 | <input class="widefat" id="<?php echo $this->get_field_id('character_count'); ?>"
|
| 447 | 447 | name="<?php echo $this->get_field_name('character_count'); ?>" type="text"
|
| 448 | 448 | value="<?php echo esc_attr($character_count); ?>"/> |
@@ -451,41 +451,41 @@ discard block |
||
| 451 | 451 | |
| 452 | 452 | <p> |
| 453 | 453 | <label for="<?php echo $this->get_field_id('add_location_filter'); ?>">
|
| 454 | - <?php _e('Enable Location Filter:', 'geodirectory');?>
|
|
| 454 | + <?php _e('Enable Location Filter:', 'geodirectory'); ?>
|
|
| 455 | 455 | <input type="checkbox" id="<?php echo $this->get_field_id('add_location_filter'); ?>"
|
| 456 | - name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"';?>
|
|
| 456 | + name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"'; ?>
|
|
| 457 | 457 | value="1"/> |
| 458 | 458 | </label> |
| 459 | 459 | </p> |
| 460 | 460 | <p> |
| 461 | 461 | <label for="<?php echo $this->get_field_id('show_featured_only'); ?>">
|
| 462 | - <?php _e('Show only featured listings:', 'geodirectory');?> <input type="checkbox"
|
|
| 462 | + <?php _e('Show only featured listings:', 'geodirectory'); ?> <input type="checkbox"
|
|
| 463 | 463 | id="<?php echo $this->get_field_id('show_featured_only'); ?>"
|
| 464 | - name="<?php echo $this->get_field_name('show_featured_only'); ?>" <?php if ($show_featured_only) echo 'checked="checked"';?>
|
|
| 464 | + name="<?php echo $this->get_field_name('show_featured_only'); ?>" <?php if ($show_featured_only) echo 'checked="checked"'; ?>
|
|
| 465 | 465 | value="1"/> |
| 466 | 466 | </label> |
| 467 | 467 | </p> |
| 468 | 468 | <p> |
| 469 | 469 | <label for="<?php echo $this->get_field_id('show_special_only'); ?>">
|
| 470 | - <?php _e('Show only listings with special offers:', 'geodirectory');?> <input type="checkbox"
|
|
| 470 | + <?php _e('Show only listings with special offers:', 'geodirectory'); ?> <input type="checkbox"
|
|
| 471 | 471 | id="<?php echo $this->get_field_id('show_special_only'); ?>"
|
| 472 | - name="<?php echo $this->get_field_name('show_special_only'); ?>" <?php if ($show_special_only) echo 'checked="checked"';?>
|
|
| 472 | + name="<?php echo $this->get_field_name('show_special_only'); ?>" <?php if ($show_special_only) echo 'checked="checked"'; ?>
|
|
| 473 | 473 | value="1"/> |
| 474 | 474 | </label> |
| 475 | 475 | </p> |
| 476 | 476 | <p> |
| 477 | 477 | <label for="<?php echo $this->get_field_id('with_pics_only'); ?>">
|
| 478 | - <?php _e('Show only listings with pics:', 'geodirectory');?> <input type="checkbox"
|
|
| 478 | + <?php _e('Show only listings with pics:', 'geodirectory'); ?> <input type="checkbox"
|
|
| 479 | 479 | id="<?php echo $this->get_field_id('with_pics_only'); ?>"
|
| 480 | - name="<?php echo $this->get_field_name('with_pics_only'); ?>" <?php if ($with_pics_only) echo 'checked="checked"';?>
|
|
| 480 | + name="<?php echo $this->get_field_name('with_pics_only'); ?>" <?php if ($with_pics_only) echo 'checked="checked"'; ?>
|
|
| 481 | 481 | value="1"/> |
| 482 | 482 | </label> |
| 483 | 483 | </p> |
| 484 | 484 | <p> |
| 485 | 485 | <label for="<?php echo $this->get_field_id('with_videos_only'); ?>">
|
| 486 | - <?php _e('Show only listings with videos:', 'geodirectory');?> <input type="checkbox"
|
|
| 486 | + <?php _e('Show only listings with videos:', 'geodirectory'); ?> <input type="checkbox"
|
|
| 487 | 487 | id="<?php echo $this->get_field_id('with_videos_only'); ?>"
|
| 488 | - name="<?php echo $this->get_field_name('with_videos_only'); ?>" <?php if ($with_videos_only) echo 'checked="checked"';?>
|
|
| 488 | + name="<?php echo $this->get_field_name('with_videos_only'); ?>" <?php if ($with_videos_only) echo 'checked="checked"'; ?>
|
|
| 489 | 489 | value="1"/> |
| 490 | 490 | </label> |
| 491 | 491 | </p> |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | - <?php if(is_active_widget( false, false, $this->id_base, true )){ ?>
|
|
| 534 | + <?php if (is_active_widget(false, false, $this->id_base, true)) { ?>
|
|
| 535 | 535 | var post_type = jQuery('#<?php echo $this->get_field_id('post_type'); ?>').val();
|
| 536 | 536 | |
| 537 | 537 | <?php } ?> |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | public function form($instance) |
| 138 | 138 | { |
| 139 | 139 | //widgetform in backend |
| 140 | - $instance = wp_parse_args((array)$instance, |
|
| 140 | + $instance = wp_parse_args((array) $instance, |
|
| 141 | 141 | array('title' => '', |
| 142 | 142 | 'list_sort' => '', |
| 143 | 143 | 'list_order' => '', |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | ?> |
| 171 | 171 | <p> |
| 172 | - <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory');?> |
|
| 172 | + <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory'); ?> |
|
| 173 | 173 | |
| 174 | 174 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" |
| 175 | 175 | name="<?php echo $this->get_field_name('title'); ?>" type="text" |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | </p> |
| 179 | 179 | <p> |
| 180 | 180 | <label |
| 181 | - for="<?php echo $this->get_field_id('list_sort'); ?>"><?php _e('Sort by:', 'geodirectory');?> |
|
| 181 | + for="<?php echo $this->get_field_id('list_sort'); ?>"><?php _e('Sort by:', 'geodirectory'); ?> |
|
| 182 | 182 | |
| 183 | 183 | <select class="widefat" id="<?php echo $this->get_field_id('list_sort'); ?>" |
| 184 | 184 | name="<?php echo $this->get_field_name('list_sort'); ?>"> |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | </p> |
| 209 | 209 | <p> |
| 210 | 210 | <label |
| 211 | - for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts:', 'geodirectory');?> |
|
| 211 | + for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts:', 'geodirectory'); ?> |
|
| 212 | 212 | |
| 213 | 213 | <input class="widefat" id="<?php echo $this->get_field_id('post_number'); ?>" |
| 214 | 214 | name="<?php echo $this->get_field_name('post_number'); ?>" type="text" |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | </p> |
| 218 | 218 | <p> |
| 219 | 219 | <label for="<?php echo $this->get_field_id('relate_to'); ?>"> |
| 220 | - <?php _e('Relate to:', 'geodirectory');?> |
|
| 220 | + <?php _e('Relate to:', 'geodirectory'); ?> |
|
| 221 | 221 | <select class="widefat" id="<?php echo $this->get_field_id('relate_to'); ?>" |
| 222 | 222 | name="<?php echo $this->get_field_name('relate_to'); ?>"> |
| 223 | 223 | <option <?php if ($relate_to == 'category') { |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | <p> |
| 233 | 233 | <p> |
| 234 | 234 | <label for="<?php echo $this->get_field_id('layout'); ?>"> |
| 235 | - <?php _e('Layout:', 'geodirectory');?> |
|
| 235 | + <?php _e('Layout:', 'geodirectory'); ?> |
|
| 236 | 236 | <select class="widefat" id="<?php echo $this->get_field_id('layout'); ?>" |
| 237 | 237 | name="<?php echo $this->get_field_name('layout'); ?>"> |
| 238 | 238 | <option <?php if ($layout == 'gridview_onehalf') { |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | </p> |
| 261 | 261 | <p> |
| 262 | 262 | <label |
| 263 | - for="<?php echo $this->get_field_id('listing_width'); ?>"><?php _e('Listing width:', 'geodirectory');?> |
|
| 263 | + for="<?php echo $this->get_field_id('listing_width'); ?>"><?php _e('Listing width:', 'geodirectory'); ?> |
|
| 264 | 264 | |
| 265 | 265 | <input class="widefat" id="<?php echo $this->get_field_id('listing_width'); ?>" |
| 266 | 266 | name="<?php echo $this->get_field_name('listing_width'); ?>" type="text" |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | </p> |
| 270 | 270 | <p> |
| 271 | 271 | <label |
| 272 | - for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory');?> |
|
| 272 | + for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory'); ?> |
|
| 273 | 273 | <input class="widefat" id="<?php echo $this->get_field_id('character_count'); ?>" |
| 274 | 274 | name="<?php echo $this->get_field_name('character_count'); ?>" type="text" |
| 275 | 275 | value="<?php echo esc_attr($character_count); ?>"/> |
@@ -277,9 +277,9 @@ discard block |
||
| 277 | 277 | </p> |
| 278 | 278 | <p> |
| 279 | 279 | <label for="<?php echo $this->get_field_id('add_location_filter'); ?>"> |
| 280 | - <?php _e('Enable Location Filter:', 'geodirectory');?> |
|
| 280 | + <?php _e('Enable Location Filter:', 'geodirectory'); ?> |
|
| 281 | 281 | <input type="checkbox" id="<?php echo $this->get_field_id('add_location_filter'); ?>" |
| 282 | - name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"';?> |
|
| 282 | + name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"'; ?> |
|
| 283 | 283 | value="1"/> |
| 284 | 284 | </label> |
| 285 | 285 | </p> |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | 'posts_per_page' => 1, |
| 18 | 18 | ); |
| 19 | 19 | |
| 20 | - $all_posts = new WP_Query( $query_args ); |
|
| 20 | + $all_posts = new WP_Query($query_args); |
|
| 21 | 21 | $post_id = null; |
| 22 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 22 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
| 23 | 23 | $post_id = get_the_ID(); |
| 24 | 24 | endwhile; |
| 25 | 25 | |
@@ -28,13 +28,13 @@ discard block |
||
| 28 | 28 | ob_start(); |
| 29 | 29 | geodir_add_to_favorite($post_id); |
| 30 | 30 | $output = ob_get_clean(); |
| 31 | - $this->assertContains( 'Remove from Favorites', $output ); |
|
| 31 | + $this->assertContains('Remove from Favorites', $output); |
|
| 32 | 32 | |
| 33 | 33 | $user_id = $current_user->ID; |
| 34 | 34 | |
| 35 | 35 | $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true); |
| 36 | 36 | |
| 37 | - $this->assertContains( $post_id, $user_fav_posts ); |
|
| 37 | + $this->assertContains($post_id, $user_fav_posts); |
|
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | } |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | 'posts_per_page' => 1, |
| 50 | 50 | ); |
| 51 | 51 | |
| 52 | - $all_posts = new WP_Query( $query_args ); |
|
| 52 | + $all_posts = new WP_Query($query_args); |
|
| 53 | 53 | $post_id = null; |
| 54 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 54 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
| 55 | 55 | $post_id = get_the_ID(); |
| 56 | 56 | endwhile; |
| 57 | 57 | |
@@ -60,22 +60,22 @@ discard block |
||
| 60 | 60 | ob_start(); |
| 61 | 61 | geodir_add_to_favorite($post_id); |
| 62 | 62 | $output = ob_get_clean(); |
| 63 | - $this->assertContains( 'Remove from Favorites', $output ); |
|
| 63 | + $this->assertContains('Remove from Favorites', $output); |
|
| 64 | 64 | |
| 65 | 65 | $user_id = $current_user->ID; |
| 66 | 66 | |
| 67 | 67 | $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true); |
| 68 | 68 | |
| 69 | - $this->assertContains( $post_id, $user_fav_posts ); |
|
| 69 | + $this->assertContains($post_id, $user_fav_posts); |
|
| 70 | 70 | |
| 71 | 71 | ob_start(); |
| 72 | 72 | geodir_remove_from_favorite($post_id); |
| 73 | 73 | $output = ob_get_clean(); |
| 74 | - $this->assertContains( 'Add to Favorites', $output ); |
|
| 74 | + $this->assertContains('Add to Favorites', $output); |
|
| 75 | 75 | |
| 76 | 76 | $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true); |
| 77 | 77 | |
| 78 | - $this->assertNotContains( $post_id, $user_fav_posts ); |
|
| 78 | + $this->assertNotContains($post_id, $user_fav_posts); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | 'posts_per_page' => 1, |
| 15 | 15 | ); |
| 16 | 16 | |
| 17 | - $all_posts = new WP_Query( $query_args ); |
|
| 17 | + $all_posts = new WP_Query($query_args); |
|
| 18 | 18 | $post_id = null; |
| 19 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 19 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
| 20 | 20 | $post_id = get_the_ID(); |
| 21 | 21 | endwhile; |
| 22 | 22 | |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | 'posts_per_page' => 1, |
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | - $all_posts = new WP_Query( $query_args ); |
|
| 48 | + $all_posts = new WP_Query($query_args); |
|
| 49 | 49 | $post_id = null; |
| 50 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 50 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
| 51 | 51 | $post_id = get_the_ID(); |
| 52 | 52 | endwhile; |
| 53 | 53 | |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | 'posts_per_page' => 1, |
| 79 | 79 | ); |
| 80 | 80 | |
| 81 | - $all_posts = new WP_Query( $query_args ); |
|
| 81 | + $all_posts = new WP_Query($query_args); |
|
| 82 | 82 | $post_id = null; |
| 83 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 83 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
| 84 | 84 | $post_id = get_the_ID(); |
| 85 | 85 | endwhile; |
| 86 | 86 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | ob_start(); |
| 104 | 104 | geodir_send_friend($data); |
| 105 | 105 | $output = ob_get_clean(); |
| 106 | - $this->assertContains( 'Email from GeoDirectory failed to send', $output ); |
|
| 106 | + $this->assertContains('Email from GeoDirectory failed to send', $output); |
|
| 107 | 107 | remove_filter('wp_mail', 'print_mail'); |
| 108 | 108 | remove_filter('wp_redirect', '__return_false'); |
| 109 | 109 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // reset the wpdb queries log, storing it on the profile stack if necessary |
| 41 | 41 | global $wpdb; |
| 42 | 42 | if ($this->stack) { |
| 43 | - $this->stack[count($this->stack)-1]['queries'] = $wpdb->queries; |
|
| 43 | + $this->stack[count($this->stack) - 1]['queries'] = $wpdb->queries; |
|
| 44 | 44 | } |
| 45 | 45 | $wpdb->queries = array(); |
| 46 | 46 | |
@@ -74,14 +74,14 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | if (isset($this->profile[$name])) { |
| 76 | 76 | $this->profile[$name]['time'] += $time; |
| 77 | - $this->profile[$name]['calls'] ++; |
|
| 77 | + $this->profile[$name]['calls']++; |
|
| 78 | 78 | $this->profile[$name]['cache_cold_hits'] += ($wp_object_cache->cold_cache_hits - $item['cache_cold_hits']); |
| 79 | 79 | $this->profile[$name]['cache_warm_hits'] += ($wp_object_cache->warm_cache_hits - $item['cache_warm_hits']); |
| 80 | 80 | $this->profile[$name]['cache_misses'] += ($wp_object_cache->cache_misses - $item['cache_misses']); |
| 81 | - $this->profile[$name]['cache_dirty_objects'] = array_add( $this->profile[$name]['cache_dirty_objects'], $cache_dirty_delta) ; |
|
| 82 | - $this->profile[$name]['actions'] = array_add( $this->profile[$name]['actions'], $item['actions'] ); |
|
| 83 | - $this->profile[$name]['filters'] = array_add( $this->profile[$name]['filters'], $item['filters'] ); |
|
| 84 | - $this->profile[$name]['queries'] = array_add( $this->profile[$name]['queries'], $item['queries'] ); |
|
| 81 | + $this->profile[$name]['cache_dirty_objects'] = array_add($this->profile[$name]['cache_dirty_objects'], $cache_dirty_delta); |
|
| 82 | + $this->profile[$name]['actions'] = array_add($this->profile[$name]['actions'], $item['actions']); |
|
| 83 | + $this->profile[$name]['filters'] = array_add($this->profile[$name]['filters'], $item['filters']); |
|
| 84 | + $this->profile[$name]['queries'] = array_add($this->profile[$name]['queries'], $item['queries']); |
|
| 85 | 85 | #$this->_query_summary($item['queries'], $this->profile[$name]['queries']); |
| 86 | 86 | |
| 87 | 87 | } |
@@ -109,28 +109,28 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | function microtime($since = 0.0) { |
| 111 | 111 | list($usec, $sec) = explode(' ', microtime()); |
| 112 | - return (float)$sec + (float)$usec - $since; |
|
| 112 | + return (float) $sec + (float) $usec - $since; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | function log_filter($tag) { |
| 116 | 116 | if ($this->stack) { |
| 117 | 117 | global $wp_actions; |
| 118 | 118 | if ($tag == end($wp_actions)) |
| 119 | - @$this->stack[count($this->stack)-1]['actions'][$tag] ++; |
|
| 119 | + @$this->stack[count($this->stack) - 1]['actions'][$tag]++; |
|
| 120 | 120 | else |
| 121 | - @$this->stack[count($this->stack)-1]['filters'][$tag] ++; |
|
| 121 | + @$this->stack[count($this->stack) - 1]['filters'][$tag]++; |
|
| 122 | 122 | } |
| 123 | 123 | return $arg; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | function log_action($tag) { |
| 127 | 127 | if ($this->stack) |
| 128 | - @$this->stack[count($this->stack)-1]['actions'][$tag] ++; |
|
| 128 | + @$this->stack[count($this->stack) - 1]['actions'][$tag]++; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | function _current_action() { |
| 132 | 132 | global $wp_actions; |
| 133 | - return $wp_actions[count($wp_actions)-1]; |
|
| 133 | + return $wp_actions[count($wp_actions) - 1]; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | function results() { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | $sql = preg_replace('/(WHERE \w+ =) \d+/', '$1 x', $sql); |
| 144 | 144 | $sql = preg_replace('/(WHERE \w+ =) \'\[-\w]+\'/', '$1 \'xxx\'', $sql); |
| 145 | 145 | |
| 146 | - @$out[$sql] ++; |
|
| 146 | + @$out[$sql]++; |
|
| 147 | 147 | } |
| 148 | 148 | asort($out); |
| 149 | 149 | return; |
@@ -154,9 +154,9 @@ discard block |
||
| 154 | 154 | $out = array(); |
| 155 | 155 | foreach ($queries as $q) { |
| 156 | 156 | if (empty($q[2])) |
| 157 | - @$out['unknown'] ++; |
|
| 157 | + @$out['unknown']++; |
|
| 158 | 158 | else |
| 159 | - @$out[$q[2]] ++; |
|
| 159 | + @$out[$q[2]]++; |
|
| 160 | 160 | } |
| 161 | 161 | return $out; |
| 162 | 162 | } |