wpbp/pointerplus
Composer 安装命令:
composer require wpbp/pointerplus
包简介
Super pointer creation for WP Admin
关键字:
README 文档
README
Super pointer creation for WP Admin
Install
composer require wpbp/pointerplus:dev-master
Features
- Pointer autoposition by selector (WP-Pointer API)
- Remember the Pointer (WP-Pointer API)
- Show by Post Type
- Show by page (ex: users.php)
- Custom dashicon (https://developer.wordpress.org/resource/dashicons)
- Hide feature
- Custom button with JS callback
- Custom PHP Code to execute at loading of the page
- Reset the pointer by prefix (by user id)
- Wait the available selector
- Create a wizard-like system
Example
$pointerplus = new PointerPlus( array( 'prefix' => 'your-pointer-domain' ) ); // With this line of code you can reset all the pointer with your prefix // $pointerplus->reset_pointer(); function custom_initial_pointers( $pointers, $prefix ) { /* Default parameters: $defaults = array( 'class' => 'pointerplus', 'width' => 300, //fixed value 'align' => 'middle', 'edge' => 'left', 'post_type' => array(), 'pages' => array(), 'next' => 'the id of the pointer to jump on Next button click', // Or a custom js solution 'jsnext' => '' //empty [t = pointer instance, $ = jQuery] 'phpcode' => function() //executed on admin_notices action 'show' => 'open' //default, 'next' => 'id' // On close the pointer show to that pointer ); */ return array_merge( $pointers, array( $prefix . '_settings' => array( 'selector' => '#menu-settings', 'title' => __( 'PointerPlus Test', 'your-pointer-domain' ), 'text' => __( 'The plugin is active and ready to start working.', 'your-pointer-domain' ), 'width' => 260, 'icon_class' => 'dashicons-admin-settings', 'jsnext' => "button = jQuery('<a id=\"pointer-close\" class=\"button action thickbox\" href=\"#TB_inline?width=700&height=500&inlineId=menu-popup\">" . __( 'Open Popup' ) . "</a>'); button.bind('click.pointer', function () { t.element.pointer('close'); }); return button;", 'phpcode' => custom_phpcode_thickbox() ), $prefix . '_posts' => array( 'selector' => '#menu-posts', 'title' => __( 'PointerPlus for Posts', 'your-pointer-domain' ), 'text' => __( 'One more pointer.', 'your-pointer-domain' ), 'post_type' => array( 'post' ), 'icon_class' => 'dashicons-admin-post', 'width' => 350, ), $prefix . '_pages' => array( 'selector' => '#menu-pages', 'title' => __( 'PointerPlus Pages', 'your-pointer-domain' ), 'text' => __( 'A pointer for pages.', 'your-pointer-domain' ), 'post_type' => array( 'page' ), 'icon_class' => 'dashicons-admin-post' ), $prefix . '_users' => array( 'selector' => '#menu-users', 'title' => __( 'PointerPlus Users', 'your-pointer-domain' ), 'text' => __( 'A pointer for users.', 'your-pointer-domain' ), 'pages' => array( 'users.php' ), 'icon_class' => 'dashicons-admin-users' ), $prefix . '_settings_tab' => array( 'selector' => '#show-settings-link', 'title' => __( 'PointerPlus Help', 'your-pointer-domain' ), 'text' => __( 'A pointer with action.', 'your-pointer-domain' ), 'edge' => 'top', 'align' => 'right', 'icon_class' => 'dashicons-welcome-learn-more', 'next' => $prefix . '_contextual_tab' ), $prefix . '_contextual_tab' => array( 'selector' => '#contextual-help-link', 'title' => __( 'PointerPlus Help', 'your-pointer-domain' ), 'text' => __( 'A pointer for help tab.<br>Go to Posts, Pages or Users for other pointers.', 'your-pointer-domain' ), 'edge' => 'top', 'align' => 'right', 'icon_class' => 'dashicons-welcome-learn-more', 'show' => 'close' ) ) ); } // Your prefix add_filter( 'your-pointer-domain-pointerplus_list', 'custom_initial_pointers', 10, 2 ); function custom_phpcode_thickbox() { add_thickbox(); echo '<div id="menu-popup" style="display:none;"> <p style="text-align: center;"> This is my hidden content! It will appear in ThickBox when the link is clicked. <iframe width="560" height="315" src="https://www.youtube.com/embed/EaWfDuXQfo0" frameborder="0" allowfullscreen></iframe> </p> </div>'; }
wpbp/pointerplus 适用场景与选型建议
wpbp/pointerplus 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.44k 次下载、GitHub Stars 达 21, 最近一次更新时间为 2016 年 05 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「pointer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wpbp/pointerplus 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wpbp/pointerplus 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wpbp/pointerplus 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Implementation of JSON Patch (http://tools.ietf.org/html/rfc6902)
Accessor implement based on JSON Pointer (RFC6901)
PHP REST Framework
Easy-to-use JSON documents with JSON pointer support
Package for registering and using custom WP Help Tooltips.
Vanilla Javascript psuedo-polyfill for Media Query Level 4's '(pointer:coarse)'
统计信息
- 总下载量: 7.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2016-05-30