예제 #1
0
    private function _quote() {
        $id = bbp_get_reply_id();

        $is_reply = true;
        if ($id == 0) {
            $is_reply = false;
            $id = bbp_get_topic_id();
        }

        if (d4p_bbt_o('quote_method', 'tools') == 'html') {
            $url = ''; $ath = '';

            if ($is_reply) {
                $url = bbp_get_reply_url($id);
                $ath = bbp_get_reply_author_display_name($id);
            } else {
                $url = get_permalink($id);
                $ath = bbp_get_topic_author_display_name($id);
            }

            return '<a href="#'.$id.'" bbp-url="'.$url.'" bbp-author="'.$ath.'" class="d4p-bbt-quote-link">'.__("Quote", "gd-bbpress-tools").'</a>';
        } else {
            return '<a href="#'.$id.'" class="d4p-bbt-quote-link">'.__("Quote", "gd-bbpress-tools").'</a>';
        }
    }
예제 #2
0
    public function bbp_head()
    {
        if (d4p_bbt_o('include_always') == 1 || d4p_is_bbpress()) {
            ?>
<script type="text/javascript">
            /* <![CDATA[ */
            var gdbbPressToolsInit = {
                quote_method: "<?php 
            echo d4p_bbt_o('quote_method');
            ?>
",
                quote_wrote: "<?php 
            echo __("wrote", "gd-bbpress-tools");
            ?>
",
                bbpress_version: <?php 
            echo d4p_bbpress_version();
            ?>
,
                wp_editor: <?php 
            echo d4p_bbpress_version() > 20 ? bbp_use_wp_editor() ? 1 : 0 : 0;
            ?>
            };
            /* ]]> */
        </script><?php 
        }
    }
예제 #3
0
 function tools_on()
 {
     if (defined('GDBBPRESSTOOLS_INSTALLED')) {
         return d4p_bbt_o('view_searchresults_active') == 1;
     } else {
         return false;
     }
 }
예제 #4
0
 public function bbp_head()
 {
     if (d4p_bbt_o('include_always') == 1 || d4p_is_bbpress()) {
         if (d4p_bbt_o('include_css') == 1) {
             ?>
             <style type="text/css">
                 /*<![CDATA[*/
                 
                 /*]]>*/
             </style>
         <?php 
         }
         ?>
     <?php 
     }
 }