本文整理汇总了PHP中scb_init函数的典型用法代码示例。如果您正苦于以下问题:PHP scb_init函数的具体用法?PHP scb_init怎么用?PHP scb_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了scb_init函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _p2p_load_framework
private function _p2p_load_framework()
{
if (is_dir(RTBIZ_PATH . 'vendor')) {
require_once RTBIZ_PATH . 'vendor/scribu/scb-framework/load.php';
}
scb_init(array($this, '_p2p_load'));
}
示例2: load
public static function load()
{
self::$dir_path = dirname(dirname(__FILE__));
self::$basename = plugin_basename(self::$dir_path . '/postmatic.php');
self::$url_path = plugins_url('', dirname(__FILE__));
load_plugin_textdomain('Postmatic', '', path_join(dirname(self::$basename), 'lang'));
scb_init();
add_action('plugins_loaded', array(__CLASS__, 'action_plugins_loaded'));
}
示例3: dirname
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// load scb
require dirname(__FILE__) . '/scb/load.php';
//= debug
//require dirname(__FILE__) . '/scb-debug.php';
//require dirname(__FILE__) . '/FirePHP.class.php';
//require dirname(__FILE__) . '/fb.php';
function _ac_init()
{
$textdomain = 'admin-customization';
load_plugin_textdomain($textdomain, false, dirname(plugin_basename(__FILE__)) . '/lang');
$dir = dirname(__FILE__);
$options = new scbOptions('admin-customization', __FILE__, array('favicon' => false, 'login_logo' => false, 'admin_logo' => false, 'admin_footer_left' => false, 'admin_footer_right' => false, 'admin_logo_font_size' => 16, 'widgets' => array(), 'disabled_widgets' => '', 'general_settings' => '', 'style_settings' => array()));
require_once $dir . '/core.php';
// initialize the core
AC_Core::init($options);
// add admin page
if (is_admin()) {
require_once $dir . '/admin/admin.php';
scbAdminPage::register('AC_Settings', __FILE__, $options);
}
}
scb_init('_ac_init');
示例4: dirname
Version: 2.85
Author: Lester 'GaMerZ' Chan
Author URI: http://lesterchan.net
Text Domain: wp-useronline
*/
@(include dirname(__FILE__) . '/scb/load.php');
function _useronline_init()
{
load_plugin_textdomain('wp-useronline', '', dirname(plugin_basename(__FILE__)) . '/lang');
require_once dirname(__FILE__) . '/core.php';
require_once dirname(__FILE__) . '/template-tags.php';
require_once dirname(__FILE__) . '/deprecated.php';
require_once dirname(__FILE__) . '/widget.php';
new scbTable('useronline', __FILE__, "\n\t\ttimestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\tuser_type varchar( 20 ) NOT NULL default 'guest',\n\t\tuser_id bigint( 20 ) NOT NULL default 0,\n\t\tuser_name varchar( 250 ) NOT NULL default '',\n\t\tuser_ip varchar( 39 ) NOT NULL default '',\n\t\tuser_agent text NOT NULL,\n\t\tpage_title text NOT NULL,\n\t\tpage_url varchar( 255 ) NOT NULL default '',\n\t\treferral varchar( 255 ) NOT NULL default '',\n\t\tUNIQUE KEY useronline_id ( timestamp, user_type, user_ip )\n\t", 'delete_first');
$most = new scbOptions('useronline_most', __FILE__, array('count' => 1, 'date' => current_time('timestamp')));
$options = new scbOptions('useronline', __FILE__, array('timeout' => 300, 'url' => trailingslashit(get_bloginfo('url')) . 'useronline', 'names' => false, 'naming' => array('user' => __('1 User', 'wp-useronline'), 'users' => __('%COUNT% Users', 'wp-useronline'), 'member' => __('1 Member', 'wp-useronline'), 'members' => __('%COUNT% Members', 'wp-useronline'), 'guest' => __('1 Guest', 'wp-useronline'), 'guests' => __('%COUNT% Guests', 'wp-useronline'), 'bot' => __('1 Bot', 'wp-useronline'), 'bots' => __('%COUNT% Bots', 'wp-useronline')), 'templates' => array('useronline' => '<a href="%PAGE_URL%"><strong>%USERS%</strong> ' . __('Online', 'wp-useronline') . '</a>', 'browsingsite' => array('separators' => array('members' => __(',', 'wp-useronline') . ' ', 'guests' => __(',', 'wp-useronline') . ' ', 'bots' => __(',', 'wp-useronline') . ' '), 'text' => _x('Users', 'Template Element', 'wp-useronline') . ': <strong>%MEMBER_NAMES%%GUESTS_SEPARATOR%%GUESTS%%BOTS_SEPARATOR%%BOTS%</strong>'), 'browsingpage' => array('separators' => array('members' => __(',', 'wp-useronline') . ' ', 'guests' => __(',', 'wp-useronline') . ' ', 'bots' => __(',', 'wp-useronline') . ' '), 'text' => '<strong>%USERS%</strong> ' . __('Browsing This Page.', 'wp-useronline') . '<br />' . _x('Users', 'Template Element', 'wp-useronline') . ': <strong>%MEMBER_NAMES%%GUESTS_SEPARATOR%%GUESTS%%BOTS_SEPARATOR%%BOTS%</strong>'))));
UserOnline_Core::init($options, $most);
scbWidget::init('UserOnline_Widget', __FILE__, 'useronline');
if (is_admin()) {
require_once dirname(__FILE__) . '/admin.php';
scbAdminPage::register('UserOnline_Admin_Integration', __FILE__);
scbAdminPage::register('UserOnline_Options', __FILE__, UserOnline_Core::$options);
}
if (function_exists('stats_page')) {
require_once dirname(__FILE__) . '/wp-stats.php';
}
# scbUtil::do_uninstall( __FILE__ );
# scbUtil::do_activation( __FILE__ );
}
scb_init('_useronline_init');
示例5: init
public static function init()
{
$my = self::getInstance();
scb_init(array($my, '_hw_pagenavi_plugin_init'));
}
示例6: define
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
define('P2P_PLUGIN_VERSION', '1.1.4');
define('P2P_TEXTDOMAIN', 'posts-to-posts');
require dirname(__FILE__) . '/scb/load.php';
function _p2p_init()
{
$base = dirname(__FILE__);
load_plugin_textdomain(P2P_TEXTDOMAIN, '', basename($base) . '/lang');
_p2p_load_files("{$base}/core", array('storage', 'query', 'query-post', 'query-user', 'url-query', 'util', 'side', 'type-factory', 'type', 'directed-type', 'api', 'widget'));
P2P_Widget::init();
if (is_admin()) {
_p2p_load_files("{$base}/admin", array('utils', 'box-factory', 'box', 'fields', 'column-factory', 'column'));
}
register_uninstall_hook(__FILE__, array('P2P_Storage', 'uninstall'));
}
scb_init('_p2p_init');
function _p2p_load_files($dir, $files)
{
foreach ($files as $file) {
require_once "{$dir}/{$file}.php";
}
}
示例7: _badgeos_p2p_load
* Load P2P.
*
* @since 1.3.4
*/
function _badgeos_p2p_load()
{
if (function_exists('p2p_register_connection_type')) {
return;
}
define('P2P_PLUGIN_VERSION', '1.6.3-alpha');
define('P2P_TEXTDOMAIN', 'badgeos');
require_once dirname(__FILE__) . '/p2p-core/init.php';
register_uninstall_hook(__FILE__, array('P2P_Storage', 'uninstall'));
if (is_admin()) {
_badgeos_p2p_load_admin();
}
}
scb_init('_badgeos_p2p_load');
/**
* Load P2P admin functionality.
*
* @since 1.3.4
*/
function _badgeos_p2p_load_admin()
{
P2P_Autoload::register('P2P_', dirname(__FILE__) . '/p2p-admin');
new P2P_Box_Factory();
new P2P_Column_Factory();
new P2P_Dropdown_Factory();
new P2P_Tools_Page();
}
示例8: dirname
{
if (is_admin()) {
require_once dirname(__FILE__) . '/admin/functions.php';
// TODO: pass 'class-dashboard.php' file to 'appthemes_register_feature()' when all themes will use Features API.
require_once dirname(__FILE__) . '/admin/class-dashboard.php';
require_once dirname(__FILE__) . '/admin/class-tooltips.php';
require_once dirname(__FILE__) . '/admin/class-tabs-page.php';
require_once dirname(__FILE__) . '/admin/class-settings.php';
require_once dirname(__FILE__) . '/admin/class-system-info.php';
require_once dirname(__FILE__) . '/admin/class-meta-box.php';
require_once dirname(__FILE__) . '/admin/class-attachments-metabox.php';
require_once dirname(__FILE__) . '/admin/class-media-manager-metabox.php';
require_once dirname(__FILE__) . '/admin/class-upgrader.php';
}
}
scb_init('_appthemes_after_scb_loaded');
add_action('after_setup_theme', '_appthemes_load_features', 999);
add_action('wp_enqueue_scripts', '_appthemes_register_scripts');
add_action('admin_enqueue_scripts', '_appthemes_register_scripts');
add_action('admin_enqueue_scripts', '_appthemes_admin_enqueue_scripts', 11);
// Register framework features to be enqueued in the plugin or theme using Features API.
if (function_exists('appthemes_register_feature')) {
appthemes_register_feature('app-wrapping', dirname(__FILE__) . '/includes/wrapping.php');
appthemes_register_feature('app-geo', dirname(__FILE__) . '/includes/geo.php');
appthemes_register_feature('app-login', dirname(__FILE__) . '/includes/views-login.php');
appthemes_register_feature('app-stats', dirname(__FILE__) . '/includes/stats.php');
appthemes_register_feature('app-open-graph', dirname(__FILE__) . '/includes/open-graph.php');
appthemes_register_feature('app-search-index', dirname(__FILE__) . '/includes/search-index.php');
appthemes_register_feature('app-comment-counts', dirname(__FILE__) . '/includes/comment-counts.php');
appthemes_register_feature('app-term-counts', dirname(__FILE__) . '/includes/term-counts.php');
appthemes_register_feature('app-slider', dirname(__FILE__) . '/includes/slider/slider.php');
示例9: audiotheme_p2p_init
/**
* Include the scbFramework.
*/
require AUDIOTHEME_DIR . 'includes/vendor/scb/load.php';
/**
* Attach hook to load the Posts to Posts core.
*
* This doesn't actually occur during the init hook despite the name.
*
* @since 1.0.0
*/
function audiotheme_p2p_init()
{
add_action('plugins_loaded', 'audiotheme_p2p_load_core', 20);
}
scb_init('audiotheme_p2p_init');
/**
* Load Posts 2 Posts core.
*
* Requires the scbFramework.
*
* Posts 2 Posts requires two custom database tables to store post
* relationships and relationship metadata. If an alternative version of the
* library doesn't exist, the tables are created on admin_init.
*
* @since 1.0.0
*/
function audiotheme_p2p_load_core()
{
if (function_exists('p2p_register_connection_type')) {
return;
示例10: define
<?php
define('APP_FRAMEWORK_DIR', dirname(__FILE__));
// scbFramework
require dirname(__FILE__) . '/scb/load.php';
scb_init();
require dirname(__FILE__) . '/kernel/functions.php';
appthemes_load_textdomain();
require dirname(__FILE__) . '/kernel/deprecated.php';
require dirname(__FILE__) . '/kernel/hooks.php';
require dirname(__FILE__) . '/kernel/view-types.php';
require dirname(__FILE__) . '/kernel/view-edit-profile.php';
function _appthemes_load_features()
{
if (current_theme_supports('app-wrapping')) {
require dirname(__FILE__) . '/includes/wrapping.php';
}
if (current_theme_supports('app-geo')) {
require dirname(__FILE__) . '/includes/geo.php';
}
if (current_theme_supports('app-login')) {
require dirname(__FILE__) . '/includes/views-login.php';
list($templates) = get_theme_support('app-login');
new APP_Login($templates['login']);
new APP_Registration($templates['register']);
new APP_Password_Recovery($templates['recover']);
new APP_Password_Reset($templates['reset']);
}
if (current_theme_supports('app-feed')) {
add_filter('request', 'appthemes_modify_feed_content');
}
示例11: dirname
<?php
/*
Plugin Name: Query Multiple Taxonomies
Version: 1.6.2
Description: Filter posts through multiple custom taxonomies using a widget.
Author: scribu
Author URI: http://scribu.net
Plugin URI: http://scribu.net/wordpress/query-multiple-taxonomies
Text Domain: query-multiple-taxonomies
Domain Path: /lang
*/
require dirname(__FILE__) . '/scb/load.php';
function _qmt_init()
{
load_plugin_textdomain('query-multiple-taxonomies', '', basename(dirname(__FILE__)) . '/lang');
require_once dirname(__FILE__) . '/core.php';
require_once dirname(__FILE__) . '/walkers.php';
require_once dirname(__FILE__) . '/widget.php';
Taxonomy_Drill_Down_Widget::init(__FILE__);
}
scb_init('_qmt_init');
示例12: dirname
<?php
/*
Plugin Name: Error Log Monitor
Plugin URI: http://w-shadow.com/blog/2012/07/17/error-log-monitor-plugin/
Description: Adds a Dashboard widget that displays the last X lines from your PHP error log, and can also send you email notifications about newly logged errors.
Version: 1.0
Author: Janis Elsts
Author URI: http://w-shadow.com/
*/
require dirname(__FILE__) . '/scb/load.php';
require dirname(__FILE__) . '/Elm/PhpErrorLog.php';
require dirname(__FILE__) . '/Elm/DashboardWidget.php';
require dirname(__FILE__) . '/Elm/Plugin.php';
scb_init('error_log_monitor_init');
function error_log_monitor_init()
{
new Elm_Plugin(__FILE__);
}
示例13: dirname
<?php
/*
Plugin Name: WP Horoscope
Version: 1.0.0
Description: WP Horoscope giúp hiển thị thông tin trong ngày của các cung hoàng đạo.
Author: Vô Minh
Plugin URI: http://laptrinh.senviet.org
*/
include_once dirname(__FILE__) . '/scb/load.php';
function _wphoroscope_init()
{
include_once dirname(__FILE__) . '/shortcode.php';
include_once dirname(__FILE__) . '/wpHoroscope_Widget.php';
scbWidget::init('wpHoroscope_Widget');
if (is_active_widget(false, false, "wp-horoscope-widget")) {
wp_enqueue_style("wphoroscope-style", plugins_url("/css/wp-horoscope.css", __FILE__));
}
}
$GLOBALS['_scb_data'] = array(60, __FILE__, array('scbUtil', 'scbOptions', 'scbForms', 'scbWidget'));
scb_init('_wphoroscope_init');
示例14: __construct
function __construct()
{
scb_init(array($this, 'options_init'));
}
示例15: define
Text Domain: posts-to-posts
Domain Path: /lang
*/
define('P2P_PLUGIN_VERSION', '1.4.3');
define('P2P_TEXTDOMAIN', 'posts-to-posts');
require dirname(__FILE__) . '/scb/load.php';
function _p2p_load()
{
$base = dirname(__FILE__);
load_plugin_textdomain(P2P_TEXTDOMAIN, '', basename($base) . '/lang');
_p2p_load_files("{$base}/core", array('storage', 'query', 'query-post', 'query-user', 'url-query', 'util', 'item', 'list', 'side', 'type-factory', 'type', 'directed-type', 'indeterminate-type', 'api', 'extra'));
P2P_Widget::init();
P2P_Shortcodes::init();
if (is_admin()) {
_p2p_load_files("{$base}/admin", array('mustache', 'factory', 'box-factory', 'box', 'fields', 'column-factory', 'column', 'tools'));
}
register_uninstall_hook(__FILE__, array('P2P_Storage', 'uninstall'));
}
scb_init('_p2p_load');
function _p2p_init()
{
// Safe hook for calling p2p_register_connection_type()
do_action('p2p_init');
}
add_action('wp_loaded', '_p2p_init');
function _p2p_load_files($dir, $files)
{
foreach ($files as $file) {
require_once "{$dir}/{$file}.php";
}
}