t_robinson
Forum Replies Created
-
Forum: Hacks
In reply to: Creating custom admin menu similar to 'Settings' pageI noticed a fix on Friday and you’re right. I was also experiencing another bug at the same time which covered up the issue. The custom function that I created uses add_action(‘admin_menu’, ‘function’); which means that this identical hook is called each time my custom function is been called.
I worked around this by adjusting my custom function to create build an array and then pass this through to the admin_menu hooked function. Within the hooked function this just has a flag to say “Is this the first item?”, if so it will use the same callback function for the parent menu as the first submenu. It work’s a treat!
Forum: Themes and Templates
In reply to: [Twenty Twelve] Actual year in footerWordPress has a inbuilt function to handle dates, you can use
<?php echo the_time('Y'); ?>which will display the current year in the format 2015. If you are looking for it to just display the last two values you can use <?php echo the_time(‘y’); ?>You can read more on the function here – http://codex.ww.wp.xz.cn/Formatting_Date_and_Time
Forum: Plugins
In reply to: [Broadcast] Broadcasting pages and keep child statusThe problem with this is we are looking to use this feature across 30+ sites and so it would be un-efficient to go through each site individually to move the new pages each time one is broadcasted.