equal
deleted
inserted
replaced
7 */ |
7 */ |
8 |
8 |
9 define( 'IFRAME_REQUEST', true ); |
9 define( 'IFRAME_REQUEST', true ); |
10 |
10 |
11 /** WordPress Administration Bootstrap */ |
11 /** WordPress Administration Bootstrap */ |
12 require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 require_once __DIR__ . '/admin.php'; |
13 |
13 |
14 function wp_load_press_this() { |
14 function wp_load_press_this() { |
15 $plugin_slug = 'press-this'; |
15 $plugin_slug = 'press-this'; |
16 $plugin_file = 'press-this/press-this-plugin.php'; |
16 $plugin_file = 'press-this/press-this-plugin.php'; |
17 |
17 |
20 __( 'Sorry, you are not allowed to create posts as this user.' ), |
20 __( 'Sorry, you are not allowed to create posts as this user.' ), |
21 __( 'You need a higher level of permission.' ), |
21 __( 'You need a higher level of permission.' ), |
22 403 |
22 403 |
23 ); |
23 ); |
24 } elseif ( is_plugin_active( $plugin_file ) ) { |
24 } elseif ( is_plugin_active( $plugin_file ) ) { |
25 include( WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php' ); |
25 include WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php'; |
26 $wp_press_this = new WP_Press_This_Plugin(); |
26 $wp_press_this = new WP_Press_This_Plugin(); |
27 $wp_press_this->html(); |
27 $wp_press_this->html(); |
28 } elseif ( current_user_can( 'activate_plugins' ) ) { |
28 } elseif ( current_user_can( 'activate_plugins' ) ) { |
29 if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) { |
29 if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) { |
30 $url = wp_nonce_url( |
30 $url = wp_nonce_url( |
62 esc_attr( $plugin_slug ), |
62 esc_attr( $plugin_slug ), |
63 __( 'Install Now' ) |
63 __( 'Install Now' ) |
64 ); |
64 ); |
65 } else { |
65 } else { |
66 $action = sprintf( |
66 $action = sprintf( |
67 /* translators: URL to wp-admin/press-this.php */ |
67 /* translators: %s: URL to Press This bookmarklet on the main site. */ |
68 __( 'Press This is not installed. Please install Press This from <a href="%s">the main site</a>.' ), |
68 __( 'Press This is not installed. Please install Press This from <a href="%s">the main site</a>.' ), |
69 get_admin_url( get_current_network_id(), 'press-this.php' ) |
69 get_admin_url( get_current_network_id(), 'press-this.php' ) |
70 ); |
70 ); |
71 } |
71 } |
72 } |
72 } |