1 | <?php |
||
32 | class Auto_Load_Next_Post { |
||
33 | |||
34 | /** |
||
35 | * @var Auto_Load_Next_Post - The single instance of the class |
||
36 | * |
||
37 | * @access protected |
||
38 | * @static |
||
39 | * @since 1.0.0 |
||
40 | */ |
||
41 | protected static $_instance = null; |
||
42 | |||
43 | /** |
||
44 | * Main Auto Load Next Post Instance |
||
45 | * |
||
46 | * Ensures only one instance of Auto Load Next Post is loaded or can be loaded. |
||
47 | * |
||
48 | * @access public |
||
49 | * @since 1.0.0 |
||
50 | * @static |
||
51 | * @see Auto_Load_Next_Post() |
||
52 | * @return Auto_Load_Next_Post Single instance. |
||
53 | */ |
||
54 | public static function instance() { |
||
62 | |||
63 | /** |
||
64 | * Cloning is forbidden. |
||
65 | * |
||
66 | * @access public |
||
67 | * @since 1.0.0 |
||
68 | * @return void |
||
69 | */ |
||
70 | public function __clone() { |
||
74 | |||
75 | /** |
||
76 | * Unserializing instances of this class is forbidden. |
||
77 | * |
||
78 | * @access public |
||
79 | * @since 1.0.0 |
||
80 | * @return void |
||
81 | */ |
||
82 | public function __wakeup() { |
||
85 | |||
86 | /** |
||
87 | * Auto_Load_Next_Post Constructor |
||
88 | * |
||
89 | * @access public |
||
90 | * @since 1.0.0 |
||
91 | * @return Auto_Load_Next_Post |
||
|
|||
92 | */ |
||
93 | public function __construct() { |
||
107 | |||
108 | /** |
||
109 | * Auto-load Auto Load Next Post classes on demand to reduce memory consumption. |
||
110 | * |
||
111 | * @since 1.0.0 |
||
112 | * @access public |
||
113 | * @param mixed $class |
||
114 | * @return void |
||
115 | */ |
||
116 | public function autoload( $class ) { |
||
131 | |||
132 | /** |
||
133 | * Setup Constants |
||
134 | * |
||
135 | * @since 1.4.3 |
||
136 | * @version 1.4.10 |
||
137 | * @access private |
||
138 | */ |
||
139 | private function setup_constants() { |
||
156 | |||
157 | /** |
||
158 | * Define constant if not already set. |
||
159 | * |
||
160 | * @param string $name |
||
161 | * @param string|bool $value |
||
162 | * @access private |
||
163 | * @since 1.4.3 |
||
164 | */ |
||
165 | private function define( $name, $value ) { |
||
170 | |||
171 | /*-----------------------------------------------------------------------------------*/ |
||
172 | /* Load Files */ |
||
173 | /*-----------------------------------------------------------------------------------*/ |
||
174 | |||
175 | /** |
||
176 | * Include required core files used in admin and on the frontend. |
||
177 | * |
||
178 | * @access public |
||
179 | * @since 1.0.0 |
||
180 | * @version 1.4.10 |
||
181 | * @return void |
||
182 | */ |
||
183 | public function includes() { |
||
199 | |||
200 | /** |
||
201 | * Make the plugin translation ready. |
||
202 | * |
||
203 | * Translations should be added in the WordPress language directory: |
||
204 | * - WP_LANG_DIR/plugins/auto-load-next-post-LOCALE.mo |
||
205 | * |
||
206 | * @access public |
||
207 | * @since 1.0.0 |
||
208 | * @version 1.4.10 |
||
209 | * @return void |
||
210 | */ |
||
211 | public function load_plugin_textdomain() { |
||
214 | |||
215 | /** |
||
216 | * Registers and enqueues stylesheets and javascripts for the front of the site. |
||
217 | * |
||
218 | * @access public |
||
219 | * @since 1.3.2 |
||
220 | * @version 1.4.12 |
||
221 | */ |
||
222 | public function alnp_scripts() { |
||
251 | |||
252 | /** |
||
253 | * Helper function for registering and enqueueing scripts and styles. |
||
254 | * |
||
255 | * @access public |
||
256 | * @since 1.0.0 |
||
257 | * @static |
||
258 | * @param string $name The ID to register with WordPress. |
||
259 | * @param string $file_path The path to the actual file. |
||
260 | * @param bool $is_script Optional, argument for if the incoming file_path is a JavaScript source file. |
||
261 | * @param array $support Optional, for requiring other javascripts for the source file you are calling. |
||
262 | * @param string $version Optional, can match the version of the plugin or version of the source file. |
||
263 | * @global string $wp_version |
||
264 | */ |
||
265 | public static function load_file( $name, $file_path, $is_script = false, $support = array(), $version = '' ) { |
||
281 | |||
282 | } // END Auto_Load_Next_Post() |
||
283 | |||
312 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.