Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • bmstudio
    Participant

    @bmstudio

    I forgot, you must create the folder and file “members/single/outils/loop-outils.php” or another 🙂


    bmstudio
    Participant

    @bmstudio

    Hi,

    I have modify the @azchipka ‘s plugin.
    It’s work !!!

    
    <?php
    /*
    Plugin Name: TCH BP Posts On Profile
    Plugin URI: http://azchipka.thechipkahouse.com/services/technology/development/wordpress-plugins
    Description: Adds a tab to Buddy Press User Profile displaying the posts they have published. 
    Version: 0.1
    Author: Avery Z Chipka
    Author URI: http://azchipka.thechipkahouse.com
    License: GPLv2 or later
    */
    // Make sure we don't expose any info if called directly
    
    if ( !function_exists( 'add_action' ) ) {
    	echo '404';
    	exit;
    }
    define('TCH_PostsOnProfilesVersion', '0.1');
    define('TCH_PostsOnProfilesVersion_PLUGIN_URL', plugin_dir_url( __FILE__ ));
    
    function my_setup_nav() {
          global $bp;
     
          bp_core_new_nav_item( array( 
            'name' => __( 'Outils', 'buddypress' ), 
            'slug' => 'mes-outils', 
            'position' => 75,
            'screen_function' => 'mes_outils_lien',
    	    'show_for_displayed_user' => true,
    	    'default_subnav_slug' => 'mes-outils',
    	    'item_css_id' => 'mes-outils'
          ) );
    }
     
    add_action( 'bp_setup_nav', 'my_setup_nav', 1000 );
     
    function mes_outils_titre() {
    	echo 'Mes outils';
    }
     
    function mes_outils_contenu() {
    		locate_template( array( 'members/single/outils/loop-outils.php' ), true ) ?>
        	<?php echo "TEST"; ?>
            
        <?php
    }
     
    function mes_outils_lien () {
    	add_action( 'bp_template_title', 'mes_outils_titre' );
    	add_action( 'bp_template_content', 'mes_outils_contenu' );
    	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar