GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 34512f...fc395c )
by Askupa
02:03
created

functions.php ➔ wp_dynamic_css_set_callback()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
cc 1
eloc 3
c 2
b 0
f 2
nc 1
nop 2
dl 0
loc 5
rs 9.4285
1
<?php
2
/**
3
 * @package   WordPress Dynamic CSS
4
 * @version   1.0.4
5
 * @author    Askupa Software <[email protected]>
6
 * @link      https://github.com/askupasoftware/wp-dynamic-css
7
 * @copyright 2016 Askupa Software
8
 */
9
10
if( !function_exists('wp_dynamic_css_enqueue') )
11
{
12
    /**
13
     * Enqueue a dynamic stylesheet
14
     * 
15
     * This will either print the compiled version of the stylesheet to the 
16
     * document's <head> section, or load it as an external stylesheet if $print 
17
     * is set to false
18
     * 
19
     * @param string $handle The stylesheet's name/id
20
     * @param string $path The absolute path to the dynamic CSS file
21
     * @paran boolean $print Whether to print the compiled CSS to the document 
22
     * head, or include it as an external CSS file
23
     * @param boolean $minify Whether to minify the CSS output
24
     */
25
    function wp_dynamic_css_enqueue( $handle, $path, $print = true, $minify = false )
26
    {
27
        $dcss = DynamicCSSCompiler::get_instance();
28
        $dcss->enqueue_style( $handle, $path, $print, $minify );
29
    }
30
}
31
32
if( !function_exists('wp_dynamic_css_set_callback') )
33
{
34
    /**
35
     * Set the value retrieval callback function
36
     * 
37
     * Set a callback function that will be used to get the values of the 
38
     * variables when the dynamic CSS file is compiled. The function accepts 1 
39
     * parameter which is the name of the variable, without the $ sign
40
     * 
41
     * @param string $handle The name of the stylesheet to be associated with this
42
     * callback function
43
     * @param string|array $callback A callback (or "callable" as of PHP 5.4) 
44
     * can either be a reference to a function name or method within an 
45
     * class/object.
46
     */
47
    function wp_dynamic_css_set_callback( $handle, $callback )
48
    {
49
        $dcss = DynamicCSSCompiler::get_instance();
50
        $dcss->register_callback( $handle, $callback );
51
    }
52
}
53