PluginProbe ʕ •ᴥ•ʔ
Slider Ultimate / 2.0.8
Slider Ultimate v2.0.8
trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9
ultimate-slider / lib / simple-admin-pages / simple-admin-pages.php
ultimate-slider / lib / simple-admin-pages Last commit date
classes 4 years ago css 4 years ago img 4 years ago js 4 years ago lib 4 years ago .gitignore 4 years ago README.md 4 years ago simple-admin-pages.php 4 years ago
simple-admin-pages.php
53 lines
1 <?php
2
3 /**
4 * Simple Admin Pages
5 *
6 * This is a very small utility library to easily add new admin pages to the
7 * WordPress admin interface. It simply collects WordPress' useful Settings API
8 * into reuseable classes.
9 *
10 * Created by Nate Wright
11 *
12 *
13 * @since 1.0
14 * @package Simple Admin Pages
15 * @license GNU GPL 2 or later
16 */
17
18 /**
19 * Always load the library files attached to this copy of SAP
20 *
21 * This fixes a compatibility bug if two versions of the library are being
22 * loaded by different plugins/themes. However, versions prior to 2.0 do not
23 * include this and can cause compatibility issues.
24 */
25 require_once( 'classes/Library.class.php' );
26
27 /**
28 * Initialize the appropriate version of the libary.
29 *
30 * This function should remain backwards compatible at all times, so that the
31 * initialization function from version 1.0 will still be able to initialize
32 * the library appropriately for version 2.0. This way, if two plugins exist
33 * with different versions, the plugin creator will still be able to initialize
34 * their library.
35 *
36 * @since 1.0
37 */
38 if ( !function_exists( 'sap_initialize_library' ) ) {
39
40 function sap_initialize_library( $args = array() ) {
41
42 // Exit early if no version was provided
43 if ( !isset( $args['version'] ) ) {
44 return null;
45 }
46
47 $lib_class_name = 'sapLibrary_' . str_replace( '.', '_', $args['version'] );
48
49 return new $lib_class_name( $args );
50 }
51
52 }
53