Is it possible to dynamically change the “page_for_posts” option?
Is it possible to dynamically change the “page_for_posts” option?
Is it possible to dynamically change the “page_for_posts” option?
This is working perfectly for me but, is this an acceptable WP way to do it? If it works and you didn’t modify core or internal WP private objects then the way you did it is fine. I’m asking because somewhere I read you should not use wp_get_current_user for something like this but since it’s … Read more
So you’re trying to call the hide_empty_fields() and maybe_add_disclaimer_and_courtesy() methods in the Register_Impress_Shortcodes class, from within a global function, and it’s not impossible to call class methods from within such global functions, but you cannot use $this in your function because $this is only available from within a class method which is called from within … Read more
The wp_sitemaps_enabled filter is filtering the value returned by WP_Sitemaps::sitemaps_enabled(). You can get the global instance of WP_Sitemaps with wp_sitemaps_get_server, which means you can get the value of sitemaps_enabled() like this: $sitemaps = wp_sitemaps_get_server(); $enabled = $sitemaps->sitemaps_enabled(); if ( $enabled ) { }
I was looking into this because all of the text was not showing on my slider, and the slider had a height set with overflow: hidden. I didn’t think there was a simpler solution than to create a filter for the_content until I stumbled across this one… It’s a css solution 🙂 All I am … Read more
Try: function allow_daniel_edit( $caps = array(), $cap = ”, $user_id = 0, $args = array() ) { if ($user_id == 59) { return array( ‘bp_moderate’ ); // or some other permission or additional permissions } return $caps; } add_filter( ‘map_meta_cap’, ‘allow_daniel_edit’, 999, 4 );
Filter a custom post type by custom field in admin
custom post filter based on Visitors country
Deregister Custom the_title Filter for edit_post_link
The solution for this was a compromise I moved the code from the wp_login hook into my meta_links function and test to see if my value exists function dk_plugin_meta_links( $links, $file ) { if($latestversion == “”) { //get the latest version if we don’t already have it } (do something with) $latestversion; } add_filter( ‘plugin_row_meta’, … Read more