Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2015
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.17 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @package Boss Child Theme
  4.  * The parent theme functions are located at /boss/buddyboss-inc/theme-functions.php
  5.  * Add your own functions in this file.
  6.  */
  7.  
  8. /**
  9.  * Sets up theme defaults
  10.  *
  11.  * @since Boss Child Theme 1.0.0
  12.  */
  13. function boss_child_theme_setup()
  14. {
  15.   /**
  16.    * Makes child theme available for translation.
  17.    * Translations can be added into the /languages/ directory.
  18.    * Read more at: http://www.buddyboss.com/tutorials/language-translations/
  19.    */
  20.  
  21.   // Translate text from the PARENT theme.
  22.   load_theme_textdomain( 'boss', get_stylesheet_directory() . '/languages' );
  23.  
  24.   // Translate text from the CHILD theme only.
  25.   // Change 'boss' instances in all child theme files to 'boss_child_theme'.
  26.   // load_theme_textdomain( 'boss_child_theme', get_stylesheet_directory() . '/languages' );
  27.  
  28. }
  29. add_action( 'after_setup_theme', 'boss_child_theme_setup' );
  30.  
  31. /**
  32.  * Enqueues scripts and styles for child theme front-end.
  33.  *
  34.  * @since Boss Child Theme  1.0.0
  35.  */
  36. function boss_child_theme_scripts_styles()
  37. {
  38.   /**
  39.    * Scripts and Styles loaded by the parent theme can be unloaded if needed
  40.    * using wp_deregister_script or wp_deregister_style.
  41.    *
  42.    * See the WordPress Codex for more information about those functions:
  43.    * http://codex.wordpress.org/Function_Reference/wp_deregister_script
  44.    * http://codex.wordpress.org/Function_Reference/wp_deregister_style
  45.    **/
  46.  
  47.   /*
  48.    * Styles
  49.    */
  50.   wp_enqueue_style( 'boss-child-custom', get_stylesheet_directory_uri().'/css/custom.css' );
  51. }
  52. add_action( 'wp_enqueue_scripts', 'boss_child_theme_scripts_styles', 9999 );
  53.  
  54.  
  55. /****************************** CUSTOM FUNCTIONS ******************************/
  56.  
  57. // Add your own custom functions here
  58.  
  59. add_action( 'mpp_after_media_widget_item', 'mpp_custom_add_user_link' );
  60. function mpp_custom_add_user_link() {
  61.     //you may put some conditions here like
  62.  
  63.        //mpp_is_single_gallery();
  64.         //mpp_is_single_media();
  65.        //to avoid showing it on single gallery/media pages
  66.  
  67.     $user_link = bp_core_get_userlink( mpp_get_media_creator_id() );
  68.     echo $user_link;
  69. }
  70. add_action( 'mpp_after_media_shortcode_item', 'mpp_custom_add_user_link' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement