0

can anyone help me out about how to showing something lets say "Hello World" beside the version no that shows up in the wp admin dashboard footer?

I've already tried the action named admin_footer and then via css I've floated it on right, but it doesn't show up as a single string, beside overlap one another.

here is the visual expression of what I'm trying to do.

this is default wp admin footer right:

enter image description here

Here is what I want:

enter image description here

Here is what happening with add_action admin_footer and then css for float: right;:

enter image description here

Any help will be highly appreciated.

6
  • This is not wordpress related. It's definitely a styling issue. Please provide all the css aplied for these elements. It looks like the height or line height is to low and position:absolute or a low width
    – luukvhoudt
    Oct 23 '15 at 16:24
  • no man you didnt understand it. Its not styling. I am looking for a way to feed some value into the function that shows that verstion so it it becomes a single string. admin footer is adding below that so even styling cant make it a single string
    – iSaumya
    Oct 23 '15 at 16:27
  • Do you got it now?
    – iSaumya
    Oct 23 '15 at 16:29
  • 1
    Okay, I don't know if it is possible yet. But you can always google it and if you don't have any luck with that then just head over to the wordpress core files and start digging. That's what I'm gonna do right now. If you think you found, then there must be a hook what you have to use for it else it's not possible without modifying the core.
    – luukvhoudt
    Oct 23 '15 at 16:33
  • 1
    check out (this file)[github.com/WordPress/WordPress/blob/…. You probably need update_footer not sure tho.
    – luukvhoudt
    Oct 23 '15 at 16:39
1

If you look at the source:

40          <p id="footer-upgrade" class="alignright">
41                  <?php
42                  /**
43                   * Filter the version/update text displayed in the admin footer.
44                   *
45                   * WordPress prints the current version and update information,
46                   * using core_update_footer() at priority 10.
47                   *
48                   * @since 2.3.0
49                   *
50                   * @see core_update_footer()
51                   *
52                   * @param string $content The content that will be printed.
53                   */
54                  echo apply_filters( 'update_footer', '' );
55                  ?>
56          </p>
57          <div class="clear"></div>
58  </div>

You should see the filter you need, update_footer.

Something like this should do what you want:

function test_update_footer_wpse_206382() {
  return '|| Hello World';
}
add_filter( 'update_footer', 'test_update_footer_wpse_206382' );

Just before that code in the Core, there is also admin_footer_text that you might be interested in.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.