PluginProbe
Slider Ultimate / 2.2.10
Slider Ultimate v2.2.10
2.2.10 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 All 54 releases
ultimate-slider / lib / simple-admin-pages / simple-admin-pages.php
simple-admin-pages.php
53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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