imgix.php ➔ imgix_plugin_admin_action_links()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 2
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * WordPress plugin for imgix service.
4
 *
5
 * @package imgix
6
 * @author wladston
7
 * @license BSD-2
8
 *
9
 * @wordpress-plugin
10
 *
11
 * Plugin Name: Images via imgix
12
 * Plugin URI:  https://github.com/imgix-wordpress/images-via-imgix
13
 * Description: A WordPress plugin to automatically use your existing (and future) WordPress images from <a href="http://www.imgix.com" target="_blank">imgix</a> for smaller, faster, and better looking images. <a href="https://github.com/imgix-wordpress/images-via-imgix" target="_blank">Learn more</a>.
14
 * Version:     1.3.2
15
 * Author:      wladston
16
 * Author URI:  http://github.com/imgix-wordpress
17
 */
18
19
include( 'includes/compability.php' );
20
include( 'includes/class-images-via-imgix.php' );
21
include( 'includes/options-page.php' );
22
23
function imgix_plugin_admin_action_links( $links, $file ) {
24
	if ( $file === plugin_basename( __FILE__ ) ) {
25
		$settings_link = '<a href="options-general.php?page=imgix-options">Settings</a>';
26
		array_unshift( $links, $settings_link );
27
	}
28
29
	return $links;
30
}
31
32
add_filter( 'plugin_action_links', 'imgix_plugin_admin_action_links', 10, 2 );
33