These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * WordPress Settings |
||
4 | * |
||
5 | * Add setting pages with Amarkal UI components to your WordPress theme or |
||
6 | * plugin. |
||
7 | * |
||
8 | * @package amarkal-settings |
||
9 | * @depends amarkal-ui |
||
10 | * @author Askupa Software <[email protected]> |
||
11 | * @link https://github.com/askupasoftware/amarkal-settings |
||
12 | * @copyright 2017 Askupa Software |
||
13 | */ |
||
14 | |||
15 | // Prevent direct file access |
||
16 | defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); |
||
17 | |||
18 | /** |
||
19 | * Prevent loading the library more than once |
||
20 | */ |
||
21 | if( defined( 'AMARKAL_SETTINGS' ) ) return false; |
||
22 | define( 'AMARKAL_SETTINGS', true ); |
||
23 | |||
24 | if(!function_exists('amarkal_add_settings_page')) |
||
25 | { |
||
26 | /** |
||
27 | * Add a new settings page |
||
28 | * |
||
29 | * @param [array] $args |
||
30 | * @return void |
||
31 | */ |
||
32 | function amarkal_add_settings_page( $args ) |
||
33 | { |
||
34 | $manager = Amarkal\Settings\Manager::get_instance(); |
||
35 | return $manager->add_settings_page($args); |
||
36 | } |
||
37 | } |
||
38 | |||
39 | if(!function_exists('amarkal_get_settings_page')) |
||
40 | { |
||
41 | /** |
||
42 | * Get a settings page instance |
||
43 | * |
||
44 | * @param string $slug |
||
45 | * @return Amarkal\Settings\SettingsPage |
||
46 | */ |
||
47 | function amarkal_get_settings_page( $slug ) |
||
48 | { |
||
49 | $manager = Amarkal\Settings\Manager::get_instance(); |
||
50 | return $manager->get_settings_page($slug); |
||
51 | } |
||
52 | } |
||
53 | |||
54 | if(!function_exists('amarkal_get_settings_value')) |
||
55 | { |
||
56 | /** |
||
57 | * Get the value of the given settings field |
||
58 | * |
||
59 | * @param [array] $args |
||
0 ignored issues
–
show
There is no parameter named
$args . Was it maybe removed?
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. Consider the following example. The parameter /**
* @param array $germany
* @param array $island
* @param array $italy
*/
function finale($germany, $island) {
return "2:1";
}
The most likely cause is that the parameter was removed, but the annotation was not. ![]() |
|||
60 | * @return void |
||
61 | */ |
||
62 | function amarkal_get_settings_value( $slug, $field_name ) |
||
63 | { |
||
64 | $manager = Amarkal\Settings\Manager::get_instance(); |
||
65 | $page = $manager->get_settings_page($slug); |
||
66 | return $page->get_field_value($field_name); |
||
67 | } |
||
68 | } |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.