We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b608a5f commit fa0874eCopy full SHA for fa0874e
src/class-settings-page.php
@@ -115,4 +115,24 @@ protected function view_template_tabs() {
115
$this->api->show_forms();
116
echo '</div>';
117
}
118
+
119
+ /**
120
+ * Ritorna il valore di un'opzione a partire dalla sua sezione
121
+ * e dal suo nome
122
+ *
123
+ * @param string $option settings field name
124
+ * @param string $section the section name this field belongs to
125
+ * @param string $default default text if it's not found
126
+ * @return string
127
+ */
128
+ public static function get_option( $option, $section, $default = '' ) {
129
130
+ $options = get_option( $section );
131
132
+ if ( isset( $options[$option] ) ) {
133
+ return $options[$option];
134
+ }
135
136
+ return $default;
137
138
0 commit comments