承接 xs-khairul/pac04 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xs-khairul/pac04

最新稳定版本:v1.0.0

Composer 安装命令:

composer require xs-khairul/pac04

包简介

Utility packages for Wpmet plugin, It will be used to serve Stories, Notice , Banner and Ratings

README 文档

README

#Over View of package

  • Wpmet Plugin Utility helper package for Banner , Notice , Stories and Rating.
  • We made a composer package for these classes together.
  • By using this Helper package we are centralizing the feature of these Classes in a package manager (so that any update or modifications of this functionalities globally no need to give hand or keep any dependencies on our plugins)

Composer and making :

composer is a php dependency manager which take cares of all dependencies of projects , it take care of namespaces initializing and calling by mapping it in its autoload.php file we just need to specify the root dir in its jeson file call composer.json we can also configure its dependencies here and its author and package name etc.

composer.json file example

{
    "name": "xs-khairul/pac04",
    "description": "Utility packages for Wpmet plugin, It will be used to serve Stories, Notice , Banner and Ratings",
    "version": "v1.0.0",
    "type": "library",
    "license": "GPL-3.0-only",
    "autoload": {
        "psr-4": {
            "Wpmett\\UtilityPackage\\": "src/"
        }
    },
    "authors": [
        {
            "name": "XpeedStudio",
            "email": "info@xpeedstudio.com"
        },
        {
            "name": "Wpmet",
            "email": "info@xpeedstudio.com"
        }
    ],
    "minimum-stability": "stable",
    "require": {

    },
    "require-dev": {

    }

}

explanation

  • namespace "Wpmett\UtilityPackage\" point to the src/ folder directly by composer when it calls
  • require if any other package needed for this project.
  • required-dev if any other package needed for this project for only development purpose.

to install this package by CLI

composer require xs-khairul/pac04

Using feature example

/**
			 * Show WPMET stories widget in dashboard
			 */
			\Wpmett\UtilityPackage\Stories\Stories::instance( 'elementskit-lite' )
			// ->is_test(true)
			->set_filter( $filter_string )
			->set_plugin( 'ElementsKit', 'https://wpmet.com/plugin/elementskit/' )
			->set_api_url( 'https://api.wpmet.com/public/stories/' )
			->call();


			/**
			 * Show WPMET banner (codename: jhanda)
			 */
			\Wpmett\UtilityPackage\Banner\Banner::instance( 'elementskit-lite' )
			// ->is_test(true)
			->set_filter( ltrim( $filter_string, ',' ) )
			->set_api_url( 'https://api.wpmet.com/public/jhanda' )
			->set_plugin_screens( 'edit-elementskit_template' )
			->set_plugin_screens( 'toplevel_page_elementskit' )
			->call();

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2023-02-12