当前位置: 首页>>代码示例>>PHP>>正文


PHP wptouch_convert_to_class_name函数代码示例

本文整理汇总了PHP中wptouch_convert_to_class_name函数的典型用法代码示例。如果您正苦于以下问题:PHP wptouch_convert_to_class_name函数的具体用法?PHP wptouch_convert_to_class_name怎么用?PHP wptouch_convert_to_class_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wptouch_convert_to_class_name函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wptouch_get_theme_classes

function wptouch_get_theme_classes($extra_classes = array())
{
    $classes = $extra_classes;
    if (!is_network_admin() && wptouch_is_theme_active()) {
        $classes[] = 'active';
    }
    if (wptouch_is_theme_in_cloud()) {
        $classes[] = 'cloud';
    }
    if (wptouch_has_theme_tags()) {
        $tags = wptouch_get_theme_tags();
        foreach ($tags as $tag) {
            $classes[] = $tag;
        }
    }
    $classes[] = 'name-' . wptouch_convert_to_class_name(wptouch_get_theme_title());
    return $classes;
}
开发者ID:sumwander,项目名称:unyil,代码行数:18,代码来源:admin-themes.php

示例2: foreach

                    ?>
							<h3><?php 
                    echo $section->name;
                    ?>
 </h3>
							<ul class="padded">
							<?php 
                    foreach ($section->settings as $setting) {
                        ?>
								<li class="wptouch-setting<?php 
                        if ($setting->is_pro) {
                            echo " pro-setting";
                        }
                        ?>
" id="setting-<?php 
                        echo wptouch_convert_to_class_name($setting->name);
                        ?>
">
									<?php 
                        wptouch_admin_render_setting($setting);
                        ?>
								</li>
							<?php 
                    }
                    ?>
							</ul>

							<?php 
                    /* TODO: Deprecated
                    			if ( wptouch_section_has_visible_settings( $section ) ) { ?>
                    				<h3><?php echo $section->name; ?> </h3>
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:31,代码来源:admin-render.php

示例3: wptouch_the_theme_icon

?>
-container">

		<div class="item-information">
			<?php 
if (wptouch_get_theme_icon()) {
    ?>
			<div class="image-wrapper">
				<img src="<?php 
    wptouch_the_theme_icon();
    ?>
" alt="<?php 
    wptouch_the_theme_title();
    ?>
" id="<?php 
    echo wptouch_convert_to_class_name(wptouch_get_theme_title());
    ?>
" />
			</div><!-- image-wrapper -->
			<?php 
}
?>
			<h2>
				<?php 
wptouch_the_theme_title();
?>
				<?php 
if (!wptouch_is_theme_in_cloud() && is_network_admin() && wptouch_is_controlled_network()) {
    ?>
					<span class="installed"><?php 
    _e('Installed', 'wptouch-pro');
开发者ID:sumwander,项目名称:unyil,代码行数:31,代码来源:theme-browser-item.php

示例4: wptouch_the_theme_version

?>
 <span class="version"><?php 
wptouch_the_theme_version();
?>
</span>
			<?php 
if (wptouch_has_theme_tags()) {
    ?>
				<?php 
    $tags = wptouch_get_theme_tags();
    ?>
				<?php 
    foreach ($tags as $tag) {
        ?>
				<i class="wptouch-tooltip theme-tag tag-<?php 
        echo wptouch_convert_to_class_name($tag);
        ?>
" title="<?php 
        echo sprintf(__('This theme supports %s devices', 'wptouch-pro'), wptouch_get_translated_device_type($tag));
        ?>
"></i>
				<?php 
    }
    ?>
			<?php 
}
?>
		</h4>
		<h5>
			<?php 
echo sprintf(__('by %s', 'wptouch-pro'), wptouch_get_theme_author());
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:31,代码来源:theme-browser-item.php

示例5: wptouch_the_addon_preview_url

								<img src="<?php 
        wptouch_the_addon_preview_url();
        ?>
" alt="preview-image" />
							</div>
						<?php 
    }
    ?>
					</div>
					<!-- Carousel nav -->
				  	<a class="carousel-control left" href="#carousel-<?php 
    echo wptouch_convert_to_class_name(wptouch_get_addon_title());
    ?>
" data-slide="prev">&laquo;</a>
	  				<a class="carousel-control right" href="#carousel-<?php 
    echo wptouch_convert_to_class_name(wptouch_get_addon_title());
    ?>
" data-slide="next">&raquo;</a>
		 		 </div>
			</div>
			<div class="modal-footer">
				<button class="button" data-dismiss="modal" aria-hidden="true">Close</button>
			</div>
		</div>
	</div>
	<?php 
}
?>
	<div class="item-information">
		<?php 
if (wptouch_cloud_addon_update_available()) {
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:31,代码来源:extension-browser-item.php

示例6: get_icons_from_packs

 function get_icons_from_packs($setname)
 {
     $settings = $this->get_settings();
     $icon_packs = $this->get_available_icon_packs();
     $icons = array();
     if (isset($icon_packs[$setname])) {
         $pack = $icon_packs[$setname];
         $dir = @opendir($pack->location);
         $class_name = wptouch_convert_to_class_name($setname);
         if ($dir) {
             while ($f = readdir($dir)) {
                 if ($f == '.' || $f == '..' || $f == '.svn' || !$this->is_image_file($f)) {
                     continue;
                 }
                 $icon_info = new stdClass();
                 $icon_info->location = $pack->location . '/' . $f;
                 $icon_info->short_location = str_replace(WP_CONTENT_DIR, '', $icon_info->location);
                 $icon_info->url = $pack->url . '/' . $f;
                 $icon_info->name = $f;
                 $icon_info->set = $setname;
                 $icon_info->class_name = $class_name;
                 $short_name_array = explode('.', $f);
                 $short_name = $short_name_array[0];
                 $icon_info->short_name = $short_name;
                 // add image size information if the user has the GD library installed
                 if (function_exists('getimagesize')) {
                     $icon_info->image_size = getimagesize($pack->location . '/' . $f);
                 }
                 $icons[$f . '/' . $setname] = $icon_info;
             }
             closedir($dir);
         }
     }
     ksort($icons);
     return $icons;
 }
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:36,代码来源:class-wptouch-pro.php

示例7: wptouch_pro_copy_theme

function wptouch_pro_copy_theme($theme_name, $theme_location)
{
    global $wptouch_pro;
    require_once WPTOUCH_DIR . '/core/file-operations.php';
    $theme_location = WP_CONTENT_DIR . $theme_location;
    $theme_name = wptouch_convert_to_class_name($theme_name);
    $num = $wptouch_pro->get_theme_copy_num($theme_name);
    $copy_dest = WPTOUCH_CUSTOM_THEME_DIRECTORY . '/' . $theme_name . '-copy-' . $num;
    wptouch_create_directory_if_not_exist($copy_dest);
    $wptouch_pro->recursive_copy($theme_location, $copy_dest);
    $readme_file = $copy_dest . '/readme.txt';
    $readme_info = $wptouch_pro->load_file($readme_file);
    if ($readme_info) {
        if (preg_match('#Theme Name: (.*)#', $readme_info, $matches)) {
            $new_name = $matches[1] . ' Copy #' . $num;
            $readme_info = str_replace($matches[0], 'Theme Name: ' . $new_name, $readme_info);
            $f = fopen($readme_file, "w+t");
            if ($f) {
                fwrite($f, $readme_info);
                fclose($f);
            }
        }
        return array('name' => $new_name, 'location' => $copy_dest);
    } else {
        WPTOUCH_DEBUG(WPTOUCH_ERROR, "Unable to modify readme.txt file after copy");
        return false;
    }
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:28,代码来源:professional.php

示例8: wptouch_is_multisite_extension

function wptouch_is_multisite_extension()
{
    return wptouch_convert_to_class_name(wptouch_get_addon_title()) == 'multisite';
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:4,代码来源:admin-extensions.php

示例9: wptouch_pro_handle_admin_command

function wptouch_pro_handle_admin_command()
{
    global $wptouch_pro;
    if (isset($wptouch_pro->get['admin_command'])) {
        $admin_menu_nonce = $wptouch_pro->get['admin_menu_nonce'];
        if (wptouch_admin_menu_nonce_is_valid($admin_menu_nonce)) {
            // check user permissions
            if (current_user_can('switch_themes')) {
                switch ($wptouch_pro->get['admin_command']) {
                    case 'activate_theme':
                        WPTOUCH_DEBUG(WPTOUCH_INFO, 'Activating theme [' . $wptouch_pro->get['theme_name'] . ']');
                        $theme_to_activate = $wptouch_pro->get['theme_name'];
                        if ($theme_to_activate) {
                            $settings = $wptouch_pro->get_settings();
                            $paths = explode('/', ltrim(rtrim($wptouch_pro->get['theme_location'], '/'), '/'));
                            $settings->current_theme_name = $paths[count($paths) - 1];
                            unset($paths[count($paths) - 1]);
                            $settings->current_theme_location = '/' . implode('/', $paths);
                            $settings->current_theme_friendly_name = $wptouch_pro->get['theme_name'];
                            $settings->save();
                        }
                        break;
                    case 'activate_addon':
                        WPTOUCH_DEBUG(WPTOUCH_INFO, 'Activating add-on [' . $wptouch_pro->get['addon_name'] . ']');
                        $addon_to_activate = $wptouch_pro->get['addon_name'];
                        if ($addon_to_activate) {
                            $settings = $wptouch_pro->get_settings();
                            if (!isset($settings->active_addons[$addon_to_activate])) {
                                $paths = explode('/', ltrim(rtrim($wptouch_pro->get['addon_location'], DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR));
                                $addon_info = new stdClass();
                                $addon_info->addon_name = $paths[count($paths) - 1];
                                unset($paths[count($paths) - 1]);
                                $addon_info->location = '/' . implode('/', $paths);
                                $settings->active_addons[$addon_to_activate] = $addon_info;
                                $settings->save();
                            }
                        }
                        break;
                    case 'deactivate_addon':
                        WPTOUCH_DEBUG(WPTOUCH_INFO, 'Deactivating add-on [' . $wptouch_pro->get['addon_name'] . ']');
                        $addon_to_deactivate = $wptouch_pro->get['addon_name'];
                        if ($addon_to_deactivate) {
                            $settings = $wptouch_pro->get_settings();
                            if (isset($settings->active_addons[$addon_to_deactivate])) {
                                unset($settings->active_addons[$addon_to_deactivate]);
                                $settings->save();
                            }
                        }
                        break;
                    case 'copy_theme':
                        WPTOUCH_DEBUG(WPTOUCH_INFO, 'Copying theme [' . $wptouch_pro->get['theme_name'] . ']');
                        require_once WPTOUCH_DIR . '/core/file-operations.php';
                        $copy_src = WP_CONTENT_DIR . $wptouch_pro->get['theme_location'];
                        $theme_name = wptouch_convert_to_class_name($wptouch_pro->get['theme_name']);
                        $num = $wptouch_pro->get_theme_copy_num($theme_name);
                        $copy_dest = WPTOUCH_CUSTOM_THEME_DIRECTORY . '/' . $theme_name . '-copy-' . $num;
                        wptouch_create_directory_if_not_exist($copy_dest);
                        $wptouch_pro->recursive_copy($copy_src, $copy_dest);
                        $readme_file = $copy_dest . '/readme.txt';
                        $readme_info = $wptouch_pro->load_file($readme_file);
                        if ($readme_info) {
                            if (preg_match('#Theme Name: (.*)#', $readme_info, $matches)) {
                                $readme_info = str_replace($matches[0], 'Theme Name: ' . $matches[1] . ' Copy #' . $num, $readme_info);
                                $f = fopen($readme_file, "w+t");
                                if ($f) {
                                    fwrite($f, $readme_info);
                                    fclose($f);
                                }
                            }
                        } else {
                            WPTOUCH_DEBUG(WPTOUCH_ERROR, "Unable to modify readme.txt file after copy");
                        }
                        break;
                    case 'delete_theme':
                        WPTOUCH_DEBUG(WPTOUCH_INFO, 'Deleting theme [' . $wptouch_pro->get['theme_location'] . ']');
                        require_once WPTOUCH_DIR . '/core/file-operations.php';
                        $theme_location = WP_CONTENT_DIR . $wptouch_pro->get['theme_location'];
                        $wptouch_pro->recursive_delete($theme_location);
                        break;
                }
            }
        }
        $used_query_args = array('admin_menu_nonce', 'admin_command', 'theme_name', 'theme_location');
        header('Location: ' . remove_query_arg($used_query_args));
        die;
    }
}
开发者ID:patrickmetzger,项目名称:adthrive-touch,代码行数:87,代码来源:professional.php


注:本文中的wptouch_convert_to_class_name函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。