Tag Info

New answers tagged

0

As another poster pointed out, this is almost always a bad idea for security reasons. If you insist on doing it this is how. Since you are using a custom field that can have both php and html, your best bet is to use a shortcode. Something like this will work: In the file that holds your functions: function wpsc_do_php($atts, $content){ /*Do some ...


0

In principle this is easyliy possible, if you tell your template to evaluate the contents of the field. But this way you are probably going to introduce lots of security problems into your code. In most cases it is not necessary to store php code in db and there is most certainly a better way of solving your problem.


2

max_input_vars is the limit on the total number of GET, POST, and COOKIE vars. To determine how many there are you can just count them. Here's a quick example in a WordPress context: function wpd_admin_error_notice() { echo 'This request contained ' . count( $_POST ) . ' POST vars, ' . count( $_GET ) . ' GET vars, and ' . count( $_COOKIE ) . ' ...


0

Ok, I got it. https://codex.wordpress.org/Function_Reference/do_settings_sections function initialize_theme_options() { // First, we register a section. This is necessary since all future options must belong to one. add_settings_section( // ID used to identify this section and with which to register options 'main_settings_section', // Title ...


1

This is wrong: add_theme_page("Theme Panel", "Theme Panel", "manage_options", "theme-panel", "initialize_theme_options", null, 99); The last two parameters shouldn't be there. Check this function in codex here. EDIT: What's more, the last parameter (which should be there) initialize_theme_options is wrong too, because it should be a callback to a ...



Top 50 recent answers are included