Plugin Directory

Changeset 2049202


Ignore:
Timestamp:
03/12/2019 05:24:49 PM (7 years ago)
Author:
wpler
Message:

Test it with current WordPress Version and add help tab

Location:
wpmu-linkmanager/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wpmu-linkmanager/trunk/i18n/wplerlm-de_DE.po

    r605684 r2049202  
    55"PO-Revision-Date: \n"
    66"Last-Translator: Stefan Jacomeit <[email protected]>\n"
    7 "Language-Team: WPler <[email protected]>\n"
     7"Language-Team: WPler <[email protected]>\n"
     8"Language: de\n"
    89"MIME-Version: 1.0\n"
    910"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 "X-Generator: Poedit 1.5.3\n"
    12 "Language: German\n"
     12"X-Generator: Poedit 2.2.1\n"
    1313"X-Poedit-SourceCharset: UTF-8\n"
     14"X-Poedit-Basepath: ..\n"
     15"X-Poedit-SearchPath-0: .\n"
     16"X-Poedit-SearchPath-1: wpmu_linkmanager.php\n"
    1417
    1518msgid "WPler LinkManager"
     
    100103msgstr "Speichern"
    101104
    102 msgid "This plugin works only into multisites"
     105msgid "This plugin works on multisites only"
    103106msgstr "Dieses Plugin funktioniert nur in Multisites"
     107
     108msgid "Help"
     109msgstr "Hilfe"
     110
     111msgid ""
     112"To display your links in the blogs on this network use the follow function "
     113"on the place where the link should shown:"
     114msgstr ""
     115"Um die Link in den Blogs in diesem Netzwerk anzuzeigen benutze folgende "
     116"Funktion an der Stelle wo der Link angezeigt werden sollte:"
     117
     118msgid ""
     119"Place this PHP function on the childtheme template file (i.e. footer.php), "
     120"where the link should shown. The shortcode identify the blog id and get the "
     121"correct link, which you have saved for the blog."
     122msgstr ""
     123"Platziere diese PHP Funktion in der Childtheme Datei (z.b. footer.php), wo "
     124"der Link angezeigt werden soll. Der Shortcode identifiziert die Blog ID und "
     125"zeigt den korrekten Link, welcher für diesen Blog gespeichert wurde, an."
  • wpmu-linkmanager/trunk/i18n/wplerlm-de_DE.pot

    r605684 r2049202  
    8989msgstr "Speichern"
    9090
    91 msgid "This plugin works only into multisites"
     91msgid "This plugin works on multisites only"
    9292msgstr "Dieses Plugin funktioniert nur in Multisites"
     93
     94msgid "Help"
     95msgstr "Hilfe"
     96
     97msgid "To display your links in the blogs on this network use the follow function on the place where the link should shown:"
     98msgstr ""
     99
     100msgid "Place this PHP function on the childtheme template file (i.e. footer.php), where the link should shown. The shortcode identify the blog id and get the correct link, which you have saved for the blog."
     101msgstr ""
     102
  • wpmu-linkmanager/trunk/wpmu_linkmanager.php

    r605792 r2049202  
    33Plugin Name:        WPMU LinkManager
    44Description:        You works with a multisite and want manage your outgoing footer links into the themes of each blog? With this plugin you can manage into network admin your outgoing links for every registered blog into your multisite installation.
    5 Version:            1.0.3
     5Version:            1.0.4
     6Require:            3.4.2
     7Tested:             5.1
    68Author:             WPler
    7 Author URI:         http://www.wpler.com
     9Author URI:         https://www.wpler.com/linkmanager-fur-multisites/
    810Text Domain:        wplerlm
    911Domain Path:        /i18n/
     
    9092     */
    9193    public function add_menu() {
    92         add_menu_page( __( 'WPler LinkManager', wplerlm::get_textdomain() ), __( 'LinkManager', wplerlm::get_textdomain() ), 'manage_network_options', WPLER_LM_SLUG, array( $this, 'links_page' ) );
    93         add_submenu_page( WPLER_LM_SLUG, __( 'WPler LinkManager', wplerlm::get_textdomain() ), __( 'Links', wplerlm::get_textdomain() ), 'manage_network_options', WPLER_LM_SLUG, array( $this, 'links_page' ) );
     94        add_menu_page( __( 'WPler LinkManager', wplerlm::get_textdomain() ), __( 'LinkManager', wplerlm::get_textdomain() ), 'manage_network_options', WPLER_LM_SLUG, array( $this, 'links_page' ), 'dashicons-networking' );
     95        $hook = add_submenu_page( WPLER_LM_SLUG, __( 'WPler LinkManager', wplerlm::get_textdomain() ), __( 'Links', wplerlm::get_textdomain() ), 'manage_network_options', WPLER_LM_SLUG, array( $this, 'links_page' ) );
    9496        add_submenu_page( WPLER_LM_SLUG, __( 'WPler New Link', wplerlm::get_textdomain() ), __( 'New Link', wplerlm::get_textdomain() ), 'manage_network_options', 'wplerlm-newlink', array( $this, 'save_link_page' ) );
    95     }
     97        if ($hook) {
     98            add_action('load-'.$hook, array($this,'screenHelp'));
     99        }
     100    }
     101    /**
     102     * The settings help tabs
     103     * @since 1.0.4
     104     * @uses get_current_screen, current_user_can, esc_html,
     105     * @return false
     106     */
     107    public function screenHelp() {
     108        $current_screen = get_current_screen();
     109        if (current_user_can('manage_network_options')) {
     110            $current_screen->add_help_tab(array(
     111                'id'        => 'overview',
     112                'title'     => __('Help', wplerlm::get_textdomain()),
     113                'content'   => '<p>'.__('To display your links in the blogs on this network use the follow function on the place where the link should shown:',wplerlm::get_textdomain()).'<br><br>'.
     114                               '<code>&lt;?php echo do_shortcode(&quot;[wplerlm]&quot;); ?&gt;</code></p>'.
     115                               '<p>'.__('Place this PHP function on the childtheme template file (i.e. footer.php), where the link should shown. The shortcode identify the blog id and get the correct link, which you have saved for the blog.', wplerlm::get_textdomain()).'</p>'
     116            ));
     117        }
     118    }
    96119    /**
    97120     * Add the Table of Link Contents to backend into network
     
    152175                        <?php
    153176                    }
    154                 }
    155                 ?>
     177                } else { ?>
     178                    <tr><td colspan="6"><?php _e('There are no links stored', wplerlm::get_textdomain()); ?></td></tr>
     179                <?php } ?>
    156180            </tbody>
    157181            <tfoot>
     
    183207        global $wpdb;
    184208        $siteid = '';
     209        $target = '_blank';
    185210        if ( !empty( $_POST[ 'save' ] ) ) {
    186211            $into[ 'blog_id' ] = absint( $_POST[ 'blogid' ] );
     
    220245                    <td><select name="blogid" id="blogid" size="1">
    221246                        <?php
    222                         $blogs = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->blogs} WHERE public = '1' && archived = '0' && mature = '0' && spam = '0' && deleted = '0'" ) );
     247                        $blogs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs} WHERE public = '1' && archived = '0' && mature = '0' && spam = '0' && deleted = '0'");
    223248                        foreach( $blogs as $blog ) { ?>
    224249                            <option value="<?php echo $blog; ?>" <?php echo selected( $blog, $siteid ); ?>><?php echo get_blog_details( $blog )->blogname . ' (' . get_blog_details( $blog )->siteurl . ')'; ?></option>
     
    229254                <tr>
    230255                    <th scope="col"><label for="tourl"><?php _e( 'To URL?', wplerlm::get_textdomain() ); ?></label></th>
    231                     <td><input type="text" name="tourl" id="tourl" class="widefat" value="<?php echo !empty( $link->tourl ) ? $link->tourl : ''; ?>" placeholder="http://" /></td>
     256                    <td><input type="text" name="tourl" id="tourl" class="widefat" value="<?php echo !empty( $link->tourl ) ? $link->tourl : ''; ?>" placeholder="https://" /></td>
    232257                </tr>
    233258                <tr>
     
    323348            dbDelta( $sql );
    324349        } else {
    325             printf( '<div class="updated">%s</div>', __( 'This plugin works only into multisites', wplerlm::get_textdomain() ) );
     350            printf( '<div class="updated">%s</div>', __( 'This plugin works on multisites only', wplerlm::get_textdomain() ) );
    326351        }
    327352    }
Note: See TracChangeset for help on using the changeset viewer.