1 | <?php |
||
30 | class Auto_Load_Next_Post { |
||
31 | |||
32 | /** |
||
33 | * @var Auto_Load_Next_Post - The single instance of the class |
||
34 | * |
||
35 | * @access protected |
||
36 | * @static |
||
37 | * @since 1.0.0 |
||
38 | */ |
||
39 | protected static $_instance = null; |
||
40 | |||
41 | /** |
||
42 | * Plugin Version |
||
43 | * |
||
44 | * @access public |
||
45 | * @static |
||
46 | * @since 1.5.0 |
||
47 | */ |
||
48 | public static $version = '1.5.7'; |
||
49 | |||
50 | /** |
||
51 | * Main Auto Load Next Post Instance |
||
52 | * |
||
53 | * Ensures only one instance of Auto Load Next Post is loaded or can be loaded. |
||
54 | * |
||
55 | * @access public |
||
56 | * @since 1.0.0 |
||
57 | * @static |
||
58 | * @see Auto_Load_Next_Post() |
||
59 | * @return Auto_Load_Next_Post Single instance. |
||
60 | */ |
||
61 | public static function instance() { |
||
67 | |||
68 | /** |
||
69 | * Cloning is forbidden. |
||
70 | * |
||
71 | * @access public |
||
72 | * @since 1.0.0 |
||
73 | * @return void |
||
74 | */ |
||
75 | public function __clone() { |
||
79 | |||
80 | /** |
||
81 | * Unserializing instances of this class is forbidden. |
||
82 | * |
||
83 | * @access public |
||
84 | * @since 1.0.0 |
||
85 | * @return void |
||
86 | */ |
||
87 | public function __wakeup() { |
||
90 | |||
91 | /** |
||
92 | * Auto_Load_Next_Post Constructor |
||
93 | * |
||
94 | * @access public |
||
95 | * @since 1.0.0 |
||
96 | * @version 1.5.0 |
||
97 | * @return Auto_Load_Next_Post |
||
|
|||
98 | */ |
||
99 | public function __construct() { |
||
109 | |||
110 | /** |
||
111 | * Hooks into action hooks. |
||
112 | * |
||
113 | * @access public |
||
114 | * @since 1.5.0 |
||
115 | */ |
||
116 | public function init_hooks() { |
||
123 | |||
124 | /** |
||
125 | * Setup Constants |
||
126 | * |
||
127 | * @since 1.4.3 |
||
128 | * @version 1.5.5 |
||
129 | * @access private |
||
130 | */ |
||
131 | private function setup_constants() { |
||
152 | |||
153 | /** |
||
154 | * Define constant if not already set. |
||
155 | * |
||
156 | * @param string $name |
||
157 | * @param string|bool $value |
||
158 | * @access private |
||
159 | * @since 1.4.3 |
||
160 | */ |
||
161 | private function define( $name, $value ) { |
||
166 | |||
167 | /** |
||
168 | * Include required core files used in admin and on the frontend. |
||
169 | * |
||
170 | * @access public |
||
171 | * @since 1.0.0 |
||
172 | * @version 1.5.5 |
||
173 | * @return void |
||
174 | */ |
||
175 | public function includes() { |
||
197 | |||
198 | /** |
||
199 | * Make the plugin translation ready. |
||
200 | * |
||
201 | * Translations should be added in the WordPress language directory: |
||
202 | * - WP_LANG_DIR/plugins/auto-load-next-post-LOCALE.mo |
||
203 | * |
||
204 | * @access public |
||
205 | * @since 1.0.0 |
||
206 | * @version 1.4.10 |
||
207 | * @return void |
||
208 | */ |
||
209 | public function load_plugin_textdomain() { |
||
212 | |||
213 | /** |
||
214 | * Registers and enqueues stylesheets and javascripts for the front of the site. |
||
215 | * |
||
216 | * @access public |
||
217 | * @since 1.3.2 |
||
218 | * @version 1.5.7 |
||
219 | */ |
||
220 | public function alnp_enqueue_scripts() { |
||
250 | |||
251 | /** |
||
252 | * Checks if we are using the theme customizer. |
||
253 | * |
||
254 | * @access public |
||
255 | * @since 1.5.0 |
||
256 | * @static |
||
257 | * @return string|boolean |
||
258 | */ |
||
259 | public static function is_alnp_using_customizer() { |
||
266 | |||
267 | /** |
||
268 | * Helper function for registering and enqueueing scripts and styles. |
||
269 | * |
||
270 | * @access public |
||
271 | * @since 1.0.0 |
||
272 | * @version 1.5.0 |
||
273 | * @static |
||
274 | * @param string $name The ID to register with WordPress. |
||
275 | * @param string $file_path The path to the actual file. |
||
276 | * @param bool $is_script Optional, argument for if the incoming file_path is a JavaScript source file. |
||
277 | * @param array $support Optional, for requiring other javascripts for the source file you are calling. |
||
278 | * @param string $version Optional, can match the version of the plugin or version of the source file. |
||
279 | * @param bool $footer Optional, can set the JavaScript to load in the footer instead. |
||
280 | * @global string $wp_version |
||
281 | */ |
||
282 | public static function load_file( $name, $file_path, $is_script = false, $support = array(), $version = '', $footer = false ) { |
||
302 | |||
303 | } // END Auto_Load_Next_Post() |
||
304 | |||
308 |
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.