First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
call user func array error after moved the site to new server
This workaround is far from ideal, but it gets the job done. On $mail_sent == true set a post meta. In the __construct function add a callback to the admin_head action that checks whether the post meta has been set. If yes, delete the post meta and add the admin_notices action with the callback to … Read more
save_post is an action triggered whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email. The data for the post is stored in $_POST, $_GET or the global $post_data, depending on how the post was edited. For example, quick edits use $_POST. … Read more
Ok i solved it looks like that getimagesize will generate error/notice if image is not found, so alert box will fire… This is straight from PHP docs: If accessing the filename image is impossible getimagesize() will generate an error of level E_WARNING. On read error, getimagesize() will generate an error of level E_NOTICE. Here is … Read more
Long shot, but if you happen to not follow the recommended format and include the number sign with the HEX code when you define the default colour in your theme support, like this: if (function_exists(‘add_theme_support’)) { $defaults = array(‘default-color’ => ‘#666’); add_theme_support( ‘custom-background’, $defaults ); } Then, with your code above, you will end up … Read more
I think you’re misunderstanding the function get_page_template_slug When you call $template = get_page_template_slug( $post_id ); it won’t return index.php if you are using the default theme template. It only works when viewing Pages and will either return the slug of the Custom Page Template assigned to that Page or an empty string otherwise. So if … Read more
Ajax callback and shortcode functionality
It sounds to me like you’re wanting to extend the default comments walker with your own: class My_Walker_Comment extends Walker_Comment { // giddy up } If so, this answer explains it quite well.
In your class, your function is called ‘public function setOption()’ not setOptionS . Check your error log for this kind of issues. Also in your code I don’t see the function ‘socialShareOptions’ actually being called anywhere.