calling a function from a class in your template
calling a function from a class in your template
calling a function from a class in your template
Creating a register settings class that supports extended classes
Object oriented programming, add_action in constructor not firing
Ok i was a bit headblocked; with the following snippet i was able to get things working as expected: $media = abc_attachments( $post->ID ); $arrayofids = array(); foreach( $media as $key ) { array_push($arrayofids, $key->ID); } preprint($arrayofids); Which lead to the following output: Array ( [0] => 1072 [1] => 1067 )
Best way to access variables in template markup
You method iam_user_can_save is incorrectly used as you are returning nothing to check in that method. Try this (not sure what behaviour you really want, the following code is just a working example from your code): public function iam_user_can_save( $post_id, $nonce ){ // Checks save status $is_autosave = wp_is_post_autosave( $post_id ); $is_revision = wp_is_post_revision( $post_id … Read more
This function was being made by an ajax call. The anchor link that made the call pointed to the same url. I changed the href to # and it now works perfectly.
What is wrong with assigning values to a WP_List_Table class?
Why is this require statement not working?
Meta Box not being added in plugin