Completed
Push — master ( b16381...2ed533 )
by Michael
07:11 queued 04:55
created
includes/save_gallery.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -12,56 +12,56 @@
 block discarded – undo
12 12
 	/**
13 13
 	 * Update an existing galleries options
14 14
 	 */
15
-	public static function save_gallery_options( $postid, $gallery_ids, $options, $type = false ) {
15
+	public static function save_gallery_options($postid, $gallery_ids, $options, $type = false) {
16 16
 
17 17
 		// gallery width
18
-		$gallery_width = isset( $options['width'] ) ? $options['width'] : false;
18
+		$gallery_width = isset($options['width']) ? $options['width'] : false;
19 19
 
20 20
 		// gallery grid item width
21
-		$item_width = isset( $options['itemwidth'] ) ? $options['itemwidth'] : false;
21
+		$item_width = isset($options['itemwidth']) ? $options['itemwidth'] : false;
22 22
 
23 23
 		// caption
24
-		$caption = isset( $options['caption'] ) ? $options['caption'] : false;
24
+		$caption = isset($options['caption']) ? $options['caption'] : false;
25 25
 
26 26
 		// gallery transition
27
-		$transition = isset( $options['transition'] ) ? $options['transition'] : false;
27
+		$transition = isset($options['transition']) ? $options['transition'] : false;
28 28
 
29 29
 		// gallery transition speed
30
-		$transitionSpeed = isset( $options['speed'] ) ? $options['speed'] : false;
30
+		$transitionSpeed = isset($options['speed']) ? $options['speed'] : false;
31 31
 
32 32
 		// gallery hide thumbs
33
-		$hideThumbs = isset( $options['hideThumbs'] ) ? $options['hideThumbs'] : false;
33
+		$hideThumbs = isset($options['hideThumbs']) ? $options['hideThumbs'] : false;
34 34
 
35 35
 		// photoset layout
36
-		$psLayout = isset( $options['pslayout'] ) ? $options['pslayout'] : false;
36
+		$psLayout = isset($options['pslayout']) ? $options['pslayout'] : false;
37 37
 
38 38
 		// photoset layout
39
-		$psLightbox = isset( $options['pslightbox'] ) ? $options['pslightbox'] : false;
39
+		$psLightbox = isset($options['pslightbox']) ? $options['pslightbox'] : false;
40 40
 
41 41
 		// update gallery ids
42
-		if ( !empty( $gallery_ids ) ) {
42
+		if (!empty($gallery_ids)) {
43 43
 
44
-			update_post_meta( $postid, '_ase_gallery_images', $gallery_ids );
44
+			update_post_meta($postid, '_ase_gallery_images', $gallery_ids);
45 45
 
46 46
 		}
47 47
 
48
-		update_post_meta( $postid, 'aesop_gallery_type', sanitize_text_field( trim( $type ) ) );
48
+		update_post_meta($postid, 'aesop_gallery_type', sanitize_text_field(trim($type)));
49 49
 
50
-		update_post_meta( $postid, 'aesop_gallery_width', sanitize_text_field( trim( $gallery_width ) ) );
50
+		update_post_meta($postid, 'aesop_gallery_width', sanitize_text_field(trim($gallery_width)));
51 51
 
52
-		update_post_meta( $postid, 'aesop_grid_gallery_width', sanitize_text_field( trim( $item_width ) ) );
52
+		update_post_meta($postid, 'aesop_grid_gallery_width', sanitize_text_field(trim($item_width)));
53 53
 
54
-		update_post_meta( $postid, 'aesop_gallery_caption', sanitize_text_field( trim( $caption ) ) );
54
+		update_post_meta($postid, 'aesop_gallery_caption', sanitize_text_field(trim($caption)));
55 55
 
56
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition', sanitize_text_field( trim( $transition ) ) );
56
+		update_post_meta($postid, 'aesop_thumb_gallery_transition', sanitize_text_field(trim($transition)));
57 57
 
58
-		update_post_meta( $postid, 'aesop_thumb_gallery_transition_speed', absint( trim( $transitionSpeed ) ) );
58
+		update_post_meta($postid, 'aesop_thumb_gallery_transition_speed', absint(trim($transitionSpeed)));
59 59
 
60
-		update_post_meta( $postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field( trim( $hideThumbs ) ) );
60
+		update_post_meta($postid, 'aesop_thumb_gallery_hide_thumbs', sanitize_text_field(trim($hideThumbs)));
61 61
 
62
-		update_post_meta( $postid, 'aesop_photoset_gallery_layout', sanitize_text_field( trim( $psLayout ) ) );
62
+		update_post_meta($postid, 'aesop_photoset_gallery_layout', sanitize_text_field(trim($psLayout)));
63 63
 
64
-		update_post_meta( $postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field( trim( $psLightbox ) ) );
64
+		update_post_meta($postid, 'aesop_photoset_gallery_lightbox', sanitize_text_field(trim($psLightbox)));
65 65
 
66 66
 	}
67 67
 
Please login to merge, or discard this patch.
internal-api/auth.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -52,28 +52,28 @@  discard block
 block discarded – undo
52 52
 	 * @param string $method The name of the callback method.
53 53
 
54 54
 	 */
55
-	public function __construct( $action, $callback_class) {
56
-		if ( ! is_object( $callback_class ) ) {
55
+	public function __construct($action, $callback_class) {
56
+		if (!is_object($callback_class)) {
57 57
 			$this->callback_instance = new $callback_class;
58
-		}else{
58
+		} else {
59 59
 			$this->callback_instance = $callback_class;
60 60
 		}
61 61
 
62
-		if ( $this->check_nonce() ) {
63
-			if ( is_object( $this->callback_instance ) && $this->if_implements() ) {
64
-				if ( $this->other_auth_checks( $action ) ) {
62
+		if ($this->check_nonce()) {
63
+			if (is_object($this->callback_instance) && $this->if_implements()) {
64
+				if ($this->other_auth_checks($action)) {
65 65
 					$this->status_code = 200;
66 66
 				} else {
67
-					$this->error_message = __( 'Unauthorized action', 'lasso' );
67
+					$this->error_message = __('Unauthorized action', 'lasso');
68 68
 					$this->status_code   = 401;
69 69
 				}
70 70
 			} else {
71
-				$this->error_message = __( 'All callback classes used for processing the Lasso Internal API must implement the lasso\internal_api\api_action interface.', 'lasso' );
71
+				$this->error_message = __('All callback classes used for processing the Lasso Internal API must implement the lasso\internal_api\api_action interface.', 'lasso');
72 72
 				$this->status_code   = 401;
73 73
 			}
74 74
 		} else {
75 75
 			$this->status_code   = 401;
76
-			$this->error_message = __( 'Nonce invalid', 'lasso' );
76
+			$this->error_message = __('Nonce invalid', 'lasso');
77 77
 		}
78 78
 
79 79
 	}
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
 	 *
90 90
 	 * @return bool True if auth checks were all postive.
91 91
 	 */
92
-	protected function other_auth_checks( $action ) {
92
+	protected function other_auth_checks($action) {
93 93
 		$auth_callbacks = $this->callback_instance->auth_callbacks();
94 94
 
95
-		if ( is_array( $auth_callbacks ) && isset( $auth_callbacks[ $action ] ) && is_array( $auth_callbacks[ $action ] ) ) {
96
-			$checks = $auth_callbacks[ $action ];
97
-			if ( is_array( $checks ) ) {
98
-				foreach ( $checks as $check ) {
99
-					if ( is_array( $check ) ) {
100
-						$check = call_user_func( array( $check[0], $check[1] ) );
95
+		if (is_array($auth_callbacks) && isset($auth_callbacks[$action]) && is_array($auth_callbacks[$action])) {
96
+			$checks = $auth_callbacks[$action];
97
+			if (is_array($checks)) {
98
+				foreach ($checks as $check) {
99
+					if (is_array($check)) {
100
+						$check = call_user_func(array($check[0], $check[1]));
101 101
 					} else {
102
-						$check = call_user_func( $check );
102
+						$check = call_user_func($check);
103 103
 					}
104 104
 
105
-					if ( false === $check ) {
105
+					if (false === $check) {
106 106
 						return false;
107 107
 
108 108
 					}
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	protected function if_implements() {
129 129
 
130
-		$implements = class_implements( $this->callback_instance );
131
-		if ( is_array( $implements ) && in_array( 'lasso\internal_api\api_action', $implements ) ) {
130
+		$implements = class_implements($this->callback_instance);
131
+		if (is_array($implements) && in_array('lasso\internal_api\api_action', $implements)) {
132 132
 			return true;
133 133
 
134 134
 		}
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
 	 * @return bool
148 148
 	 */
149 149
 	protected function check_nonce() {
150
-		if ( isset( $this->callback_instance->nonce_action ) ) {
150
+		if (isset($this->callback_instance->nonce_action)) {
151 151
 			$nonce = $this->callback_instance->nonce_action;
152
-		}else{
152
+		} else {
153 153
 			$nonce = 'lasso_editor';
154 154
 		}
155 155
 
156
-		return wp_verify_nonce( $_POST[ 'nonce' ], $nonce );
156
+		return wp_verify_nonce($_POST['nonce'], $nonce);
157 157
 
158 158
 	}
159 159
 
Please login to merge, or discard this patch.
internal-api/end_points.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 	 * Adds our API endpoint and hooks it in at template_redirect
19 19
 	 */
20 20
 	public function __construct() {
21
-		add_action( 'init', array( $this, 'add_endpoints' ) );
22
-		add_action( 'template_redirect', array( route::init(), 'do_api' ) );
21
+		add_action('init', array($this, 'add_endpoints'));
22
+		add_action('template_redirect', array(route::init(), 'do_api'));
23 23
 	}
24 24
 
25 25
 	/**
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function add_endpoints() {
31 31
 		//add "action" as a rewrite tag
32
-		add_rewrite_tag( '%action%', '^[a-z0-9_\-]+$' );
32
+		add_rewrite_tag('%action%', '^[a-z0-9_\-]+$');
33 33
 
34 34
 		//add the endpoint
35
-		add_rewrite_rule( 'lasso-internal-api/^[a-z0-9_\-]+$/?', 'index.php?action=$matches[1]', 'top' );
35
+		add_rewrite_rule('lasso-internal-api/^[a-z0-9_\-]+$/?', 'index.php?action=$matches[1]', 'top');
36 36
 
37 37
 	}
38 38
 }
Please login to merge, or discard this patch.
internal-api/find_data.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	 * @param object $callback_instance Callback class.
30 30
 	 * @param string $action The name of the action we are processing for.
31 31
 	 */
32
-	public function __construct( $callback_instance, $action ) {
33
-		if ( is_object( $callback_instance ) ) {
34
-			$this->get_data( $callback_instance, $action );
32
+	public function __construct($callback_instance, $action) {
33
+		if (is_object($callback_instance)) {
34
+			$this->get_data($callback_instance, $action);
35 35
 		}
36 36
 
37 37
 	}
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 	 * @param object $callback_instance Callback class.
50 50
 	 * @param string $action The name of the action we are processing for.
51 51
 	 */
52
-	protected function get_data( $callback_instance, $action ) {
52
+	protected function get_data($callback_instance, $action) {
53 53
 		$data = array();
54
-		if ( is_array( $_POST ) ) {
54
+		if (is_array($_POST)) {
55 55
 			$params = $callback_instance::params();
56 56
 
57 57
 			/**
@@ -61,20 +61,20 @@  discard block
 block discarded – undo
61 61
 			 *
62 62
 			 * @param array $params Array of params in form of $params[ 'action_name' ][ 'POST_field' ] = 'callback_function_for_sanatizing' ]
63 63
 			 */
64
-			$params = apply_filters( 'lasso_api_params', $params );
65
-			if ( is_array( $params ) && isset( $params[ $action ] ) && is_array( $params[ $action ] ) ) {
66
-				$params = $params[ $action ];
67
-				foreach( $params as $key => $callback ) {
64
+			$params = apply_filters('lasso_api_params', $params);
65
+			if (is_array($params) && isset($params[$action]) && is_array($params[$action])) {
66
+				$params = $params[$action];
67
+				foreach ($params as $key => $callback) {
68 68
 					$_data = null;
69
-					if ( is_array( $callback ) ) {
70
-						foreach( $callback as $cb ) {
71
-							$_data = $this->sanitize( $key, $cb );
69
+					if (is_array($callback)) {
70
+						foreach ($callback as $cb) {
71
+							$_data = $this->sanitize($key, $cb);
72 72
 						}
73
-					}else{
74
-						$_data = $this->sanitize( $key, $callback );
73
+					} else {
74
+						$_data = $this->sanitize($key, $callback);
75 75
 					}
76 76
 
77
-					$data[ $key ] = $_data;
77
+					$data[$key] = $_data;
78 78
 
79 79
 				}
80 80
 
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * @return string|null Sanitized data or null.
100 100
 	 */
101
-	protected function sanitize( $key, $cb ) {
101
+	protected function sanitize($key, $cb) {
102 102
 		$_data = null;
103
-		if ( isset( $_POST[ $key ] ) ) {
104
-			if ( function_exists( $cb ) ) {
105
-				$_data = call_user_func( $cb, $_POST[ $key ] );
103
+		if (isset($_POST[$key])) {
104
+			if (function_exists($cb)) {
105
+				$_data = call_user_func($cb, $_POST[$key]);
106 106
 
107 107
 				return $_data;
108 108
 
Please login to merge, or discard this patch.
internal-api/route.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -24,35 +24,35 @@  discard block
 block discarded – undo
24 24
 		global $wp_query;
25 25
 
26 26
 		//get action, and if set, possibly act
27
-		$action = $wp_query->get( 'action' );
28
-		if ( $action && strpos( $_SERVER['REQUEST_URI'], 'lasso-internal-api' ) ) {
27
+		$action = $wp_query->get('action');
28
+		if ($action && strpos($_SERVER['REQUEST_URI'], 'lasso-internal-api')) {
29 29
 
30
-			$response = __( 'Lasso API Error.', 'lasso' );
30
+			$response = __('Lasso API Error.', 'lasso');
31 31
 			$code = 400;
32 32
 
33 33
 			//see if have a nonce. Will verify it in auth class.
34
-			if ( isset( $_POST[ 'nonce' ] ) ) {
34
+			if (isset($_POST['nonce'])) {
35 35
 
36
-				$callback = self::find_callback( strip_tags( $action ) );
37
-				if ( is_int( $callback )  ) {
36
+				$callback = self::find_callback(strip_tags($action));
37
+				if (is_int($callback)) {
38 38
 					$code = $callback;
39
-				}elseif( ! class_exists( $callback['class'] ) ) {
39
+				}elseif (!class_exists($callback['class'])) {
40 40
 					$code = 415;
41
-				}else {
42
-					$action = str_replace( '-', '_', $action );
41
+				} else {
42
+					$action = str_replace('-', '_', $action);
43 43
 					$callback_instance = new $callback['class'];
44
-					$auth              = self::auth( $action, $callback_instance, $callback['method'] );
45
-					if ( 200 == $auth->status_code && is_array( $callback ) ) {
44
+					$auth              = self::auth($action, $callback_instance, $callback['method']);
45
+					if (200 == $auth->status_code && is_array($callback)) {
46 46
 						$code = 200;
47
-						$data = new find_data( $callback_instance, $action );
48
-						if ( is_array( $data->data ) && ! empty( $data->data ) ) {
49
-							$response = self::route( $action, $callback_instance, $callback['method'], $data->data );
47
+						$data = new find_data($callback_instance, $action);
48
+						if (is_array($data->data) && !empty($data->data)) {
49
+							$response = self::route($action, $callback_instance, $callback['method'], $data->data);
50 50
 						} else {
51 51
 							$code = 500;
52 52
 						}
53 53
 
54 54
 					} else {
55
-						if ( isset( $auth->error_message ) && is_string( $auth->error_message ) ) {
55
+						if (isset($auth->error_message) && is_string($auth->error_message)) {
56 56
 							$response = $auth->error_message;
57 57
 						}
58 58
 
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 
62 62
 				}
63 63
 
64
-			}else{
64
+			} else {
65 65
 				$code = 401;
66
-				$response = __( 'Nonce not set.', 'lasso' );
66
+				$response = __('Nonce not set.', 'lasso');
67 67
 			}
68 68
 
69
-			self::respond( $response, $code );
69
+			self::respond($response, $code);
70 70
 
71 71
 		}
72 72
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return \lasso\internal_api\auth
87 87
 	 */
88
-	protected static function auth( $action, $callback ) {
89
-		return new auth( $action, $callback );
88
+	protected static function auth($action, $callback) {
89
+		return new auth($action, $callback);
90 90
 
91 91
 	}
92 92
 
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @return array
101 101
 	 */
102
-	protected static function find_callback( $action ) {
103
-		if ( $action ) {
104
-			$parts = explode( '_', $action );
102
+	protected static function find_callback($action) {
103
+		if ($action) {
104
+			$parts = explode('_', $action);
105 105
 
106
-			if ( isset( $parts[0] ) && isset( $parts[1] ) && isset( $parts[2] ) ) {
107
-				$class     = str_replace( '-', '_', $parts[1] );
106
+			if (isset($parts[0]) && isset($parts[1]) && isset($parts[2])) {
107
+				$class     = str_replace('-', '_', $parts[1]);
108 108
 
109 109
 				$class = "\\lasso\\{$parts[0]}\\{$class}";
110
-				$callback  = str_replace( '-', '_', $parts[2] );
110
+				$callback  = str_replace('-', '_', $parts[2]);
111 111
 
112 112
 				return array(
113 113
 					'class'  => $class,
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 *
137 137
 	 * @return mixed
138 138
 	 */
139
-	protected static function route( $action, $callback, $method, $data ) {
140
-		if (  method_exists( $callback, $method ) ) {
141
-			$response = call_user_func( array( $callback, $method ), $data  );
139
+	protected static function route($action, $callback, $method, $data) {
140
+		if (method_exists($callback, $method)) {
141
+			$response = call_user_func(array($callback, $method), $data);
142 142
 
143 143
 			return $response;
144 144
 
@@ -156,29 +156,29 @@  discard block
 block discarded – undo
156 156
 	 * @param array|string $response The response message to send.
157 157
 	 * @param bool|int $code Response code or bool. If is bool, response code will be 200 or 401
158 158
 	 */
159
-	protected static function respond( $response, $code ) {
160
-		if ( true === $code ) {
159
+	protected static function respond($response, $code) {
160
+		if (true === $code) {
161 161
 			$code = 200;
162 162
 		}
163 163
 
164
-		if ( false == $code ) {
164
+		if (false == $code) {
165 165
 			$code = 401;
166 166
 		}
167 167
 
168
-		if ( is_string( $response ) ) {
168
+		if (is_string($response)) {
169 169
 			$data[] = $response;
170
-		}elseif( is_array( $response ) ) {
170
+		}elseif (is_array($response)) {
171 171
 			$data = $response;
172
-		}else{
172
+		} else {
173 173
 			$data[] = $code;
174 174
 		}
175 175
 
176
-		status_header( $code );
176
+		status_header($code);
177 177
 		nocache_headers();
178
-		if ( 200 == $code ) {
179
-			wp_send_json_success( $data );
180
-		}else{
181
-			wp_send_json_error( $data );
178
+		if (200 == $code) {
179
+			wp_send_json_success($data);
180
+		} else {
181
+			wp_send_json_error($data);
182 182
 		}
183 183
 
184 184
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public static function init() {
202 202
 
203
-		if ( ! self::$instance ) {
203
+		if (!self::$instance) {
204 204
 			self::$instance = new self;
205 205
 		}
206 206
 
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '0.9.8.2' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '0.9.8.2');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Lasso requires PHP 5.4 or higher.</p></div>');
44 44
 
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20
-		if ( lasso_user_can('edit_posts') ) {
20
+		if (lasso_user_can('edit_posts')) {
21 21
 
22 22
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
23 23
 
@@ -32,75 +32,75 @@  discard block
 block discarded – undo
32 32
 			// url for json api
33 33
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
34 34
 
35
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
35
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
36 36
 
37
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
37
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
38 38
 
39
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
40
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
41
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
42
-			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
39
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
40
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
41
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
42
+			$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
43 43
 
44 44
 			// post id reference
45
-			$postid 			= get_the_ID();
45
+			$postid = get_the_ID();
46 46
 
47 47
 			$strings = array(
48
-				'save' 				=> __('Save','lasso'),
49
-				'saving' 			=> __('Saving...','lasso'),
50
-				'saved'				=> __('Saved!','lasso'),
51
-				'adding' 			=> __('Adding...','lasso'),
52
-				'added'				=> __('Added!','lasso'),
53
-				'loading' 			=> __('Loading...','lasso'),
54
-				'loadMore'			=> __('Load More','lasso'),
55
-				'noPostsFound'		=> __('No more posts found','lasso'),
56
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
57
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
58
-				'justWrite'			=> __('Just write...','lasso'),
59
-				'chooseImage'		=> __('Choose an image','lasso'),
60
-				'updateImage'		=> __('Update Image','lasso'),
61
-				'insertImage'		=> __('Insert Image','lasso'),
62
-				'selectImage'		=> __('Select Image','lasso'),
63
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
64
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
65
-				'chooseImages'		=> __('Choose images','lasso'),
66
-				'editImage'			=> __('Edit Image','lasso'),
67
-				'addImages'			=> __('Add Images','lasso'),
68
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
69
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
70
-				'useSelectedImages' => __('Use Selected Images','lasso'),
71
-				'publishPost'		=> __('Publish Post?','lasso'),
72
-				'publishYes'		=> __('Yes, publish it!','lasso'),
73
-				'deletePost'		=> __('Trash Post?','lasso'),
74
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
75
-				'warning'			=> __('Oh snap!','laso'),
76
-				'cancelText'		=> __('O.K. got it!','lasso'),
77
-				'missingClass'		=> __('It looks like we are missing the Article CSS class. Lasso will not function correctly without this CSS class.','lasso'),
48
+				'save' 				=> __('Save', 'lasso'),
49
+				'saving' 			=> __('Saving...', 'lasso'),
50
+				'saved'				=> __('Saved!', 'lasso'),
51
+				'adding' 			=> __('Adding...', 'lasso'),
52
+				'added'				=> __('Added!', 'lasso'),
53
+				'loading' 			=> __('Loading...', 'lasso'),
54
+				'loadMore'			=> __('Load More', 'lasso'),
55
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
56
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
57
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
58
+				'justWrite'			=> __('Just write...', 'lasso'),
59
+				'chooseImage'		=> __('Choose an image', 'lasso'),
60
+				'updateImage'		=> __('Update Image', 'lasso'),
61
+				'insertImage'		=> __('Insert Image', 'lasso'),
62
+				'selectImage'		=> __('Select Image', 'lasso'),
63
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
64
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
65
+				'chooseImages'		=> __('Choose images', 'lasso'),
66
+				'editImage'			=> __('Edit Image', 'lasso'),
67
+				'addImages'			=> __('Add Images', 'lasso'),
68
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
69
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
70
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
71
+				'publishPost'		=> __('Publish Post?', 'lasso'),
72
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
73
+				'deletePost'		=> __('Trash Post?', 'lasso'),
74
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
75
+				'warning'			=> __('Oh snap!', 'laso'),
76
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
77
+				'missingClass'		=> __('It looks like we are missing the Article CSS class. Lasso will not function correctly without this CSS class.', 'lasso'),
78 78
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
79
-				'helperText'		=> __('one more letter','lasso'),
79
+				'helperText'		=> __('one more letter', 'lasso'),
80 80
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.')
81 81
 			);
82 82
 
83
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
83
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
84 84
 
85 85
 			$gallery_class = new gallery();
86 86
 			$gallery_nonce_action = $gallery_class->nonce_action;
87
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
87
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
88 88
 
89 89
 			// localized objects
90 90
 			$objects = array(
91
-				'ajaxurl' 			=> esc_url( $api_url ),
91
+				'ajaxurl' 			=> esc_url($api_url),
92 92
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
93 93
 				'article_object'	=> $article_object,
94 94
 				'featImgClass'		=> $featImgClass,
95 95
 				'titleClass'		=> $titleClass,
96 96
 				'strings'			=> $strings,
97
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
98
-				'post_status'		=> get_post_status( $postid ),
97
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
98
+				'post_status'		=> get_post_status($postid),
99 99
 				'postid'			=> $postid,
100 100
 				'permalink'			=> get_permalink(),
101 101
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? 'true' : 'false',
102 102
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? 'true' : 'false',
103
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
103
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
104 104
 				'can_publish_posts'	=> current_user_can('publish_posts'),
105 105
 				'can_publish_pages'	=> current_user_can('publish_pages'),
106 106
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -132,22 +132,22 @@  discard block
 block discarded – undo
132 132
 				'postTags'    		=> lasso_get_objects('tag'),
133 133
 				'noResultsDiv'		=> lasso_editor_empty_results(),
134 134
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
135
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
136
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
137
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
138
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
135
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
136
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
137
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
138
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
139 139
 				'revisionModal' 	=> lasso_editor_revision_modal()
140 140
 			);
141 141
 
142 142
 
143 143
 			// wp api client
144
-			wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
145
-				$settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
146
-				wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
144
+			wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
145
+				$settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
146
+				wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
147 147
 
148
-				$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
149
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
150
-				wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
148
+				$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
149
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
150
+				wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
151 151
 
152 152
 
153 153
 		}
Please login to merge, or discard this patch.
public/includes/components.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -16,68 +16,68 @@  discard block
 block discarded – undo
16 16
 
17 17
 	$array = array(
18 18
 		'quote' => array(
19
-			'name'    => __('Quote','lasso'),
19
+			'name'    => __('Quote', 'lasso'),
20 20
 			'content' => lasso_quote_component(),
21 21
 		),
22 22
 		'image' => array(
23
-			'name'    => __('Image','lasso'),
23
+			'name'    => __('Image', 'lasso'),
24 24
 			'content' => lasso_image_component(),
25 25
 		),
26 26
 		'parallax' => array(
27
-			'name'    => __('Parallax','lasso'),
27
+			'name'    => __('Parallax', 'lasso'),
28 28
 			'content' => lasso_parallax_component(),
29 29
 		),
30 30
 		'audio' => array(
31
-			'name'    => __('Audio','lasso'),
31
+			'name'    => __('Audio', 'lasso'),
32 32
 			'content' => lasso_audio_component(),
33 33
 		),
34 34
 		'content' => array(
35
-			'name'    => __('Content','lasso'),
35
+			'name'    => __('Content', 'lasso'),
36 36
 			'content' => lasso_content_component(),
37 37
 		),
38 38
 		'character' => array(
39
-			'name'    => __('Character','lasso'),
39
+			'name'    => __('Character', 'lasso'),
40 40
 			'content' => lasso_character_component(),
41 41
 		),
42 42
 		'collection' => array(
43
-			'name'    => __('Collection','lasso'),
43
+			'name'    => __('Collection', 'lasso'),
44 44
 			'content' => lasso_collections_component(),
45 45
 		),
46 46
 		'document' => array(
47
-			'name'    => __('Document','lasso'),
47
+			'name'    => __('Document', 'lasso'),
48 48
 			'content' => lasso_document_component(),
49 49
 		),
50 50
 		'gallery' => array(
51
-			'name'    => __('Gallery','lasso'),
51
+			'name'    => __('Gallery', 'lasso'),
52 52
 			'content' => lasso_gallery_component(),
53 53
 		),
54 54
 		'chapter' => array(
55
-			'name'    => __('Chapter','lasso'),
55
+			'name'    => __('Chapter', 'lasso'),
56 56
 			'content' => lasso_heading_component(),
57 57
 		),
58 58
 		'map' => array(
59
-			'name'    => __('Map','lasso'),
59
+			'name'    => __('Map', 'lasso'),
60 60
 			'content' => lasso_map_component(),
61 61
 		),
62 62
 		'timeline_stop' => array(
63
-			'name'    => __('Timeline','lasso'),
63
+			'name'    => __('Timeline', 'lasso'),
64 64
 			'content' => lasso_timeline_component(),
65 65
 		),
66 66
 		'video' => array(
67
-			'name'    => __('Video','lasso'),
67
+			'name'    => __('Video', 'lasso'),
68 68
 			'content' => lasso_video_component(),
69 69
 		),
70 70
 		'wpimg' => array(
71
-			'name'    => __('WordPress Image','lasso'),
71
+			'name'    => __('WordPress Image', 'lasso'),
72 72
 			'content' => lasso_wp_image(),
73 73
 		),
74 74
 		'wpquote' => array(
75
-			'name'    => __('WordPress Quote','lasso'),
75
+			'name'    => __('WordPress Quote', 'lasso'),
76 76
 			'content' => lasso_wp_quote(),
77 77
 		)
78 78
 	);
79 79
 
80
-	return apply_filters( 'lasso_components', $array );
80
+	return apply_filters('lasso_components', $array);
81 81
 }
82 82
 
83 83
 /**
@@ -103,132 +103,132 @@  discard block
 block discarded – undo
103 103
  */
104 104
 
105 105
 // 1
106
-if ( !function_exists( 'lasso_quote_component' ) ):
106
+if (!function_exists('lasso_quote_component')):
107 107
 	function lasso_quote_component() {
108 108
 
109
-		return do_shortcode( '[aesop_quote quote="The Universe is made of stories, not of atoms."]' );
109
+		return do_shortcode('[aesop_quote quote="The Universe is made of stories, not of atoms."]');
110 110
 	}
111 111
 endif;
112 112
 
113 113
 // 2
114
-if ( !function_exists( 'lasso_image_component' ) ):
114
+if (!function_exists('lasso_image_component')):
115 115
 	function lasso_image_component() {
116 116
 
117
-		return do_shortcode( '[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="800px"]' );
117
+		return do_shortcode('[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="800px"]');
118 118
 	}
119 119
 endif;
120 120
 
121 121
 // 3
122
-if ( !function_exists( 'lasso_parallax_component' ) ):
122
+if (!function_exists('lasso_parallax_component')):
123 123
 	function lasso_parallax_component() {
124 124
 
125
-		return do_shortcode( '[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]' );
125
+		return do_shortcode('[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]');
126 126
 	}
127 127
 endif;
128 128
 
129 129
 // 4
130
-if ( !function_exists( 'lasso_audio_component' ) ):
130
+if (!function_exists('lasso_audio_component')):
131 131
 	function lasso_audio_component() {
132 132
 
133
-		return do_shortcode( '[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]' );
133
+		return do_shortcode('[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]');
134 134
 
135 135
 	}
136 136
 endif;
137 137
 
138 138
 // 5
139
-if ( !function_exists( 'lasso_content_component' ) ):
139
+if (!function_exists('lasso_content_component')):
140 140
 	function lasso_content_component() {
141 141
 
142
-		return do_shortcode( '[aesop_content]Start typing here...[/aesop_content]' );
142
+		return do_shortcode('[aesop_content]Start typing here...[/aesop_content]');
143 143
 	}
144 144
 endif;
145 145
 
146 146
 // 6
147
-if ( !function_exists( 'lasso_character_component' ) ):
147
+if (!function_exists('lasso_character_component')):
148 148
 	function lasso_character_component() {
149 149
 
150
-		return do_shortcode( '[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]' );
150
+		return do_shortcode('[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]');
151 151
 
152 152
 	}
153 153
 endif;
154 154
 
155 155
 // 7
156
-if ( !function_exists( 'lasso_collections_component' ) ):
156
+if (!function_exists('lasso_collections_component')):
157 157
 	function lasso_collections_component() {
158 158
 
159
-		return do_shortcode( '[aesop_collection]' );
159
+		return do_shortcode('[aesop_collection]');
160 160
 	}
161 161
 endif;
162 162
 
163 163
 // 8
164
-if ( !function_exists( 'lasso_document_component' ) ):
164
+if (!function_exists('lasso_document_component')):
165 165
 	function lasso_document_component() {
166 166
 
167
-		return do_shortcode( '[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]' );
167
+		return do_shortcode('[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]');
168 168
 
169 169
 	}
170 170
 endif;
171 171
 
172 172
 // 9
173
-if ( !function_exists( 'lasso_gallery_component' ) ):
173
+if (!function_exists('lasso_gallery_component')):
174 174
 	function lasso_gallery_component() {
175 175
 
176
-		return do_shortcode( '[aesop_gallery]' );
176
+		return do_shortcode('[aesop_gallery]');
177 177
 
178 178
 	}
179 179
 endif;
180 180
 
181 181
 // 10
182
-if ( !function_exists( 'lasso_heading_component' ) ):
182
+if (!function_exists('lasso_heading_component')):
183 183
 	function lasso_heading_component() {
184 184
 
185
-		return do_shortcode( '[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]' );
185
+		return do_shortcode('[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]');
186 186
 	}
187 187
 endif;
188 188
 
189 189
 // 11
190
-if ( !function_exists( 'lasso_map_component' ) ):
190
+if (!function_exists('lasso_map_component')):
191 191
 	function lasso_map_component() {
192 192
 
193 193
 		return '<form id="lasso--map-form" class="aesop-component aesop-map-component lasso--map-drag-holder" enctype="multipart/form-data">
194 194
 				'.lasso_map_form_footer().'
195
-				'.do_shortcode( '[aesop_map sticky="off"]' ).'
195
+				'.do_shortcode('[aesop_map sticky="off"]').'
196 196
 			</form>';
197 197
 
198 198
 	}
199 199
 endif;
200 200
 
201 201
 // 12
202
-if ( !function_exists( 'lasso_timeline_component' ) ):
202
+if (!function_exists('lasso_timeline_component')):
203 203
 	function lasso_timeline_component() {
204 204
 
205
-		return do_shortcode( '[aesop_timeline_stop num="Title" title="2014"]' );
205
+		return do_shortcode('[aesop_timeline_stop num="Title" title="2014"]');
206 206
 
207 207
 	}
208 208
 endif;
209 209
 
210 210
 // 13
211
-if ( !function_exists( 'lasso_video_component' ) ):
211
+if (!function_exists('lasso_video_component')):
212 212
 	function lasso_video_component() {
213 213
 
214
-		return do_shortcode( '[aesop_video id="59940289" width="100%" align="center"]' );
214
+		return do_shortcode('[aesop_video id="59940289" width="100%" align="center"]');
215 215
 
216 216
 	}
217 217
 endif;
218 218
 
219 219
 // 14 - since 0.9.1
220
-if ( !function_exists('lasso_wp_image') ):
220
+if (!function_exists('lasso_wp_image')):
221 221
 
222
-	function lasso_wp_image(){
222
+	function lasso_wp_image() {
223 223
 		return '<div data-component-type="wpimg" class="lasso--wpimg__wrap lasso-component"><img class="wp-image-0" src="'.LASSO_URL.'/public/assets/img/empty-img.png"></div>';
224 224
 	}
225 225
 
226 226
 endif;
227 227
 
228 228
 // 15 - since 0.9.2
229
-if ( !function_exists('lasso_wp_quote') ):
229
+if (!function_exists('lasso_wp_quote')):
230 230
 
231
-	function lasso_wp_quote(){
231
+	function lasso_wp_quote() {
232 232
 		return '<blockquote data-component-type="wpquote" class="lasso--wpquote lasso-component"><p>The universe is made of stories.</p></blockquote>';
233 233
 	}
234 234
 
Please login to merge, or discard this patch.
public/includes/editor-modules--gallery.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -11,20 +11,20 @@  discard block
 block discarded – undo
11 11
 
12 12
 	ob_start();
13 13
 
14
-	if ( $galleries ) { ?>
14
+	if ($galleries) { ?>
15 15
 
16 16
 		<div class="ase-gallery-opts ase-gallery-opts--edit-gallery" >
17 17
 			<div class="ase-gallery-opts--single lasso-option">
18 18
 
19
-				<label><?php _e( 'Manage Images', 'lasso' );?>
20
-					<a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e( 'Add Images', 'lasso' );?>"><i class="lasso-icon-pencil"></i></a>
19
+				<label><?php _e('Manage Images', 'lasso'); ?>
20
+					<a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e('Add Images', 'lasso'); ?>"><i class="lasso-icon-pencil"></i></a>
21 21
 
22
-					<?php if ( lasso_user_can( 'publish_posts' ) ): ?>
23
-						<a href="#" id="lasso--gallery__create" class="lasso-editor-tiny-btn" title="<?php esc_attr_e( 'Create Gallery', 'lasso' );?>"><i class="lasso-icon-plus"></i></a>
22
+					<?php if (lasso_user_can('publish_posts')): ?>
23
+						<a href="#" id="lasso--gallery__create" class="lasso-editor-tiny-btn" title="<?php esc_attr_e('Create Gallery', 'lasso'); ?>"><i class="lasso-icon-plus"></i></a>
24 24
 					<?php endif; ?>
25 25
 
26 26
 				</label>
27
-				<small class="lasso-option-desc"><?php _e( 'Rearrange or edit the images in this gallery.', 'lasso' );?></small>
27
+				<small class="lasso-option-desc"><?php _e('Rearrange or edit the images in this gallery.', 'lasso'); ?></small>
28 28
 
29 29
 				<div id="lasso--gallery__images"><span class="lasso-icon-spinner6"></span></div>
30 30
 
@@ -34,20 +34,20 @@  discard block
 block discarded – undo
34 34
 
35 35
 	<?php }
36 36
 
37
-	if ( lasso_user_can( 'publish_posts' ) ): ?>
37
+	if (lasso_user_can('publish_posts')): ?>
38 38
 
39 39
 		<div class="ase-gallery-opts ase-gallery-opts--create-gallery" >
40 40
 
41 41
 			<div class="ase-gallery-opts--single lasso-option">
42 42
 
43
-				<label><?php _e( 'Create a Gallery', 'lasso' );?></label>
44
-				<small class="lasso-option-desc"><?php _e( 'Select images to create a gallery.', 'lasso' );?></small>
43
+				<label><?php _e('Create a Gallery', 'lasso'); ?></label>
44
+				<small class="lasso-option-desc"><?php _e('Select images to create a gallery.', 'lasso'); ?></small>
45 45
 
46
-				<a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e( 'Select Images', 'lasso' );?></a>
46
+				<a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e('Select Images', 'lasso'); ?></a>
47 47
 
48 48
 				<div id="ase-gallery-images"></div>
49 49
 
50
-				<a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr( strtolower( the_title_attribute() ) );?>" id="lasso--gallery__save" href="#"><?php _e( 'Create Gallery', 'lasso' );?></a>
50
+				<a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr(strtolower(the_title_attribute())); ?>" id="lasso--gallery__save" href="#"><?php _e('Create Gallery', 'lasso'); ?></a>
51 51
 
52 52
 			</div>
53 53
 
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
 	<!-- Gallery Layout/Type Chooser -->
59 59
 	<div class="ase-gallery-opts ase-gallery-opts--type" >
60 60
 		<div data-option="gallery-type" class="ase-gallery-opts--single lasso-option">
61
-			<label><?php _e( 'Gallery Type', 'lasso' );?></label>
62
-			<small class="lasso-option-desc"><?php _e( 'Select the type of gallery.', 'lasso' );?></small>
61
+			<label><?php _e('Gallery Type', 'lasso'); ?></label>
62
+			<small class="lasso-option-desc"><?php _e('Select the type of gallery.', 'lasso'); ?></small>
63 63
 			<fieldset>
64
-	      		<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e( 'Grid', 'lasso' );?></label>
65
-	        	<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e( 'Thumbnail', 'lasso' );?></label>
64
+	      		<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e('Grid', 'lasso'); ?></label>
65
+	        	<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e('Thumbnail', 'lasso'); ?></label>
66 66
 				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="sequence">Sequence</label>
67
-				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e( 'Photoset', 'lasso' );?></label>
68
-				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e( 'Parallax', 'lasso' );?></label>
67
+				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e('Photoset', 'lasso'); ?></label>
68
+				<label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e('Parallax', 'lasso'); ?></label>
69 69
 			</fieldset>
70 70
 		</div>
71 71
 	</div>
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
 	<div class="ase-gallery-opts ase-gallery-opts--grid" style="display:none;">
75 75
 
76 76
 		<div data-option="itemwidth" class="ase-gallery-opts--single lasso-option">
77
-			<label for="lasso_grid_gallery_width"><?php _e( 'Grid Item Width', 'lasso' );?></label>
78
-			<small class="lasso-option-desc"><?php _e( 'Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso' );?></small>
77
+			<label for="lasso_grid_gallery_width"><?php _e('Grid Item Width', 'lasso'); ?></label>
78
+			<small class="lasso-option-desc"><?php _e('Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso'); ?></small>
79 79
 			<input type="text_small" class="lasso-generator-attr" name="lasso_grid_gallery_width" value="">
80 80
 		</div>
81 81
 
@@ -85,24 +85,24 @@  discard block
 block discarded – undo
85 85
 	<div class="ase-gallery-opts ase-gallery-opts--thumb" style="display:none;">
86 86
 
87 87
 		<div data-option="transition" class="ase-gallery-opts--single lasso-option">
88
-			<label for="lasso_thumb_gallery_transition"><?php _e( 'Gallery Transition', 'lasso' );?></label>
89
-			<small class="lasso-option-desc"><?php _e( 'Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso' );?></small>
88
+			<label for="lasso_thumb_gallery_transition"><?php _e('Gallery Transition', 'lasso'); ?></label>
89
+			<small class="lasso-option-desc"><?php _e('Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso'); ?></small>
90 90
 		   	<select name="lasso_thumb_gallery_transition" class="lasso-generator-attr">
91
-		      <option value="crossfade"><?php _e( 'Fade', 'lasso' );?></option>
92
-		      <option value="slide"><?php _e( 'Slide', 'lasso' );?></option>
93
-		      <option value="dissolve"><?php _e( 'Dissolve', 'lasso' );?></option>
91
+		      <option value="crossfade"><?php _e('Fade', 'lasso'); ?></option>
92
+		      <option value="slide"><?php _e('Slide', 'lasso'); ?></option>
93
+		      <option value="dissolve"><?php _e('Dissolve', 'lasso'); ?></option>
94 94
 		    </select>
95 95
 		</div>
96 96
 
97 97
 		<div data-option="speed" class="ase-gallery-opts--single lasso-option">
98
-			<label for="lasso_thumb_gallery_transition_speed"><?php _e( 'Gallery Transition Speed', 'lasso' );?></label>
99
-			<small class="lasso-option-desc"><?php _e( 'Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso' );?></small>
98
+			<label for="lasso_thumb_gallery_transition_speed"><?php _e('Gallery Transition Speed', 'lasso'); ?></label>
99
+			<small class="lasso-option-desc"><?php _e('Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso'); ?></small>
100 100
 			<input type="text" class="lasso-generator-attr" name="lasso_thumb_gallery_transition_speed" value="">
101 101
 		</div>
102 102
 
103 103
 		<div data-option="hide-thumbs" class="ase-gallery-opts--single lasso-option">
104 104
 			<input class="lasso-generator-attr" type="checkbox" name="lasso_thumb_gallery_hide_thumbs">
105
-			<label for="lasso_thumb_gallery_hide_thumbs"><?php _e( 'Hide Gallery Thumbnails', 'lasso' );?></label>
105
+			<label for="lasso_thumb_gallery_hide_thumbs"><?php _e('Hide Gallery Thumbnails', 'lasso'); ?></label>
106 106
 		</div>
107 107
 
108 108
 	</div>
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
 	<div class="ase-gallery-opts ase-gallery-opts--photoset" style="display:none;">
112 112
 
113 113
 		<div data-option="pslayout" class="ase-gallery-opts--single lasso-option">
114
-			<label for="lasso-photoset-gallery-layout"><?php _e( 'Gallery Layout', 'lasso' );?></label>
115
-			<small class="lasso-option-desc"><?php _e( 'Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso' );?></small>
114
+			<label for="lasso-photoset-gallery-layout"><?php _e('Gallery Layout', 'lasso'); ?></label>
115
+			<small class="lasso-option-desc"><?php _e('Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso'); ?></small>
116 116
 			<input type="text" class="lasso-generator-attr" name="lasso_photoset_gallery_layout" value="">
117 117
 		</div>
118 118
 
119 119
 		<div data-option="pslightbox" class="ase-gallery-opts--single lasso-option">
120 120
 			<input type="checkbox" class="lasso-generator-attr" name="lasso_photoset_gallery_lightbox">
121
-			<label for="lasso_photoset_gallery_lightbox"><?php _e( 'Enable Lightbox', 'lasso' );?></label>
121
+			<label for="lasso_photoset_gallery_lightbox"><?php _e('Enable Lightbox', 'lasso'); ?></label>
122 122
 		</div>
123 123
 
124 124
 	</div>
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
 	<div class="ase-gallery-opts ase-gallery-opts--global">
128 128
 
129 129
 		<div data-option="width" class="ase-gallery-opts--single lasso-option">
130
-			<label for="lasso_gallery_width"><?php _e( 'Main Gallery Width', 'lasso' );?></label>
131
-			<small class="lasso-option-desc"><?php _e( 'Adjust the overall width of the grid/thumbnail gallery. Acceptable values include 500px or 50%.', 'lasso' );?></small>
130
+			<label for="lasso_gallery_width"><?php _e('Main Gallery Width', 'lasso'); ?></label>
131
+			<small class="lasso-option-desc"><?php _e('Adjust the overall width of the grid/thumbnail gallery. Acceptable values include 500px or 50%.', 'lasso'); ?></small>
132 132
 			<input type="text_small" class="lasso-generator-attr" name="lasso_gallery_width" value="">
133 133
 		</div>
134 134
 		<div data-option="caption" class="ase-gallery-opts--single lasso-option">
135
-			<label for="lasso_gallery_caption"><?php _e( 'Gallery Caption', 'lasso' );?></label>
136
-			<small class="lasso-option-desc"><?php _e( 'Add an optional caption for the gallery.', 'lasso' );?></small>
135
+			<label for="lasso_gallery_caption"><?php _e('Gallery Caption', 'lasso'); ?></label>
136
+			<small class="lasso-option-desc"><?php _e('Add an optional caption for the gallery.', 'lasso'); ?></small>
137 137
 			<textarea name="lasso_gallery_caption" class="lasso-generator-attr"></textarea>
138 138
 		</div>
139 139
 
Please login to merge, or discard this patch.