1 | <?php |
||
19 | abstract class Auto_Load_Next_Post_Settings_Page { |
||
20 | |||
21 | /** |
||
22 | * Setting page id. |
||
23 | * |
||
24 | * @access protected |
||
25 | * @var string $id |
||
26 | */ |
||
27 | protected $id = ''; |
||
28 | |||
29 | /** |
||
30 | * Setting page label. |
||
31 | * |
||
32 | * @access protected |
||
33 | * @var string $label |
||
34 | */ |
||
35 | protected $label = ''; |
||
36 | |||
37 | /** |
||
38 | * Constructor. |
||
39 | * |
||
40 | * @access public |
||
41 | * @since 1.4.10 |
||
42 | * @version 1.5.5 |
||
43 | */ |
||
44 | public function __construct() { |
||
50 | |||
51 | /** |
||
52 | * Get settings page ID. |
||
53 | * |
||
54 | * @access public |
||
55 | * @since 1.4.10 |
||
56 | * @return string |
||
57 | */ |
||
58 | public function get_id() { |
||
61 | |||
62 | /** |
||
63 | * Get settings page label. |
||
64 | * |
||
65 | * @access public |
||
66 | * @since 1.4.10 |
||
67 | * @return string |
||
68 | */ |
||
69 | public function get_label() { |
||
72 | |||
73 | /** |
||
74 | * Add this page to settings. |
||
75 | * |
||
76 | * @access public |
||
77 | * @since 1.0.0 |
||
78 | * @param array $pages |
||
79 | * @return array $pages |
||
80 | */ |
||
81 | public function add_settings_page( $pages ) { |
||
86 | |||
87 | /** |
||
88 | * Add this settings page to plugin menu. |
||
89 | * |
||
90 | * @access public |
||
91 | * @since 1.0.0 |
||
92 | * @param array $pages |
||
93 | * @return array $pages |
||
94 | */ |
||
95 | public function add_menu_page( $pages ) { |
||
100 | |||
101 | /** |
||
102 | * Get settings array |
||
103 | * |
||
104 | * @access public |
||
105 | * @since 1.0.0 |
||
106 | * @return array |
||
107 | */ |
||
108 | public function get_settings() { |
||
111 | |||
112 | /** |
||
113 | * Output the settings. |
||
114 | * |
||
115 | * @access public |
||
116 | * @since 1.0.0 |
||
117 | */ |
||
118 | public function output() { |
||
123 | |||
124 | /** |
||
125 | * Save settings. |
||
126 | * |
||
127 | * @access public |
||
128 | * @since 1.0.0 |
||
129 | * @global $current_tab |
||
130 | */ |
||
131 | public function save() { |
||
138 | |||
139 | /** |
||
140 | * Displays a button above the settings header to toggle the help panel. |
||
141 | * |
||
142 | * The help tab does not show for theme selectors if the theme is already supported. |
||
143 | * |
||
144 | * @access public |
||
145 | * @static |
||
146 | * @since 1.5.5 |
||
147 | * @global $current_tab |
||
148 | */ |
||
149 | public function need_help() { |
||
159 | |||
160 | } // END class |
||
161 | |||
163 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.