Tag Info

Hot answers tagged

2

Let us look at the relevant line. I am reformatting it to easier understand what is going on: printf( _n('1 comment', '%1$s comments', get_comments_number() ), number_format_i18n( get_comments_number() ), 'text-domain' ); So what you are doing is calling printf with three parameters, each one now being on a separate line now as I formatted it. ...


2

With the lastest version of WordPress (4.3) you can now natively remove the customizer's theme switch setting without resorting to CSS hacks. /** * Remove customizer options. * * @since 1.0.0 * @param object $wp_customize */ function ja_remove_customizer_options( $wp_customize ) { //$wp_customize->remove_section( 'static_front_page' ); ...


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 ) . ' ...


1

I would not try to get too tricky and hide pages from users. What happens if they try to create a page with the same slug? I think it would just create confusion and more problems than it would solve. When you create the pages, store their IDs, not slug. Let users then change those through your options screen. This is similar to how WordPress tracks your ...



Only top voted, non community-wiki answers of a minimum length are eligible