Skip to:
Content

BuddyPress.org

Ticket #7108: 7108-activity-embeds.patch

File 7108-activity-embeds.patch, 2.8 KB (added by imath, 8 years ago)

Activity Embeds top feature

  • src/bp-core/classes/class-bp-admin.php

    diff --git src/bp-core/classes/class-bp-admin.php src/bp-core/classes/class-bp-admin.php
    index 9372efa..ad68e38 100644
    class BP_Admin { 
    552552         * @since 1.7.0
    553553         */
    554554        public function about_screen() {
     555                $embedded_activity = '';
     556
     557                if ( version_compare( $GLOBALS['wp_version'], '4.5', '>=' ) ) {
     558                        $embedded_activity = wp_oembed_get( 'http://imath-buddypress.wpserveur.net/members/imath/activity/133/' );
     559                }
    555560        ?>
    556561
    557562                <div class="wrap about-wrap">
    class BP_Admin { 
    610615                        <?php endif; ?>
    611616
    612617                        <div class="headline-feature">
    613                                 <h3 class="headline-title"><?php esc_html_e( 'Customizable BuddyPress Emails', 'buddypress' ); ?></h3>
     618                                <h3 class="headline-title"><?php esc_html_e( 'Activity Embeds', 'buddypress' ); ?></h3>
    614619
    615                                 <div class="featured-image">
    616                                         <img src="<?php echo esc_url( buddypress()->plugin_url . 'bp-core/admin/images/bp-emails-feature.png' ); ?>" alt="<?php esc_html_e( 'Change colors of the email template using the Customizer.', 'buddypress' ); ?>">
    617                                 </div>
     620                                <?php if ( $embedded_activity ) :
     621                                        wp_enqueue_script( 'wp-embed' );
     622                                ?>
     623                                        <div class="embed-container">
     624                                                <?php echo $embedded_activity ; ?>
     625                                        </div>
     626
     627                                <?php else : ?>
     628
     629                                        <div class="featured-image">
     630                                                <a href="https://vimeo.com/170265313" title="<?php esc_attr_e( 'View the Activity Embeds demo', 'buddypress' ); ?>">
     631                                                        <img src="https://cldup.com/RvBF8TqUXj.png" alt="<?php esc_html_e( 'Embed activities into your WordPress posts or pages.', 'buddypress' ); ?>">
     632                                                </a>
     633                                        </div>
     634
     635                                <?php endif ; ?>
    618636
    619                                 <p class="introduction"><?php _e( 'Keep your users coming back with beautiful and flexible email notifications.', 'buddypress' ); ?>  </p>
    620                                 <p><?php _e( 'Edit the content of your emails, create new email templates, or change the design of the template in the Customizer. These are just a few of the customizations you can make to engage your users and increase their participation in your community with the new email features.', 'buddypress' ); ?> <a href="https://codex.buddypress.org/emails/"><?php esc_html_e( 'Learn more &rarr;', 'buddypress' ); ?></a></p>
     637                                <p class="introduction"><?php _e( 'Embed activities into your WordPress posts or pages.', 'buddypress' ); ?>  </p>
     638                                <p><?php _e( 'Copy the permalink URL of the activity of your choice, paste it into the content editor of your WordPress post or page, and &quot;voilà&quot;! The activity is embedded, here is a good way to feature the best activities of your community members.', 'buddypress' ); ?> <a href="https://vimeo.com/170265313"><?php esc_html_e( 'View the Activity Embeds demo', 'buddypress' ); ?></a></p>
    621639
    622640                                <div class="clear"></div>
    623641                        </div>