本文整理汇总了PHP中osc_add_filter函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_add_filter函数的具体用法?PHP osc_add_filter怎么用?PHP osc_add_filter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_add_filter函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: pop_body_class
function pop_body_class($echo = true)
{
/**
* Print body classes.
*
* @param string $echo Optional parameter.
* @return print string with all body classes concatenated
*/
osc_add_filter('pop_bodyClass', 'pop_add_body_class_construct');
$classes = osc_apply_filter('pop_bodyClass', array());
if ($echo && count($classes)) {
echo 'class="' . implode(' ', $classes) . '"';
} else {
return $classes;
}
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:16,代码来源:functions.php
示例2: actions
public function actions()
{
osc_register_plugin(osc_plugin_path(__FILE__), array('DLN_Classified', 'install'));
// Add admin menu
//$helper_premium = $this->get_helper( 'DLN_Helper_Premium' );
//osc_add_hook('admin_menu_init', array( $helper_premium, 'init_admin_menu' ) );
// Add google map drag n drop
$helper_google = $this->get_helper('DLN_Helper_Google');
osc_add_hook('user_form', array($helper_google, 'load_google_map'));
osc_add_hook('user_edit_completed', array($helper_google, 'insert_google_map'));
// For users premium
$helper_premium = $this->get_helper('DLN_Helper_Premium');
osc_add_hook('admin_users_table', array($helper_premium, 'admin_users_table'));
osc_add_filter('users_processing_row', array($helper_premium, 'users_processing_row'));
osc_add_hook('after_admin_html', array($helper_premium, 'users_html_modal'));
}
开发者ID:httvncoder,项目名称:151722441,代码行数:16,代码来源:index.php
示例3: fbc_extend_email
function fbc_extend_email($user)
{
$manager = User::newInstance();
$manager->dao->select();
$manager->dao->from(DB_TABLE_PREFIX . 't_facebook_connect');
$manager->dao->where('fk_i_user_id', $user['pk_i_id']);
$result = $manager->dao->get();
if ($result != false) {
if ($result->result() != array()) {
osc_add_filter('email_user_registration_title', 'fbc_extend_email_title');
}
}
}
开发者ID:oanav,项目名称:closetshare,代码行数:13,代码来源:index.php
示例4: osclasswizards_body_class
function osclasswizards_body_class($echo = true)
{
osc_add_filter('osclasswizards_bodyClass', 'osclasswizards_add_body_class_construct');
$classes = osc_apply_filter('osclasswizards_bodyClass', array());
if ($echo && count($classes)) {
echo 'class="' . implode(' ', $classes) . '"';
} else {
return $classes;
}
}
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:10,代码来源:functions.php
示例5: multilanguage_form_create_field
}
multilanguage_form_create_field($locale, $field);
if ($num_locales > 1) {
echo '</div>';
}
}
}
}
if (!OC_ADMIN) {
if (!function_exists('add_close_button_fm')) {
function add_close_button_fm($message)
{
return $message . '<a class="close">×</a>';
}
if (osc_version() < 300) {
osc_add_filter('flash_message_text', 'add_close_button_fm');
}
}
if (!function_exists('add_close_button_action')) {
function add_close_button_action()
{
echo '<script type="text/javascript">';
echo '$(".FlashMessage .close, .flashmessage .ico-close").click(function(){';
echo '$(this).parent().hide();';
echo '});';
echo '</script>';
}
osc_add_hook('footer', 'add_close_button_action');
}
}
if (!function_exists('get_gravatar')) {
开发者ID:blairmain,项目名称:theme-realestate,代码行数:31,代码来源:functions.php
示例6: osc_add_hook
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// meta tag robots
osc_add_hook('header', 'osclasswizards_nofollow_construct');
osclasswizards_add_body_class('user user-profile');
osc_add_hook('before-main', 'sidebar');
function sidebar()
{
osc_current_web_theme_path('user-sidebar.php');
}
osc_add_filter('meta_title_filter', 'custom_meta_title');
function custom_meta_title($data)
{
return __('Update account', OSCLASSWIZARDS_THEME_FOLDER);
}
osc_current_web_theme_path('header.php');
$osc_user = osc_user();
?>
<div class="row">
<?php
osc_current_web_theme_path('user-sidebar.php');
?>
<div class="col-sm-8 col-md-9">
<h1 class="title">
<?php
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:user-profile.php
示例7: osc_run_hook
/**
* Send email to non-reg user requesting item activation
*/
if( Session::newInstance()->_get('userId') == '' && $aItem['active']=='INACTIVE' ) {
osc_run_hook('hook_email_item_validation_non_register_user', $item);
} else if ( $aItem['active']=='INACTIVE' ) { // USER IS REGISTERED
osc_run_hook('hook_email_item_validation', $item);
} else if( Session::newInstance()->_get('userId') == '' ){ // USER IS NOT REGISTERED
osc_run_hook('hook_email_new_item_non_register_user', $item);
}
/**
* Send email to admin about the new item
*/
if (osc_notify_new_item()) {
osc_run_hook('hook_email_admin_new_item', $item);
}
}
}
if(osc_force_jpeg()) {
function osc_force_jpeg_extension($content) {
return 'jpg';
}
function osc_force_jpeg_mime($content) {
return 'image/jpeg';
}
osc_add_filter('upload_image_extension', 'osc_force_jpeg_extension');
osc_add_filter('upload_image_mime', 'osc_force_jpeg_mime');
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:30,代码来源:ItemActions.php
示例8: str_replace
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php
echo str_replace('_', '-', osc_current_user_locale());
?>
">
<head>
<?php
osc_current_web_theme_path('head.php');
?>
<?php
if (osc_is_search_page()) {
if (osc_count_items() == 0) {
osc_add_filter('meta_robots', 'meta_robots_custom');
function meta_robots_custom()
{
return 'noindex, nofollow';
}
}
}
?>
<meta name="robots" content="<?php
echo osc_apply_filter('meta_robots', 'index, follow');
?>
" />
<meta name="googlebot" content="<?php
echo osc_apply_filter('meta_robots', 'index, follow');
?>
" />
开发者ID:blairmain,项目名称:theme-realestate,代码行数:31,代码来源:header.php
示例9: payment_pro_admin_title
function payment_pro_admin_title()
{
switch (Params::getParam('route')) {
case 'payment-pro-admin-conf':
osc_remove_filter('admin_title', 'customPageTitle');
osc_add_filter('admin_title', 'payments_pro_admin_title_settings');
break;
case 'payment-pro-admin-prices':
osc_remove_filter('admin_title', 'customPageTitle');
osc_add_filter('admin_title', 'payments_pro_admin_title_settings');
break;
case 'payment-pro-admin-log':
osc_remove_filter('admin_title', 'customPageTitle');
osc_add_filter('admin_title', 'payments_pro_admin_title_log');
break;
default:
break;
}
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:19,代码来源:index.php
示例10: __construct
public function __construct()
{
osc_add_filter('datatable_payment_log_status_class', array(&$this, 'row_class'));
osc_add_filter('datatable_payment_log_status_text', array(&$this, '_status'));
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:5,代码来源:CheckoutInvoicesDataTable.php
示例11: osc_add_hook
<?php
// meta tag robots
osc_add_hook('header', 'pop_nofollow_construct');
osc_add_filter('meta_title_filter', 'pop_title_404');
function pop_title_404($title)
{
$header_text = __("Sorry but I can't find the page you're looking for", 'pop');
if (View::newInstance()->_get('pop_404_header_text') != '') {
$header_text = View::newInstance()->_get('pop_404_header_text');
}
return $header_text;
}
pop_add_body_class('_404');
osc_current_web_theme_path('header.php');
?>
<div class="form-container box">
<div class="header">
<?php
$header_text = __("Sorry but I can't find the page you're looking for", 'pop');
if (View::newInstance()->_get('pop_404_header_text') != '') {
$header_text = View::newInstance()->_get('pop_404_header_text');
}
?>
<h1><?php
echo $header_text;
?>
</h1>
</div>
<div class="form-content">
<div class="flashmessage-404">
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:404.php
示例12: feed_get_product_data
function feed_get_product_data($item)
{
$conn = getConnection();
$detail = $conn->osc_dbFetchResult("SELECT * FROM %st_item_products_attr WHERE fk_i_item_id = %d", DB_TABLE_PREFIX, $item['pk_i_id']);
$item['s_make'] = $detail['s_make'];
$item['s_model'] = $detail['s_model'];
return $item;
}
function feed_admin_menu()
{
echo '<h3><a href="#">Extra Feeds help</a></h3>
<ul>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'conf.php') . '">» ' . __('Help', 'extra_feeds') . '</a></li>
</ul>';
}
// This is needed in order to be able to activate the plugin
osc_register_plugin(osc_plugin_path(__FILE__), '');
// This is a hack to show a Uninstall link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", '');
osc_add_filter('admin_menu', 'feed_admin_menu');
osc_add_filter('feed_indeed', 'feed_indeed');
osc_add_filter('feed_trovit_houses', 'feed_trovit_houses');
osc_add_filter('feed_trovit_jobs', 'feed_trovit_jobs');
osc_add_filter('feed_trovit_products', 'feed_trovit_products');
osc_add_filter('feed_trovit_cars', 'feed_trovit_cars');
osc_add_filter('feed_google_jobs', 'feed_google_jobs');
osc_add_filter('feed_google_cars', 'feed_google_cars');
osc_add_filter('feed_oodle_jobs', 'feed_oodle_jobs');
osc_add_filter('feed_oodle_cars', 'feed_oodle_cars');
osc_add_filter('feed_oodle_realstate', 'feed_oodle_realstate');
开发者ID:oanav,项目名称:closetshare,代码行数:30,代码来源:index.php
示例13: osc_admin_render_plugin_url
<ul>
<li><a href="' . osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'conf.php') . '">» ' . __('Help', 'extra_feeds') . '</a></li>
</ul>';
}
if (osc_version() < 320) {
osc_add_hook('admin_menu', 'contact_counter_admin_menu');
} else {
osc_add_hook('admin_menu_init', 'contact_counter_admin_menu');
}
// routes
osc_add_route('stats-contact-counter', 'stats-contact-counter/(.+)/([0-9]+)', 'stats-contact-counter/{type_stat}/{id}', osc_plugin_folder(__FILE__) . 'admin/stats.php');
// custom title/header stats page
if (Params::getParam('page') == 'plugins' && Params::getParam('file') == 'contact_counter/admin/stats.php' || Params::getParam('route') == 'stats-contact-counter') {
osc_add_hook('admin_header', 'contact_counter_remove_title_header');
osc_add_hook('admin_page_header', 'contact_counter_PageHeader_stats');
osc_add_filter('admin_title', 'contact_counter_customPageTitle');
}
function contact_counter_remove_title_header()
{
osc_remove_hook('admin_page_header', 'customPageHeader');
}
function contact_counter_PageHeader_stats()
{
?>
<h1><?php
_e('Contact stats', 'contact_counter');
?>
<a href="#" class="btn ico ico-32 ico-help float-right"></a>
</h1>
<?php
}
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:index.php
示例14: osc_register_plugin
text-decoration: none !important;
}
a.MCtooltip:hover {
z-index:999;
}
a.MCtooltip span {
display: none;
}
a.MCtooltip:hover span {
display: block;
position: absolute;
top:1em; left:1em;
width:100%;
padding:5px;
background-color: #ffffff;
}
</style>
<?php
}
/**
* ADD HOOKS
*/
osc_register_plugin(osc_plugin_path(__FILE__), 'multicurrency_install');
osc_add_hook(osc_plugin_path(__FILE__) . "_uninstall", 'multicurrency_uninstall');
osc_add_hook('cron_hourly', 'multicurrency_get_data');
osc_add_hook('header', 'multicurrency_header');
osc_add_filter('item_price', 'multicurrency_add_prices');
开发者ID:bomvendador,项目名称:soroka_r,代码行数:30,代码来源:index.php
示例15: explode
$file = explode('/', Params::getParam('file'));
if ($file[0] == 'all_in_one') {
$title = '<i class="fa fa-line-chart"></i> All in One SEO Plugin';
}
return $title;
}
osc_add_filter('custom_plugin_title', 'allSeoTitle');
// This is needed in order to be able to activate the plugin
osc_register_plugin(osc_plugin_path(__FILE__), 'allSeo_call_after_install');
// This is a hack to show a Uninstall link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', 'allSeo_call_after_uninstall');
// This will add own meta
osc_add_filter('meta_title_filter', 'allSeo_title_filter');
osc_add_filter('meta_description_filter', 'allSeo_description_filter');
// This will add own keywords
osc_add_filter('meta_keywords_filter', 'allSeo_keywords_filter');
// Display help
function allSeo_conf()
{
osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/admin/listings.php');
}
// This is a hack to show a Configure link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . '_configure', 'allSeo_conf');
// Add font awesome style to header
function seo_font_awesome()
{
echo '<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />';
}
osc_add_hook('admin_header', 'seo_font_awesome');
function config_menu()
{
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:31,代码来源:index.php
示例16: osc_add_filter
<?php
osc_add_filter('meta_title_filter', 'seo_meta_title_filter');
osc_add_filter('meta_description_filter', 'seo_meta_description_filter');
osc_add_filter('meta_keywords_filter', 'seo_meta_keywords_filter');
function seo_meta_title_filter()
{
$location = Rewrite::newInstance()->get_location();
$section = Rewrite::newInstance()->get_section();
$text = '';
switch ($location) {
case 'item':
switch ($section) {
case 'item_add':
$text = __('Publish a listing') . seo_page_title_separator() . seo_page_title();
break;
case 'item_edit':
$text = __('Edit your listing') . seo_page_title_separator() . seo_page_title();
break;
case 'send_friend':
$text = __('Send to a friend') . seo_page_title_separator() . osc_item_title() . seo_page_title_separator() . seo_page_title();
break;
case 'contact':
$text = __('Contact seller') . seo_page_title_separator() . osc_item_title();
break;
default:
$detail = seo_get_row(osc_item_id());
if (empty($detail['seo_item_meta_title'])) {
$text = osc_item_title() . ' ' . osc_item_city() . seo_page_title_separator() . seo_page_title();
} else {
$text = $detail['seo_item_meta_title'];
开发者ID:bomvendador,项目名称:soroka_r,代码行数:31,代码来源:filters.php
示例17: mdh_emailmagick_admin_controller
function mdh_emailmagick_admin_controller()
{
if (preg_match('/^' . mdh_current_plugin_name() . '.*$/', Params::getParam("route"))) {
osc_add_hook("admin_header", function () {
osc_enqueue_script(mdh_current_plugin_name() . "_admin");
osc_enqueue_style(mdh_current_plugin_name() . "_admin", mdh_current_plugin_url("assets/css/admin.css"));
});
$filter = function ($string) {
return __("Madhouse EmailMagick", mdh_current_plugin_name());
};
// Page title (in <head />)
osc_add_filter("admin_title", $filter);
// Page title (in <h1 />)
osc_add_filter("custom_plugin_title", $filter);
osc_add_filter("admin_body_class", function ($classes) {
array_push($classes, "madhouse");
return $classes;
});
// Add a .row-offset to wrapping <div /> element.
osc_add_filter("render-wrapper", function ($string) {
return "row-offset";
});
$do = new Madhouse_EmailMagick_Controllers_Admin();
$do->doModel();
}
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:26,代码来源:index.php
示例18: exit
<?php
if (!defined('OC_ADMIN')) {
exit('Direct access is not allowed.');
}
osc_add_filter('admin_body_class', 'admin_modeCompact_class');
function admin_modeCompact_class($args)
{
$compactMode = osc_get_preference('compact_mode', 'modern_admin_theme');
if ($compactMode == true) {
$args[] = 'compact';
}
return $args;
}
osc_add_hook('ajax_admin_compactmode', 'modern_compactmode_actions');
function modern_compactmode_actions()
{
$compactMode = osc_get_preference('compact_mode', 'modern_admin_theme');
$modeStatus = array('compact_mode' => true);
if ($compactMode == true) {
$modeStatus['compact_mode'] = false;
}
osc_set_preference('compact_mode', $modeStatus['compact_mode'], 'modern_admin_theme');
echo json_encode($modeStatus);
}
function admin_header_favicons()
{
$favicons = array();
$favicons[] = array('rel' => 'shortcut icon', 'sizes' => '', 'href' => osc_current_admin_theme_url('images/favicon-48.png'));
$favicons[] = array('rel' => 'apple-touch-icon-precomposed', 'sizes' => '144x144', 'href' => osc_current_admin_theme_url('images/favicon-144.png'));
$favicons[] = array('rel' => 'apple-touch-icon-precomposed', 'sizes' => '114x114', 'href' => osc_current_admin_theme_url('images/favicon-114.png'));
开发者ID:naneri,项目名称:Osclass,代码行数:31,代码来源:functions.php
示例19: osc_add_hook
});
</script>
<?php
ItemForm::location_javascript_new('admin');
?>
<?php
if (osc_images_enabled_at_items()) {
ItemForm::photos_javascript();
}
?>
<?php
}
osc_add_hook('admin_header', 'customHead', 10);
$new_item = __get('new_item');
$actions = __get('actions');
osc_add_filter('render-wrapper', 'render_offset');
function render_offset()
{
return 'row-offset';
}
osc_current_admin_theme_path('parts/header.php');
?>
<div id="pretty-form">
<div class="grid-row no-bottom-margin">
<div class="row-wrapper">
<h2 class="render-title"><?php
echo customText('subtitle');
?>
</h2>
</div>
</div>
开发者ID:jmcclenon,项目名称:Osclass,代码行数:31,代码来源:frm.php
示例20: osc_add_hook
osc_add_hook('item_detail', 'voting_item_detail_user');
osc_add_hook('delete_item', 'voting_item_delete');
osc_add_hook('delete_user', 'voting_user_delete');
$file = '-';
if (Params::getParam('file') != '') {
$file = Params::getParam('file');
}
if (Params::getParam('page') == 'plugins' && strpos('voting/admin/help.php', $file) === 0) {
osc_add_filter('custom_plugin_title', 'voting_help_title');
}
function voting_help_title($title)
{
return __('Help', 'voting');
}
if (Params::getParam('page') == 'plugins' && strpos('voting/admin/conf.php', $file) === 0) {
osc_add_filter('custom_plugin_title', 'voting_conf_title');
}
function voting_conf_title($title)
{
return __('Configuration', 'voting');
}
/**
* ADMIN MENU
*/
if (osc_version() >= 300) {
osc_add_hook('admin_menu_init', 'voting_init_admin_menu');
} else {
osc_add_hook('admin_menu', 'voting_admin_menu');
}
function votingmenu()
{
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:31,代码来源:index.php
注:本文中的osc_add_filter函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论