@@ -64,7 +64,7 @@ |
||
64 | 64 | * @uses api_request() |
65 | 65 | * |
66 | 66 | * @param array $_transient_data Update array build by WordPress. |
67 | - * @return array Modified update array with custom plugin data. |
|
67 | + * @return stdClass Modified update array with custom plugin data. |
|
68 | 68 | */ |
69 | 69 | function check_update( $_transient_data ) { |
70 | 70 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Loads the class file for a given class name. |
63 | 63 | * |
64 | 64 | * @param string $class The fully-qualified class name. |
65 | - * @return mixed The mapped file name on success, or boolean false on |
|
65 | + * @return string|false The mapped file name on success, or boolean false on |
|
66 | 66 | * failure. |
67 | 67 | */ |
68 | 68 | public function loadClass($class) { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * |
100 | 100 | * @param string $prefix The namespace prefix. |
101 | 101 | * @param string $relative_class The relative class name. |
102 | - * @return mixed Boolean false if no mapped file can be loaded, or the |
|
102 | + * @return false|string Boolean false if no mapped file can be loaded, or the |
|
103 | 103 | * name of the mapped file that was loaded. |
104 | 104 | */ |
105 | 105 | protected function loadMappedFile($prefix, $relative_class) { |
@@ -115,8 +115,8 @@ |
||
115 | 115 | // replace namespace separators with directory separators |
116 | 116 | // in the relative class name, append with .php |
117 | 117 | $file = $base_dir |
118 | - . str_replace('\\', '/', $relative_class) |
|
119 | - . '.php'; |
|
118 | + . str_replace('\\', '/', $relative_class) |
|
119 | + . '.php'; |
|
120 | 120 | |
121 | 121 | // if the mapped file exists, require it |
122 | 122 | if ($this->requireFile($file)) { |
@@ -49,7 +49,6 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @param string $action The AJAX action we are processing. |
51 | 51 | * @param string|object $callback_class The class to use for the callback. Either the name of the class or an instance of that class. |
52 | - * @param string $method The name of the callback method. |
|
53 | 52 | |
54 | 53 | */ |
55 | 54 | public function __construct( $action, $callback_class) { |
@@ -123,7 +122,7 @@ discard block |
||
123 | 122 | * |
124 | 123 | * @access protected |
125 | 124 | * |
126 | - * @return bool |
|
125 | + * @return boolean|null |
|
127 | 126 | */ |
128 | 127 | protected function if_implements() { |
129 | 128 |
@@ -81,7 +81,6 @@ |
||
81 | 81 | * |
82 | 82 | * @param string $action The AJAX action we are processing. |
83 | 83 | * @param string|object $callback The class to use for the callback. Either the name of the class or an instance of that class. |
84 | - |
|
85 | 84 | * |
86 | 85 | * @return \lasso\internal_api\auth |
87 | 86 | */ |
@@ -97,6 +97,7 @@ |
||
97 | 97 | * |
98 | 98 | * @access protected |
99 | 99 | * |
100 | + * @param string $action |
|
100 | 101 | * @return array |
101 | 102 | */ |
102 | 103 | protected static function find_callback( $action ) { |
@@ -81,7 +81,6 @@ |
||
81 | 81 | * |
82 | 82 | * @param string $action The AJAX action we are processing. |
83 | 83 | * @param string|object $callback The class to use for the callback. Either the name of the class or an instance of that class. |
84 | - |
|
85 | 84 | * |
86 | 85 | * @return \lasso\internal_api\auth |
87 | 86 | */ |
@@ -66,7 +66,7 @@ |
||
66 | 66 | * |
67 | 67 | * @since 0.0.1 |
68 | 68 | * |
69 | - * @return Plugin slug variable. |
|
69 | + * @return string slug variable. |
|
70 | 70 | */ |
71 | 71 | public function get_plugin_slug() { |
72 | 72 | return $this->plugin_slug; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | ); |
265 | 265 | foreach ($_POST as $key => $value) { |
266 | 266 | if ($key !="code" && $key !="action") { |
267 | - //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
267 | + //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
268 | 268 | $atts[$key] = $value; |
269 | 269 | } |
270 | 270 | } |
@@ -274,37 +274,37 @@ discard block |
||
274 | 274 | }*/ |
275 | 275 | |
276 | 276 | if ($code == "aesop_image") { |
277 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
278 | - echo aesop_image_shortcode($atts); |
|
277 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
278 | + echo aesop_image_shortcode($atts); |
|
279 | 279 | } |
280 | 280 | if ($code == "aesop_quote") { |
281 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
282 | - echo aesop_quote_shortcode($atts); |
|
281 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
282 | + echo aesop_quote_shortcode($atts); |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | if ($code == "aesop_parallax") { |
286 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
287 | - echo aesop_parallax_shortcode($atts); |
|
286 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
287 | + echo aesop_parallax_shortcode($atts); |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | if ($code == "aesop_character") { |
291 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
292 | - echo aesop_character_shortcode($atts); |
|
291 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
292 | + echo aesop_character_shortcode($atts); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | if ($code == "aesop_collection") { |
296 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
297 | - echo aesop_collection_shortcode($atts); |
|
296 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
297 | + echo aesop_collection_shortcode($atts); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | if ($code == "aesop_chapter") { |
301 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
302 | - echo aesop_chapter_shortcode($atts); |
|
301 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
302 | + echo aesop_chapter_shortcode($atts); |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | if ($code == "aesop_gallery") { |
306 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
307 | - echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
306 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
307 | + echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | exit; |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
130 | - * Adds an admin notice reminding the user if their license key has not been saved |
|
131 | - * |
|
132 | - * @since 0.9.7 |
|
133 | - * @todo make dismissible |
|
134 | - */ |
|
130 | + * Adds an admin notice reminding the user if their license key has not been saved |
|
131 | + * |
|
132 | + * @since 0.9.7 |
|
133 | + * @todo make dismissible |
|
134 | + */ |
|
135 | 135 | public function license_nag(){ |
136 | 136 | |
137 | 137 | $screen = get_current_screen(); |
@@ -152,26 +152,26 @@ discard block |
||
152 | 152 | |
153 | 153 | if ( empty( $license ) ) { |
154 | 154 | |
155 | - printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link ); |
|
155 | + printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_empty, $license_link, $dismiss_link ); |
|
156 | 156 | |
157 | - } else if ( 'invalid' == $status ){ // license key entered wrong or something |
|
157 | + } else if ( 'invalid' == $status ){ // license key entered wrong or something |
|
158 | 158 | |
159 | 159 | printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_invalid, $license_link , $dismiss_link ); |
160 | 160 | |
161 | - } else if ( empty( $status ) ){ // license key saved but not activated |
|
161 | + } else if ( empty( $status ) ){ // license key saved but not activated |
|
162 | 162 | |
163 | 163 | printf('<div class="lasso-notice error" style="position:relative;"><p>%s %s</p>%s</div>', $message_inactive, $license_link, $dismiss_link ); |
164 | 164 | |
165 | - } |
|
165 | + } |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
171 | - * Process hiding the dimiss |
|
172 | - * |
|
173 | - * @since 0.9.7 |
|
174 | - */ |
|
171 | + * Process hiding the dimiss |
|
172 | + * |
|
173 | + * @since 0.9.7 |
|
174 | + */ |
|
175 | 175 | public function dismiss_nag() { |
176 | 176 | |
177 | 177 | if ( isset( $_GET['lasso-notice'] ) && 'dismiss' == $_GET['lasso-notice'] && current_user_can('manage_options') ) { |
@@ -197,53 +197,53 @@ |
||
197 | 197 | */ |
198 | 198 | function required_plugins() { |
199 | 199 | |
200 | - $plugins = array( |
|
201 | - |
|
202 | - array( |
|
203 | - 'name' => __('WP REST API','lasso'), |
|
204 | - 'slug' => 'json-rest-api', |
|
205 | - 'required' => true, |
|
206 | - ), |
|
207 | - |
|
208 | - array( |
|
209 | - 'name' => __('Aesop Story Engine','lasso'), |
|
210 | - 'slug' => 'aesop-story-engine', |
|
211 | - 'required' => false, |
|
212 | - ), |
|
213 | - |
|
214 | - ); |
|
215 | - |
|
216 | - $config = array( |
|
217 | - 'default_path' => '', // Default absolute path to pre-packaged plugins. |
|
218 | - 'menu' => 'lasso-install-plugins', // Menu slug. |
|
219 | - 'has_notices' => true, // Show admin notices or not. |
|
220 | - 'dismissable' => true, // If false, a user cannot dismiss the nag message. |
|
221 | - 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. |
|
222 | - 'is_automatic' => false, // Automatically activate plugins after installation or not. |
|
223 | - 'message' => '', // Message to output right before the plugins table. |
|
224 | - 'strings' => array( |
|
225 | - 'page_title' => __( 'Install Required Plugins', 'lasso' ), |
|
226 | - 'menu_title' => __( 'Install Plugins', 'lasso' ), |
|
227 | - 'installing' => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name. |
|
228 | - 'oops' => __( 'Something went wrong with the plugin API.', 'lasso' ), |
|
229 | - 'notice_can_install_required' => _n_noop( 'This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.' ), // %1$s = plugin name(s). |
|
230 | - 'notice_can_install_recommended' => _n_noop( 'This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.' ), // %1$s = plugin name(s). |
|
231 | - 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s). |
|
232 | - 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s). |
|
233 | - 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s). |
|
234 | - 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s). |
|
235 | - 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.' ), // %1$s = plugin name(s). |
|
236 | - 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s). |
|
237 | - 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), |
|
238 | - 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ), |
|
239 | - 'return' => __( 'Return to Required Plugins Installer', 'lasso' ), |
|
240 | - 'plugin_activated' => __( 'Plugin activated successfully.', 'lasso' ), |
|
241 | - 'complete' => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link. |
|
242 | - 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. |
|
243 | - ) |
|
244 | - ); |
|
245 | - |
|
246 | - tgmpa( $plugins, $config ); |
|
200 | + $plugins = array( |
|
201 | + |
|
202 | + array( |
|
203 | + 'name' => __('WP REST API','lasso'), |
|
204 | + 'slug' => 'json-rest-api', |
|
205 | + 'required' => true, |
|
206 | + ), |
|
207 | + |
|
208 | + array( |
|
209 | + 'name' => __('Aesop Story Engine','lasso'), |
|
210 | + 'slug' => 'aesop-story-engine', |
|
211 | + 'required' => false, |
|
212 | + ), |
|
213 | + |
|
214 | + ); |
|
215 | + |
|
216 | + $config = array( |
|
217 | + 'default_path' => '', // Default absolute path to pre-packaged plugins. |
|
218 | + 'menu' => 'lasso-install-plugins', // Menu slug. |
|
219 | + 'has_notices' => true, // Show admin notices or not. |
|
220 | + 'dismissable' => true, // If false, a user cannot dismiss the nag message. |
|
221 | + 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. |
|
222 | + 'is_automatic' => false, // Automatically activate plugins after installation or not. |
|
223 | + 'message' => '', // Message to output right before the plugins table. |
|
224 | + 'strings' => array( |
|
225 | + 'page_title' => __( 'Install Required Plugins', 'lasso' ), |
|
226 | + 'menu_title' => __( 'Install Plugins', 'lasso' ), |
|
227 | + 'installing' => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name. |
|
228 | + 'oops' => __( 'Something went wrong with the plugin API.', 'lasso' ), |
|
229 | + 'notice_can_install_required' => _n_noop( 'This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.' ), // %1$s = plugin name(s). |
|
230 | + 'notice_can_install_recommended' => _n_noop( 'This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.' ), // %1$s = plugin name(s). |
|
231 | + 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s). |
|
232 | + 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s). |
|
233 | + 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s). |
|
234 | + 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s). |
|
235 | + 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.' ), // %1$s = plugin name(s). |
|
236 | + 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s). |
|
237 | + 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), |
|
238 | + 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ), |
|
239 | + 'return' => __( 'Return to Required Plugins Installer', 'lasso' ), |
|
240 | + 'plugin_activated' => __( 'Plugin activated successfully.', 'lasso' ), |
|
241 | + 'complete' => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link. |
|
242 | + 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. |
|
243 | + ) |
|
244 | + ); |
|
245 | + |
|
246 | + tgmpa( $plugins, $config ); |
|
247 | 247 | |
248 | 248 | } |
249 | 249 | } |
@@ -118,7 +118,7 @@ |
||
118 | 118 | * @since 0.9.3 |
119 | 119 | * |
120 | 120 | * @param int $postid The current postid |
121 | - * @param string|bool $value The term slug, or a comma separated list of slugs. Or false to remove all terms set for post. |
|
121 | + * @param string|bool $value The term slug, or a comma separated list of slugs. Or false to remove all terms set for post. |
|
122 | 122 | * @param string $taxonomy The name of the taxonomy to which the term belongs. |
123 | 123 | * |
124 | 124 | * @return bool True if update was successful, false if not. |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | /** |
19 | - * Draw the modal used to house the walk through |
|
20 | - * @since 0.6 |
|
21 | - */ |
|
19 | + * Draw the modal used to house the walk through |
|
20 | + * @since 0.6 |
|
21 | + */ |
|
22 | 22 | public function draw_tour() { |
23 | 23 | |
24 | 24 | $tour_hidden = get_user_meta( get_current_user_ID(), 'lasso_hide_tour', true ); |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
79 | - * Draw the inner slides for the welcome walkthrough |
|
80 | - * @since 0.6 |
|
81 | - */ |
|
79 | + * Draw the inner slides for the welcome walkthrough |
|
80 | + * @since 0.6 |
|
81 | + */ |
|
82 | 82 | public function tour_slides() { ?> |
83 | 83 | |
84 | 84 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |