Plugin Directory

Changeset 1712690


Ignore:
Timestamp:
08/12/2017 11:37:08 PM (9 years ago)
Author:
sujin2f
Message:

6.0.0

Location:
plugin-grouper/trunk
Files:
45 added
11 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • plugin-grouper/trunk/README.md

    r1458754 r1712690  
    1 # Plugin Manager
     1# Plugin Manager Pro
    22If your plugin admin page had so many items, you would be struggle to manage them. Make them categorized with this plugin :D
    33
    44* Category : Wordpress Plugin
    5 * wordpress.org Plugin Repository : [https://wordpress.org/plugins/plugin-grouper]
    65
    76## What am I able to do?
  • plugin-grouper/trunk/autoload.php

    r1418083 r1712690  
    11<?php
    22/**
    3  *
    43 * Plugin Manager
    54 *
    6  * @author  Sujin 수진 Choi
    7  * @package PIGPR
    8  * @version 3.0.2
    9  * @website https://www.facebook.com/WP-developer-Sujin-1182629808428000/
     5 * @author  Sujin 수진 Choi
     6 * @package plugin-manager
     7 * @version 6.0.0
     8 * @website http://www.sujinc.com/donation
    109 *
    11  * Licensed under The MIT License
     10 * Licensed under The GPL License
    1211 * Redistributions of files must retain the above copyright notice
    13  *
    1412 */
    1513
    16 if ( !function_exists( 'PIGPR' ) ) {
    17     function PIGPR() {
    18         spl_autoload_register( function( $className ) {
    19             $namespace = 'PIGPR\\';
    20             if ( stripos( $className, $namespace ) === false ) {
    21                     return;
     14if ( !function_exists( 'autoload_sujin_plugin_manager' ) ) {
     15    function autoload_sujin_plugin_manager() {
     16        spl_autoload_register( function( $class_name ) {
     17            $namespace = 'Sujin\\Plugin\\PluginMgr\\';
     18
     19            if ( stripos( $class_name, $namespace ) === false ) {
     20                return;
    2221            }
    2322
    24             $sourceDir = __DIR__ . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR;
    25             $fileName  = str_replace( array( $namespace, '\\' ), array( $sourceDir, DIRECTORY_SEPARATOR ), $className ) . '.php';
     23            $source_dir = __DIR__ . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR;
    2624
    27             if ( is_readable( $fileName ) ) {
    28                 include $fileName;
     25            // Delete Namespace
     26            $path = str_replace( $namespace, '', $class_name ) . '.php';
     27            $path = explode( '\\', $path );
     28
     29            // Separate Filename and Path
     30            $file_name = array_pop( $path );
     31
     32            // Change Path to path-name/path-name
     33            $path = array_map( function( $string ) {
     34                $out = array();
     35
     36                preg_match_all( '/((?:^|[A-Z])[a-z]+)/', $string, $matches );
     37                foreach( $matches[0] as $match ) {
     38                    $out[] = strtolower( $match );
     39                }
     40
     41                return implode( '-', $out );
     42            }, $path );
     43            $path = implode( DIRECTORY_SEPARATOR, $path );
     44
     45            // Change Filename to class-class-name.php
     46            $file_name = strtolower( $file_name );
     47            $file_name = str_replace( '_', '-', $file_name );
     48            $file_name = '/class-' . $file_name;
     49
     50            $file_name = $source_dir . $path . $file_name;
     51
     52            if ( is_readable( $file_name ) ) {
     53                include_once( $file_name );
    2954            }
    3055        });
    3156    }
    3257
    33     PIGPR();
     58    autoload_sujin_plugin_manager();
    3459}
  • plugin-grouper/trunk/plugin-grouper.php

    r1474229 r1712690  
    11<?php
    22/**
    3  * Plugin Name:     Plugin Manager
    4  * Plugin URI:      http://www.sujinc.com/
    5  * Description:     Too many plugins bothers you? Put them into group!
    6  * Version:             5.0.4
    7  * Author:              Sujin 수진 Choi
    8  * Author URI:      http://www.sujinc.com/
    9  * License:             GPLv2 or later
    10  * Text Domain:     plugin-grouper
     3 * Plugin Name:   Plugin Manager
     4 * Plugin URI:    https://wordpress.org/plugins/plugin-grouper/
     5 * Description:   Too many plugins bothers you? Put them into group!
     6 * Version:       6.0.0
     7 * Author:        Sujin 수진 Choi
     8 * Author URI:    http://www.sujinc.com/
     9 * License:       GPLv2 or later
     10 * Text Domain:   plugin-manager
    1111 */
    1212
     
    1818
    1919# Definitions
    20 if ( !defined( 'PIGPR_PLUGIN_NAME' ) ) {
     20if ( !defined( 'SUJIN_PLUGIN_MGR_BASE_NAME' ) ) {
    2121    $basename = trim( dirname( plugin_basename( __FILE__ ) ), '/' );
     22
    2223    if ( !is_dir( WP_PLUGIN_DIR . '/' . $basename ) ) {
    2324        $basename = explode( '/', $basename );
     
    2526    }
    2627
    27     define( 'PIGPR_PLUGIN_NAME', $basename );
     28    define( 'SUJIN_PLUGIN_MGR_BASE_NAME', $basename );
    2829}
    2930
    30 if ( !defined( "PIGPR_PLUGIN_FILE_NAME" ) )
    31     define( "PIGPR_PLUGIN_FILE_NAME", basename(__FILE__) );
     31if ( !defined( "SUJIN_PLUGIN_MGR_NAME" ) )
     32    define( "SUJIN_PLUGIN_MGR_NAME", "Plugin Manager" );
    3233
    33 if ( !defined( "PIGPR_TEXTDOMAIN" ) )
    34     define( "PIGPR_TEXTDOMAIN", "plugin-grouper" );
     34if ( !defined( "SUJIN_PLUGIN_MGR_SLUG" ) )
     35    define( "SUJIN_PLUGIN_MGR_SLUG", sanitize_title( SUJIN_PLUGIN_MGR_NAME ) );
    3536
    36 if ( !defined( 'PIGPR_PLUGIN_DIR' ) )
    37     define( 'PIGPR_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . PIGPR_PLUGIN_NAME . '/' );
     37if ( !defined( 'SUJIN_PLUGIN_MGR_PATH' ) )
     38    define( 'SUJIN_PLUGIN_MGR_PATH', WP_PLUGIN_DIR . '/' . SUJIN_PLUGIN_MGR_BASE_NAME );
    3839
    39 if ( !defined( 'PIGPR_TEMPLATE_DIR' ) )
    40     define( 'PIGPR_TEMPLATE_DIR', PIGPR_PLUGIN_DIR . 'templates/' );
     40if ( !defined( 'SUJIN_PLUGIN_MGR_URL' ) )
     41    define( 'SUJIN_PLUGIN_MGR_URL', plugin_dir_url( __FILE__ ) );
    4142
    42 if ( !defined( 'PIGPR_ASSETS_URL' ) )
    43     define( 'PIGPR_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets/' );
     43if ( !defined( "SUJIN_PLUGIN_MGR_VERSION_KEY" ) )
     44    define( "SUJIN_PLUGIN_MGR_VERSION_KEY", "SUJIN_PLUGIN_MGR_VERSION" );
    4445
    45 if ( !defined( 'PIGPR_VENDOR_URL' ) )
    46     define( 'PIGPR_VENDOR_URL', plugin_dir_url( __FILE__ ) . 'vendors/' );
    47 
    48 if ( !defined( "PIGPR_VERSION_KEY" ) )
    49     define( "PIGPR_VERSION_KEY", "PIGPR_version" );
    50 
    51 if ( !defined( "PIGPR_VERSION_NUM" ) )
    52     define( "PIGPR_VERSION_NUM", "5.0.0" );
     46if ( !defined( "SUJIN_PLUGIN_MGR_VERSION" ) )
     47    define( "SUJIN_PLUGIN_MGR_VERSION", "6.0.0" );
    5348
    5449# 가는거야~!
    55 include_once( PIGPR_PLUGIN_DIR . "/autoload.php");
    56 new PIGPR\Init();
     50include_once( "autoload.php" );
     51Sujin\Plugin\PluginMgr\Bootstrap::get_instance();
  • plugin-grouper/trunk/readme.txt

    r1474229 r1712690  
    44Tags: plugin, group, category. manage, admin
    55Requires at least: 4.2.2
    6 Tested up to: 4.5.3
    7 Stable tag: 5.0.4
     6Tested up to: 4.8.1
     7Stable tag: 6.0.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1414
    1515If your plugin admin page had so many items, you would be struggle to manage them. Make them categorized with this plugin :D
    16 * Update Warning : If you update from 4.0.0 to 5.0.0, some grouping configuration could be disappeared. Sorry about it.
    1716
    1817== Installation ==
    1918
     19I believe you know everything already.
     20
    2021== Screenshots ==
    2122
    22 1. Set/ Unset Group
    23 2. Grouping Tag on your List
    24 3. Group List
    25 4. Hide Plugin
    26 5. Hide Link Texts
    27 6. Delete Group
     231. Screenshot
    2824
    2925== Changelog ==
     26= 6.0.0 =
     27* Update User Interface
     28* Using Angular to make it faster
     29* Show Hidden Plugins Feature
     30* Edit Group
     31
    3032= 5.0.0 =
    3133* Update UI
Note: See TracChangeset for help on using the changeset viewer.