C:\xampp\htdocs\landing\wp-content\plugins\imagify\inc\3rd-party\nextgen-gallery\classes\Main.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
namespace Imagify\ThirdParty\NGG;

defined'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
 * Imagify NextGen Gallery class.
 *
 * @since  1.5
 * @author Jonathan Buttigieg
 */
class Main {
    use \
Imagify\Traits\InstanceGetterTrait;

    
/**
     * Class version.
     *
     * @var string
     */
    
const VERSION '1.1';

    
/**
     * The constructor.
     *
     * @since  1.5
     * @since  1.6.5 Doesn't launch the hooks anymore.
     * @since  1.9 Visibility set to public.
     * @access public
     * @author Jonathan Buttigieg
     */
    
public function __construct() {}

    
/**
     * Launch the hooks.
     *
     * @since  1.6.5
     * @access public
     * @author Grégory Viguier
     */
    
public function init() {
        static 
$done false;

        if ( 
$done ) {
            return;
        }
        
$done true;

        
add_filter'imagify_register_context',   [ $this'register_context' ] );
        
add_filter'imagify_context_class_name', [ $this'add_context_class_name' ], 10);
        
add_filter'imagify_process_class_name', [ $this'add_process_class_name' ], 10);
        
add_filter'imagify_bulk_class_name',    [ $this'add_bulk_class_name' ], 10);
        
add_action'init', [ $this'add_mixin' ] );
    }

    
/**
     * Register the context used for NGG.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  array $contexts An array of context names.
     * @return array
     */
    
public function register_context$contexts ) {
        
$contexts[] = 'ngg';
        return 
$contexts;
    }

    
/**
     * Filter the name of the class to use to define a context.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  int    $class_name The class name.
     * @param  string $context    The context name.
     * @return string
     */
    
public function add_context_class_name$class_name$context ) {
        if ( 
'ngg' === $context ) {
            return 
'\\Imagify\\ThirdParty\\NGG\\Context\\NGG';
        }

        return 
$class_name;
    }

    
/**
     * Filter the name of the class to use for the optimization.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  int    $class_name The class name.
     * @param  string $context    The context name.
     * @return string
     */
    
public function add_process_class_name$class_name$context ) {
        if ( 
'ngg' === $context ) {
            return 
'\\Imagify\\ThirdParty\\NGG\\Optimization\\Process\\NGG';
        }

        return 
$class_name;
    }

    
/**
     * Filter the name of the class to use for the bulk optimization.
     *
     * @since  1.9
     * @access public
     * @author Grégory Viguier
     *
     * @param  int    $class_name The class name.
     * @param  string $context    The context name.
     * @return string
     */
    
public function add_bulk_class_name$class_name$context ) {
        if ( 
'ngg' === $context ) {
            return 
'\\Imagify\\ThirdParty\\NGG\\Bulk\\NGG';
        }

        return 
$class_name;
    }

    
/**
     * Add custom NGG mixin to override its functions.
     *
     * @since  1.5
     * @access public
     * @author Jonathan Buttigieg
     */
    
public function add_mixin() {
        \
C_Gallery_Storage::get_instance()->get_wrapped_instance()->add_mixin'\\Imagify\\ThirdParty\\NGG\\NGGStorage' );
    }
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586