|
@@ 241-258 (lines=18) @@
|
| 238 |
|
$status = install_plugin_install_status( $plugin ); |
| 239 |
|
switch ( $status['status'] ) { |
| 240 |
|
case 'install': |
| 241 |
|
if ( $status['url'] ) { |
| 242 |
|
if ( $compatible_php && $compatible_wp ) { |
| 243 |
|
$action_links[] = sprintf( |
| 244 |
|
'<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>', |
| 245 |
|
esc_attr( $plugin['slug'] ), |
| 246 |
|
esc_url( $status['url'] ), |
| 247 |
|
/* translators: %s: plugin name and version */ |
| 248 |
|
esc_attr( sprintf( __( 'Install %s now' ), $name ) ), |
| 249 |
|
esc_attr( $name ), |
| 250 |
|
__( 'Install Now' ) |
| 251 |
|
); |
| 252 |
|
} else { |
| 253 |
|
$action_links[] = sprintf( |
| 254 |
|
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>', |
| 255 |
|
_x( 'Cannot Install', 'plugin' ) |
| 256 |
|
); |
| 257 |
|
} |
| 258 |
|
} |
| 259 |
|
break; |
| 260 |
|
|
| 261 |
|
case 'update_available': |
|
@@ 262-273 (lines=12) @@
|
| 259 |
|
break; |
| 260 |
|
|
| 261 |
|
case 'update_available': |
| 262 |
|
if ( $status['url'] ) { |
| 263 |
|
$action_links[] = sprintf( |
| 264 |
|
'<a class="update-now button aria-button-if-js" data-plugin="%s" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>', |
| 265 |
|
esc_attr( $status['file'] ), |
| 266 |
|
esc_attr( $plugin['slug'] ), |
| 267 |
|
esc_url( $status['url'] ), |
| 268 |
|
/* translators: %s: plugin name and version */ |
| 269 |
|
esc_attr( sprintf( __( 'Update %s now' ), $name ) ), |
| 270 |
|
esc_attr( $name ), |
| 271 |
|
__( 'Update Now' ) |
| 272 |
|
); |
| 273 |
|
} |
| 274 |
|
break; |
| 275 |
|
|
| 276 |
|
case 'latest_installed': |