/** * Load theme's infinite scroll annotation file, if present in the IS plugin. * The `setup_theme` action is used because the annotation files should be using `after_setup_theme` to register support for IS. * * As released in Jetpack 2.0, a child theme's parent wasn't checked for in the plugin's bundled support, hence the convoluted way the parent is checked for now. * * @uses is_admin, wp_get_theme, get_theme, get_current_theme, apply_filters * @action setup_theme * @return null */ function jetpack_load_infinite_scroll_annotation() { if (is_admin() && isset($_GET['page']) && 'jetpack' == $_GET['page']) { $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_theme(get_current_theme()); if (!is_a($theme, 'WP_Theme') && !is_array($theme)) { return; } /** * Filter the directory where all Infinite Scroll compat files are located. * * @since 2.0.0 * * @param string $var Infinite Scroll compat file URL. * @param string $theme['Stylesheet'] Theme directory URI. */ $customization_file = apply_filters('infinite_scroll_customization_file', dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Stylesheet']}.php", $theme['Stylesheet']); if (is_readable($customization_file)) { require_once $customization_file; } elseif (!empty($theme['Template'])) { $customization_file = dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Template']}.php"; if (is_readable($customization_file)) { require_once $customization_file; } } } }
/** * @expectedDeprecated get_theme * @expectedDeprecated get_themes */ function test_theme_sandbox() { $theme = get_theme('Sandbox'); $this->assertFalse( empty($theme) ); #echo gen_tests_array('theme', $theme); $this->assertEquals( 'Sandbox', $theme['Name'] ); $this->assertEquals( 'Sandbox', $theme['Title'] ); $this->assertEquals( 'A theme with powerful, semantic CSS selectors and the ability to add new skins.', $theme['Description'] ); $this->assertEquals( '<a href="http://andy.wordpress.com/">Andy Skelton</a> & <a href="http://www.plaintxt.org/">Scott Allan Wallick</a>', $theme['Author'] ); $this->assertEquals( '0.6.1-wpcom', $theme['Version'] ); $this->assertEquals( 'sandbox', $theme['Template'] ); $this->assertEquals( 'sandbox', $theme['Stylesheet'] ); $template_files = $theme['Template Files']; $this->assertEquals( $this->theme_root.'/sandbox/functions.php', reset( $template_files ) ); $this->assertEquals( $this->theme_root.'/sandbox/index.php', next( $template_files ) ); $stylesheet_files = $theme['Stylesheet Files']; $this->assertEquals( $this->theme_root.'/sandbox/style.css', reset( $stylesheet_files ) ); $this->assertEquals( $this->theme_root.'/sandbox', $theme['Template Dir'] ); $this->assertEquals( $this->theme_root.'/sandbox', $theme['Stylesheet Dir'] ); $this->assertEquals( 'publish', $theme['Status'] ); $this->assertEquals( '', $theme['Parent Theme'] ); }
function w3tc_get_current_theme() { global $wp_version; if (version_compare($wp_version, '3.4', '>=')) { return wp_get_theme(); } return get_theme(get_current_theme()); }
/** * @expectedDeprecated get_theme * @expectedDeprecated get_themes */ function test_get_theme() { $themes = get_themes(); foreach (array_keys($themes) as $name) { $theme = get_theme($name); // WP_Theme implements ArrayAccess. Even ArrayObject returns false for is_array(). $this->assertFalse( is_array( $theme ) ); $this->assertInstanceOf( 'WP_Theme', $theme ); $this->assertEquals($theme, $themes[$name]); } }
function xpress_ThemeTemplate($template) { global $xpress_config; $theme = $xpress_config->theme_select; $theme = get_theme($theme); if (empty($theme)) { return $template; } return $theme['Template']; }
function menuimg($gfile) { $ThemeSel = get_theme(); if (file_exists("themes/{$ThemeSel}/images/menu/{$gfile}")) { $menuimg = "themes/{$ThemeSel}/images/menu/{$gfile}"; } else { $menuimg = "modules/Your_Account/images/{$gfile}"; } return $menuimg; }
/** * @ticket 10959 * @ticket 11216 * @expectedDeprecated get_theme * @expectedDeprecated get_themes */ function test_page_templates() { $theme = get_theme('Page Template Theme'); $this->assertNotEmpty($theme); switch_theme($theme['Template'], $theme['Stylesheet']); $this->assertEqualSetsWithIndex(array('Top Level' => 'template-top-level.php', 'Sub Dir' => 'subdir/template-sub-dir.php', 'This Template Header Is On One Line' => 'template-header.php'), get_page_templates()); $theme = wp_get_theme('page-templates'); $this->assertNotEmpty($theme); switch_theme($theme['Template'], $theme['Stylesheet']); $this->assertEqualSetsWithIndex(array('Top Level' => 'template-top-level.php', 'Sub Dir' => 'subdir/template-sub-dir.php', 'This Template Header Is On One Line' => 'template-header.php'), get_page_templates()); }
/** * @ticket 10959 * @ticket 11216 */ function test_page_templates() { $theme = get_theme('Page Template Theme'); $this->assertFalse(empty($theme)); switch_theme($theme['Template'], $theme['Stylesheet']); $templates = get_page_templates(); $this->assertEquals(3, count($templates)); $this->assertEquals("template-top-level.php", $templates['Top Level']); $this->assertEquals("subdir/template-sub-dir.php", $templates['Sub Dir']); $this->assertEquals("template-header.php", $templates['This Template Header Is On One Line']); }
function get_template($template) { $theme = $this->get_theme(); if (empty($theme)) { return $template; } $theme = get_theme($theme); if (empty($theme)) { return $template; } // Don't let people peek at unpublished themes. if (isset($theme['Status']) && $theme['Status'] != 'publish') { return $template; } return $theme['Template']; }
function menu($mainlink) { global $module_name; OpenTable(); $ThemeSel = get_theme(); if (file_exists("themes/{$ThemeSel}/images/link-logo.gif")) { echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"themes/{$ThemeSel}/images/link-logo.gif\" border=\"0\" alt=\"\"></a><br><br>"; } else { echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"modules/{$module_name}/images/link-logo.gif\" border=\"0\" alt=\"\"></a><br><br>"; } echo "<form action=\"modules.php?name={$module_name}&l_op=search&query={$query}\" method=\"post\">" . "<font class=\"content\"><input type=\"text\" size=\"25\" name=\"query\"> <input type=\"submit\" value=\"" . _SEARCH . "\"></font>" . "</form>"; echo "<font class=\"content\">[ "; if ($mainlink > 0) { echo "<a href=\"modules.php?name={$module_name}\">" . _LINKSMAIN . "</a> | "; } echo "<a href=\"modules.php?name={$module_name}&l_op=AddLink\">" . _ADDLINK . "</a>" . " | <a href=\"modules.php?name={$module_name}&l_op=NewLinks\">" . _NEW . "</a>" . " | <a href=\"modules.php?name={$module_name}&l_op=MostPopular\">" . _POPULAR . "</a>" . " | <a href=\"modules.php?name={$module_name}&l_op=TopRated\">" . _TOPRATED . "</a>" . " | <a href=\"modules.php?name={$module_name}&l_op=RandomLink\">" . _RANDOM . "</a> ]" . "</font></center>"; CloseTable(); }
function SERVICE_CMSCSS_cpgnuke() { global $include_path, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $thename, $cms_mode, $css, $row_colors, $jz_MenuItem, $jz_MenuItemHover, $jz_MenuItemLeft, $jz_MainItemHover, $jz_MenuSplit; echo "<style type=\"text/css\">" . ".jz_row1 { background-color:{$bgcolor1}; }" . ".jz_row2 { background-color:{$bgcolor2}; }" . ".and_head1 { background-color:{$bgcolor2}; }" . ".and_head2 { background-color:{$bgcolor1}; }" . "</style>"; // Now let's set the style sheet for CMS stuff $thename = @get_theme(); $_SESSION['cms-style'] = "themes/" . $thename . "/style/style.css"; $_SESSION['cms-theme-data'] = urlencode($bgcolor1 . "|" . $bgcolor2); $row_colors = array('jz_row2', 'jz_row1'); $jz_MenuItemHover = "jz_row2"; $jz_MenuItem = "jz_row1"; $jz_MenuItemLeft = "jzMenuItemLeft"; $jz_MenuSplit = "jzMenuSplit"; $jz_MainItemHover = "jzMainItemHover"; // Now let's set the CSS $css = $include_path . "style/cms-theme/default.php"; return $css; }
/** * Load theme's infinite scroll annotation file, if present in the IS plugin. * The `setup_theme` action is used because the annotation files should be using `after_setup_theme` to register support for IS. * * As released in Jetpack 2.0, a child theme's parent wasn't checked for in the plugin's bundled support, hence the convoluted way the parent is checked for now. * * @uses is_admin, wp_get_theme, get_theme, get_current_theme, apply_filters * @action setup_theme * @return null */ function jetpack_load_infinite_scroll_annotation() { if (is_admin() && isset($_GET['page']) && 'jetpack' == $_GET['page']) { $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_theme(get_current_theme()); if (!is_a($theme, 'WP_Theme') && !is_array($theme)) { return; } $customization_file = apply_filters('infinite_scroll_customization_file', dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Stylesheet']}.php", $theme['Stylesheet']); if (is_readable($customization_file)) { require_once $customization_file; } elseif (!empty($theme['Template'])) { $customization_file = dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Template']}.php"; if (is_readable($customization_file)) { require_once $customization_file; } } } }
function head() { global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle; $ThemeSel = get_theme(); include "themes/{$ThemeSel}/theme.php"; echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"; echo "<html>\n"; echo "<head>\n"; echo "<title>{$sitename} {$pagetitle}</title>\n"; include "includes/meta.php"; include "includes/javascript.php"; if (file_exists("themes/{$ThemeSel}/images/favicon.ico")) { echo "<link REL=\"shortcut icon\" HREF=\"themes/{$ThemeSel}/images/favicon.ico\" TYPE=\"image/x-icon\">\n"; } echo "<LINK REL=\"StyleSheet\" HREF=\"themes/{$ThemeSel}/style/style.css\" TYPE=\"text/css\">\n\n\n"; include "includes/my_header.php"; echo "\n\n\n</head>\n\n"; themeheader(); }
function downl_menu_tpl($maindownload) { global $user_adddownload, $module_name; OpenTable(); $ThemeSel = get_theme(); if (file_exists("themes/{$ThemeSel}/images/down-logo.gif")) { echo "<br /><div align=\"center\"><a href=\"" . getlink() . "\"><img src=\"themes/{$ThemeSel}/images/down-logo.gif\" border=\"0\" alt=\"\" /></a><br /><br />"; } else { echo "<br /><div align=\"center\"><a href=\"" . getlink() . "\"><img src=\"modules/{$module_name}/images/down-logo.gif\" border=\"0\" alt=\"\" /></a><br /><br />"; } echo "<form action=\"" . getlink("&d_op=search") . "\" method=\"post\"><input type=\"text\" size=\"25\" name=\"query\" /> <input type=\"submit\" value=\"" . _SEARCH . "\" /></form>" . "<font class=\"content\">[ "; if ($maindownload > 0) { echo "<a href=\"" . getlink() . "\">" . _DOWNLOADSMAIN . "</a> | "; } if ($user_adddownload) { echo "<a href=\"" . getlink("&d_op=AddDownload") . "\">" . _ADDDOWNLOAD . "</a> | "; } echo "<a href=\"" . getlink("&d_op=NewDownloads") . "\">" . _NEW . "</a>" . " | <a href=\"" . getlink("&d_op=MostPopular") . "\">" . _POPULAR . "</a>" . " | <a href=\"" . getlink("&d_op=TopRated") . "\">" . _TOPRATED . "</a> ]" . "</font></div>"; CloseTable(); }
/** * get_themes * this looks in /themes and pulls all of the * theme.cfg.php files it can find and returns an * array of the results */ function get_themes() { /* Open the themes dir and start reading it */ $handle = opendir(AmpConfig::get('prefix') . '/themes'); if (!is_resource($handle)) { debug_event('theme', 'Failed to open /themes directory', 2); return array(); } $results = array(); while (($f = readdir($handle)) !== false) { debug_event('theme', "Checking {$f}", 5); $cfg = get_theme($f); if ($cfg !== null) { $results[$cfg['name']] = $cfg; } } // end while directory // Sort by the theme name ksort($results); return $results; }
function menu($maindownload) { global $prefix, $user_adddownload, $module_name, $query; OpenTable(); $ThemeSel = get_theme(); if (file_exists("themes/{$ThemeSel}/images/down-logo.gif")) { echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"themes/{$ThemeSel}/images/down-logo.gif\" border=\"0\" alt=\"\"></a><br><br>"; } else { echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"modules/{$module_name}/images/down-logo.gif\" border=\"0\" alt=\"\"></a><br><br>"; } echo "<form action=\"modules.php?name={$module_name}&d_op=search&query={$query}\" method=\"post\">" . "<font class=\"content\"><input type=\"text\" size=\"25\" name=\"query\"> <input type=\"submit\" value=\"" . _SEARCH . "\"></font>" . "</form>"; echo "<font class=\"content\">[ "; if ($maindownload > 0) { echo "<a href=\"modules.php?name={$module_name}\">" . _DOWNLOADSMAIN . "</a> | "; } if ($user_adddownload == 1) { echo "<a href=\"modules.php?name={$module_name}&d_op=AddDownload\">" . _ADDDOWNLOAD . "</a>" . " | "; } echo "<a href=\"modules.php?name={$module_name}&d_op=NewDownloads\">" . _NEW . "</a>" . " | <a href=\"modules.php?name={$module_name}&d_op=MostPopular\">" . _POPULAR . "</a>" . " | <a href=\"modules.php?name={$module_name}&d_op=TopRated\">" . _TOPRATED . "</a> ]" . "</font></center>"; CloseTable(); }
function my_scripts() { if (!is_admin()) { $theme = get_theme(get_current_theme()); $css_loc = CHILD_URL . '/lib/css/'; // CSS wp_register_style('flexslide', $css_loc . 'flexslider.css', array(), $theme['Version'], 'screen'); wp_register_style('i140', $css_loc . '1140.css', array(), $theme['Version'], 'screen'); //wp_register_style('ie',$css_loc.'ie.css', array(), $theme['Version'], 'screen'); wp_enqueue_style('i140'); //wp_enqueue_style('ie'); wp_enqueue_style('flexslide'); // Javascripts $js_loc = CHILD_URL . '/lib/js/'; wp_register_script('flexslider', $js_loc . 'jquery.flexslider-min.js', array('jquery'), '1.8', false); wp_register_script('modernizr', $js_loc . 'modernizr.custom.97724.js', array('jquery'), '97724', false); wp_register_script('slide25', $js_loc . 'slide25.js', array('jquery'), '1.0', false); wp_enqueue_script('modernizr'); wp_enqueue_script('flexslider'); wp_enqueue_script('slide25'); } }
function themearticle($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) { global $admin, $sid, $tipath; $ThemeSel = get_theme(); if (file_exists("themes/{$ThemeSel}/images/topics/{$topicimage}")) { $t_image = "themes/{$ThemeSel}/images/topics/{$topicimage}"; } else { $t_image = "{$tipath}{$topicimage}"; } $posted = "" . _POSTEDON . " {$datetime} " . _BY . " "; $posted .= get_author($aid); if (!empty($notes)) { $notes = "<br><br><b>" . _NOTE . "</b> <i>{$notes}</i>\n"; } else { $notes = ""; } if ("{$aid}" == "{$informant}") { $content = "{$thetext}{$notes}\n"; } else { if (!empty($informant)) { $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username={$informant}\">{$informant}</a> "; } else { $content = "{$anonymous} "; } $content .= "" . _WRITES . " <i>\"{$thetext}\"</i>{$notes}\n"; } $tmpl_file = "themes/3D-Fantasy/story_page.html"; $thefile = implode("", file($tmpl_file)); $thefile = addslashes($thefile); $thefile = "\$r_file=\"" . $thefile . "\";"; eval($thefile); print $r_file; }
function jetpack_infinite_scroll_more_info() { $support_text = sprintf(__('If you are a theme author, you can learn about adding support for Infinite Scroll at <a href="%1$s">%1$s</a>.', 'jetpack'), 'http://jetpack.me/support/infinite-scroll/'); ?> <?php if (!Jetpack::is_active() || Jetpack::is_active() && current_theme_supports('infinite-scroll')) { ?> <p><?php esc_html_e('When you write great content, all you really want is people to find it, right?', 'jetpack'); ?> </p> <p><?php esc_html_e("With the Infinite Scroll module and a supported theme, that's exactly what happens. Instead of the old way of navigating down a page by scrolling and then clicking a link to get to the next page, waiting for a page refresh—the document model of the web—infinite scrolling pulls the next set of posts automatically into view when the reader approaches the bottom of the page, more like an application.", 'jetpack'); ?> </p> <?php } else { ?> <p><?php echo esc_html(sprintf(__("At this time, your theme, %s, doesn't support Infinite Scroll. Unlike other Jetpack modules, Infinite Scroll needs information from your theme to function properly.", 'jetpack'), function_exists('wp_get_theme') ? wp_get_theme()->Name : get_current_theme())); ?> </p> <p><?php esc_html_e("Until your theme supports Infinite Scroll, you won't be able to activate this module.", 'jetpack'); ?> </p> <?php if (current_user_can('update_themes')) { ob_start(); theme_update_available(function_exists('wp_get_theme') ? wp_get_theme() : (object) get_theme(get_current_theme())); $theme_update_available = ob_get_clean(); if (!empty($theme_update_available)) { ?> <p><?php printf(__('There is an update available for your theme. You may wish to check if this update adds Infinite Scroll support by visiting the <a href="%s">WordPress Updates</a> page.', 'jetpack'), esc_url(admin_url('update-core.php'))); ?> </p> <?php } else { ?> <p><?php echo $support_text; ?> </p> <?php } ?> <?php } else { ?> <p><?php echo $support_text; ?> </p> <?php } ?> <?php } }
$r_options .= "&mode={$cookie['4']}"; } if (isset($cookie[5])) { $r_options .= "&order={$cookie['5']}"; } if (isset($cookie[6])) { $r_options .= "&thold={$cookie['6']}"; } OpenTable(); echo "<center><font class=\"title\"><b>" . _ACTIVETOPICS . "</b></font><br>\n" . "<font class=\"content\">" . _CLICK2LIST . "</font><br><br>\n" . "<form action=\"modules.php?name=Search\" method=\"post\">" . "<input type=\"name\" name=\"query\" size=\"30\"> " . "<input type=\"submit\" value=\"" . _SEARCH . "\">" . "</form></center><br><br>"; while ($row = $db->sql_fetchrow($result)) { $topicid = intval($row['topicid']); $topicname = stripslashes($row['topicname']); $topicimage = stripslashes($row['topicimage']); $topictext = stripslashes(check_html($row['topictext'], "nohtml")); $ThemeSel = get_theme(); if (@file_exists("themes/{$ThemeSel}/images/topics/{$topicimage}")) { $t_image = "themes/{$ThemeSel}/images/topics/{$topicimage}"; } else { $t_image = "{$tipath}{$topicimage}"; } $res = $db->sql_query("SELECT counter FROM " . $prefix . "_stories WHERE topic='{$topicid}'"); $numrows = $db->sql_numrows($res); $reads = 0; while ($counting = $db->sql_fetchrow($res)) { $ccounter = $counting[counter]; $reads = $reads + $ccounter; } title($topictext); echo "<table border=\"1\" width=\"100%\" align=\"center\" cellpadding=\"2\">\n" . "<tr><td valign=\"top\" width='25%'>\n" . "<a href=\"modules.php?name=News&new_topic={$topicid}\"><img src=\"{$t_image}\" border=\"0\" alt=\"{$topictext}\" title=\"{$topictext}\" hspace='5' vspace='5'></a><br><br>\n" . "<font class=\"content\">\n" . "<big><strong>·</strong></big> <b>" . _TOPIC . ":</b> {$topictext}<br>\n" . "<big><strong>·</strong></big> <b>" . _TOTNEWS . ":</b> {$numrows}<br>\n" . "<big><strong>·</strong></big> <b>" . _TOTREADS . ":</b> {$reads}</font>\n" . "</td>\n" . "<td valign='top'>"; $result2 = $db->sql_query("SELECT sid, catid, title FROM " . $prefix . "_stories WHERE topic='{$topicid}' ORDER BY sid DESC LIMIT 0,10");
function bws_add_menu_render() { global $wpdb, $wpmu, $wp_version, $bws_plugin_info; $error = $message = $bwsmn_form_email = ''; $bws_donate_link = 'https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10&product_id=13'; if (!function_exists('is_plugin_active_for_network')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $bws_plugins = array('captcha/captcha.php' => array('name' => 'Captcha', 'description' => 'Plugin intended to prove that the visitor is a human being and not a spam robot.', 'link' => 'http://bestwebsoft.com/plugin/captcha-plugin/?k=d678516c0990e781edfb6a6c874f0b8a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/captcha-plugin/?k=d678516c0990e781edfb6a6c874f0b8a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Captcha+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=captcha.php', 'pro_version' => 'captcha-pro/captcha_pro.php'), 'contact-form-plugin/contact_form.php' => array('name' => 'Contact form', 'description' => 'Add Contact Form to your WordPress website.', 'link' => 'http://bestwebsoft.com/plugin/contact-form/?k=012327ef413e5b527883e031d43b088b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/contact-form/?k=012327ef413e5b527883e031d43b088b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Contact+Form+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=contact_form.php', 'pro_version' => 'contact-form-pro/contact_form_pro.php'), 'facebook-button-plugin/facebook-button-plugin.php' => array('name' => 'Facebook Like Button', 'description' => 'Allows you to add the Follow and Like buttons the easiest way.', 'link' => 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/?k=05ec4f12327f55848335802581467d55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/?k=05ec4f12327f55848335802581467d55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Facebook+Like+Button+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=facebook-button-plugin.php', 'pro_version' => 'facebook-button-pro/facebook-button-pro.php'), 'twitter-plugin/twitter.php' => array('name' => 'Twitter', 'description' => 'Allows you to add the Twitter "Follow" and "Like" buttons the easiest way.', 'link' => 'http://bestwebsoft.com/plugin/twitter-plugin/?k=f8cb514e25bd7ec4974d64435c5eb333&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/twitter-plugin/?k=f8cb514e25bd7ec4974d64435c5eb333&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Twitter+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=twitter.php', 'pro_version' => 'twitter-pro/twitter-pro.php'), 'portfolio/portfolio.php' => array('name' => 'Portfolio', 'description' => 'Allows you to create a page with the information about your past projects.', 'link' => 'http://bestwebsoft.com/plugin/portfolio-plugin/?k=1249a890c5b7bba6bda3f528a94f768b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/portfolio-plugin/?k=1249a890c5b7bba6bda3f528a94f768b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Portfolio+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=portfolio.php'), 'gallery-plugin/gallery-plugin.php' => array('name' => 'Gallery', 'description' => 'Allows you to implement a Gallery page into your website.', 'link' => 'http://bestwebsoft.com/plugin/gallery-plugin/?k=2da21c0a64eec7ebf16337fa134c5f78&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/gallery-plugin/?k=2da21c0a64eec7ebf16337fa134c5f78&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Gallery+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=gallery-plugin.php', 'pro_version' => 'gallery-plugin-pro/gallery-plugin-pro.php'), 'adsense-plugin/adsense-plugin.php' => array('name' => 'Google AdSense', 'description' => 'Allows Google AdSense implementation to your website.', 'link' => 'http://bestwebsoft.com/plugin/google-adsense-plugin/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/google-adsense-plugin/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Adsense+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=adsense-plugin.php'), 'custom-search-plugin/custom-search-plugin.php' => array('name' => 'Custom Search', 'description' => 'Allows to extend your website search functionality by adding a custom post type.', 'link' => 'http://bestwebsoft.com/plugin/custom-search-plugin/?k=933be8f3a8b8719d95d1079d15443e29&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/custom-search-plugin/?k=933be8f3a8b8719d95d1079d15443e29&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Search+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=custom_search.php'), 'quotes-and-tips/quotes-and-tips.php' => array('name' => 'Quotes and Tips', 'description' => 'Allows you to implement quotes & tips block into your web site.', 'link' => 'http://bestwebsoft.com/plugin/quotes-and-tips/?k=5738a4e85a798c4a5162240c6515098d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/quotes-and-tips/?k=5738a4e85a798c4a5162240c6515098d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Quotes+and+Tips+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=quotes-and-tips.php'), 'google-sitemap-plugin/google-sitemap-plugin.php' => array('name' => 'Google Sitemap', 'description' => 'Allows you to add sitemap file to Google Webmaster Tools.', 'link' => 'http://bestwebsoft.com/plugin/google-sitemap-plugin/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/google-sitemap-plugin/?k=5202b2f5ce2cf85daee5e5f79a51d806&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+sitemap+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=google-sitemap-plugin.php', 'pro_version' => 'google-sitemap-pro/google-sitemap-pro.php'), 'updater/updater.php' => array('name' => 'Updater', 'description' => 'Allows you to update plugins and WP core.', 'link' => 'http://bestwebsoft.com/plugin/updater-plugin/?k=66f3ecd4c1912009d395c4bb30f779d1&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/updater-plugin/?k=66f3ecd4c1912009d395c4bb30f779d1&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=updater+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=updater-options', 'pro_version' => 'updater-pro/updater_pro.php'), 'custom-fields-search/custom-fields-search.php' => array('name' => 'Custom Fields Search', 'description' => 'Allows you to add website search any existing custom fields.', 'link' => 'http://bestwebsoft.com/plugin/custom-fields-search/?k=f3f8285bb069250c42c6ffac95ed3284&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/custom-fields-search/?k=f3f8285bb069250c42c6ffac95ed3284&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Fields+Search+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=custom_fields_search.php'), 'google-one/google-plus-one.php' => array('name' => 'Google +1', 'description' => 'Allows you to celebrate liked the article.', 'link' => 'http://bestwebsoft.com/plugin/google-plus-one/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/google-plus-one/?k=ce7a88837f0a857b3a2bb142f470853c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+%2B1+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=google-plus-one.php', 'pro_version' => 'google-one-pro/google-plus-one-pro.php'), 'relevant/related-posts-plugin.php' => array('name' => 'Relevant - Related Posts', 'description' => 'Allows you to display related posts with similar words in category, tags, title or by adding special meta key for posts.', 'link' => 'http://bestwebsoft.com/plugin/related-posts-plugin/?k=73fb737037f7141e66415ec259f7e426&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/related-posts-plugin/?k=73fb737037f7141e66415ec259f7e426&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Related+Posts+Plugin+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=related-posts-plugin.php'), 'contact-form-to-db/contact_form_to_db.php' => array('name' => 'Contact Form To DB', 'description' => 'Allows you to manage the messages that have been sent from your site.', 'link' => 'http://bestwebsoft.com/plugin/contact-form-to-db/?k=ba3747d317c2692e4136ca096a8989d6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/contact-form-to-db/?k=ba3747d317c2692e4136ca096a8989d6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Contact+Form+to+DB+bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=cntctfrmtdb_settings', 'pro_version' => 'contact-form-to-db-pro/contact_form_to_db_pro.php'), 'pdf-print/pdf-print.php' => array('name' => 'PDF & Print', 'description' => 'Allows you to create PDF and Print page with adding appropriate buttons to the content.', 'link' => 'http://bestwebsoft.com/plugin/pdf-print/?k=bfefdfb522a4c0ff0141daa3f271840c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/pdf-print/?k=bfefdfb522a4c0ff0141daa3f271840c&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=PDF+Print+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=pdf-print.php', 'pro_version' => 'pdf-print-pro/pdf-print-pro.php'), 'donate-button/donate.php' => array('name' => 'Donate', 'description' => 'Makes it possible to place donation buttons of various payment systems on your web page.', 'link' => 'http://bestwebsoft.com/plugin/donate/?k=a8b2e2a56914fb1765dd20297c26401b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/donate/?k=a8b2e2a56914fb1765dd20297c26401b&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Donate+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=donate.php'), 'post-to-csv/post-to-csv.php' => array('name' => 'Post To CSV', 'description' => 'The plugin allows to export posts of any types to a csv file.', 'link' => 'http://bestwebsoft.com/plugin/post-to-csv/?k=653aa55518ae17409293a7a894268b8f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/post-to-csv/?k=653aa55518ae17409293a7a894268b8f&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Post+To+CSV+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=post-to-csv.php'), 'google-shortlink/google-shortlink.php' => array('name' => 'Google Shortlink', 'description' => 'Allows you to get short links from goo.gl servise without leaving your site.', 'link' => 'http://bestwebsoft.com/plugin/google-shortlink/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/google-shortlink/?k=afcf3eaed021bbbbeea1090e16bc22db&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Google+Shortlink+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=gglshrtlnk_options'), 'htaccess/htaccess.php' => array('name' => 'Htaccess', 'description' => 'Allows controlling access to your website using the directives Allow and Deny.', 'link' => 'http://bestwebsoft.com/plugin/htaccess/?k=2b865fcd56a935d22c5c4f1bba52ed46&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/htaccess/?k=2b865fcd56a935d22c5c4f1bba52ed46&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Htaccess+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=htaccess.php'), 'google-captcha/google-captcha.php' => array('name' => 'Google Captcha (reCAPTCHA)', 'description' => 'Plugin intended to prove that the visitor is a human being and not a spam robot.', 'link' => 'http://bestwebsoft.com/plugin/google-captcha/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/google-captcha/?k=7b59fbe542acf950b29f3e020d5ad735&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Google+Captcha+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=google-captcha.php'), 'sender/sender.php' => array('name' => 'Sender', 'description' => 'You can send mails to all users or to certain categories of users.', 'link' => 'http://bestwebsoft.com/plugin/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Sender+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=sndr_settings'), 'subscriber/subscriber.php' => array('name' => 'Subscriber', 'description' => 'This plugin allows you to subscribe users for newsletters from your website.', 'link' => 'http://bestwebsoft.com/plugin/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Subscriber+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=sbscrbr_settings_page'), 'contact-form-multi/contact-form-multi.php' => array('name' => 'Contact Form Multi', 'description' => 'This plugin allows you to subscribe users for newsletters from your website.', 'link' => 'http://bestwebsoft.com/plugin/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Contact+Form+Multi+Bestwebsoft&plugin-search-input=Search+Plugins', 'settings' => ''), 'bws-google-maps/bws-google-maps.php' => array('name' => 'BestWebSoft Google Maps', 'description' => 'Easy to set up and insert Google Maps to your website.', 'link' => 'http://bestwebsoft.com/plugin/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=BestWebSoft+Google+Maps&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=bws-google-maps.php', 'pro_version' => 'bws-google-maps-pro/bws-google-maps-pro.php'), 'bws-google-analytics/bws-google-analytics.php' => array('name' => 'BestWebSoft Google Analytics', 'description' => 'Allows you to retrieve basic stats from Google Analytics account and add the tracking code to your blog.', 'link' => 'http://bestwebsoft.com/plugin/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'download' => 'http://bestwebsoft.com/plugin/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=BestWebSoft+Google+Analytics&plugin-search-input=Search+Plugins', 'settings' => 'admin.php?page=bws-google-analytics.php')); $bws_plugins_pro = array('gallery-plugin-pro/gallery-plugin-pro.php' => array('name' => 'Gallery Pro', 'description' => 'Allows you to implement as many galleries as you want into your website.', 'link' => 'http://bestwebsoft.com/plugin/gallery-pro/?k=382e5ce7c96a6391f5ffa5e116b37fe0&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/gallery-pro/?k=382e5ce7c96a6391f5ffa5e116b37fe0&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=gallery-plugin-pro.php'), 'contact-form-pro/contact_form_pro.php' => array('name' => 'Contact form Pro', 'description' => 'Allows you to implement a feedback form to a web-page or a post in no time.', 'link' => 'http://bestwebsoft.com/plugin/contact-form-pro/?k=773dc97bb3551975db0e32edca1a6d71&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/contact-form-pro/?k=773dc97bb3551975db0e32edca1a6d71&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=contact_form_pro.php'), 'captcha-pro/captcha_pro.php' => array('name' => 'Captcha Pro', 'description' => 'Allows you to implement a super security captcha form into web forms.', 'link' => 'http://bestwebsoft.com/plugin/captcha-pro/?k=ff7d65e55e5e7f98f219be9ed711094e&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/captcha-pro/?k=ff7d65e55e5e7f98f219be9ed711094e&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=captcha_pro.php'), 'updater-pro/updater_pro.php' => array('name' => 'Updater Pro', 'description' => 'Allows you to update plugins and WordPress core on your website.', 'link' => 'http://bestwebsoft.com/plugin/updater-pro/?k=cf633acbefbdff78545347fe08a3aecb&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/updater-pro?k=cf633acbefbdff78545347fe08a3aecb&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=updater-pro-options'), 'contact-form-to-db-pro/contact_form_to_db_pro.php' => array('name' => 'Contact form to DB Pro', 'description' => 'The plugin provides a unique opportunity to manage messages sent from your site via the contact form.', 'link' => 'http://bestwebsoft.com/plugin/contact-form-to-db-pro/?k=6ce5f4a9006ec906e4db643669246c6a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/contact-form-to-db-pro/?k=6ce5f4a9006ec906e4db643669246c6a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=cntctfrmtdbpr_settings'), 'google-sitemap-pro/google-sitemap-pro.php' => array('name' => 'Google Sitemap Pro', 'description' => 'Allows you to add sitemap file to Google Webmaster Tools.', 'link' => 'http://bestwebsoft.com/plugin/google-sitemap-pro/?k=7ea384a5cc36cb4c22741caa20dcd56d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/google-sitemap-pro/?k=7ea384a5cc36cb4c22741caa20dcd56d&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=google-sitemap-pro.php'), 'twitter-pro/twitter-pro.php' => array('name' => 'Twitter Pro', 'description' => 'Allows you to add the Twitter "Follow" and "Like" buttons the easiest way.', 'link' => 'http://bestwebsoft.com/plugin/twitter-pro/?k=63ecbf0cc9cebf060b5a3c9362299700&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/twitter-pro?k=63ecbf0cc9cebf060b5a3c9362299700&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=twitter-pro.php'), 'google-one-pro/google-plus-one-pro.php' => array('name' => 'Google +1 Pro', 'description' => 'Allows you to celebrate liked the article.', 'link' => 'http://bestwebsoft.com/plugin/google-plus-one-pro/?k=f4b0a62d155c9df9601a0531ad5bd832&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/google-plus-one-pro?k=f4b0a62d155c9df9601a0531ad5bd832&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=google-plus-one-pro.php'), 'facebook-button-pro/facebook-button-pro.php' => array('name' => 'Facebook Like Button Pro', 'description' => 'Allows you to add the Follow and Like buttons the easiest way.', 'link' => 'http://bestwebsoft.com/plugin/facebook-like-button-pro/?k=8da168e60a831cfb3525417c333ad275&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/facebook-like-button-pro?k=8da168e60a831cfb3525417c333ad275&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=facebook-button-pro.php'), 'pdf-print-pro/pdf-print-pro.php' => array('name' => 'PDF & Print Pro', 'description' => 'Allows you to create PDF and Print page with adding appropriate buttons to the content.', 'link' => 'http://bestwebsoft.com/plugin/pdf-print-pro/?k=fd43a0e659ddc170a9060027cbfdcc3a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/pdf-print-pro?k=fd43a0e659ddc170a9060027cbfdcc3a&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=pdf-print-pro.php'), 'bws-google-maps-pro/bws-google-maps-pro.php' => array('name' => 'BestWebSoft Google Maps Pro', 'description' => 'Easy to set up and insert Google Maps to your website.', 'link' => 'http://bestwebsoft.com/plugin/bws-google-maps-pro/?k=117c3f9fc17f2c83ef430a8a9dc06f56&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'purchase' => 'http://bestwebsoft.com/plugin/bws-google-maps-pro/?k=117c3f9fc17f2c83ef430a8a9dc06f56&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#purchase', 'settings' => 'admin.php?page=bws-google-maps-pro.php')); $all_plugins = get_plugins(); $active_plugins = get_option('active_plugins'); $recommend_plugins = array_diff_key($bws_plugins, $all_plugins); foreach ($bws_plugins as $key_plugin => $value_plugin) { if (!isset($all_plugins[$key_plugin]) && isset($bws_plugins[$key_plugin]['pro_version']) && isset($all_plugins[$bws_plugins[$key_plugin]['pro_version']])) { unset($recommend_plugins[$key_plugin]); } } foreach ($all_plugins as $key_plugin => $value_plugin) { if (!isset($bws_plugins[$key_plugin]) && !isset($bws_plugins_pro[$key_plugin])) { unset($all_plugins[$key_plugin]); } if (isset($bws_plugins[$key_plugin]) && isset($bws_plugins[$key_plugin]['pro_version']) && isset($all_plugins[$bws_plugins[$key_plugin]['pro_version']])) { unset($all_plugins[$key_plugin]); } } if (isset($_GET['action']) && 'system_status' == $_GET['action']) { $all_plugins = get_plugins(); $active_plugins = get_option('active_plugins'); $sql_version = $wpdb->get_var("SELECT VERSION() AS version"); $mysql_info = $wpdb->get_results("SHOW VARIABLES LIKE 'sql_mode'"); if (is_array($mysql_info)) { $sql_mode = $mysql_info[0]->Value; } if (empty($sql_mode)) { $sql_mode = __('Not set', 'bestwebsoft'); } if (ini_get('safe_mode')) { $safe_mode = __('On', 'bestwebsoft'); } else { $safe_mode = __('Off', 'bestwebsoft'); } if (ini_get('allow_url_fopen')) { $allow_url_fopen = __('On', 'bestwebsoft'); } else { $allow_url_fopen = __('Off', 'bestwebsoft'); } if (ini_get('upload_max_filesize')) { $upload_max_filesize = ini_get('upload_max_filesize'); } else { $upload_max_filesize = __('N/A', 'bestwebsoft'); } if (ini_get('post_max_size')) { $post_max_size = ini_get('post_max_size'); } else { $post_max_size = __('N/A', 'bestwebsoft'); } if (ini_get('max_execution_time')) { $max_execution_time = ini_get('max_execution_time'); } else { $max_execution_time = __('N/A', 'bestwebsoft'); } if (ini_get('memory_limit')) { $memory_limit = ini_get('memory_limit'); } else { $memory_limit = __('N/A', 'bestwebsoft'); } if (function_exists('memory_get_usage')) { $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' Mb', 'bestwebsoft'); } else { $memory_usage = __('N/A', 'bestwebsoft'); } if (is_callable('exif_read_data')) { $exif_read_data = __('Yes', 'bestwebsoft') . " ( V" . substr(phpversion('exif'), 0, 4) . ")"; } else { $exif_read_data = __('No', 'bestwebsoft'); } if (is_callable('iptcparse')) { $iptcparse = __('Yes', 'bestwebsoft'); } else { $iptcparse = __('No', 'bestwebsoft'); } if (is_callable('xml_parser_create')) { $xml_parser_create = __('Yes', 'bestwebsoft'); } else { $xml_parser_create = __('No', 'bestwebsoft'); } if (function_exists('wp_get_theme')) { $theme = wp_get_theme(); } else { $theme = get_theme(get_current_theme()); } if (function_exists('is_multisite')) { if (is_multisite()) { $multisite = __('Yes', 'bestwebsoft'); } else { $multisite = __('No', 'bestwebsoft'); } } else { $multisite = __('N/A', 'bestwebsoft'); } $site_url = get_option('siteurl'); $home_url = get_option('home'); $db_version = get_option('db_version'); $system_info = array('system_info' => '', 'active_plugins' => '', 'inactive_plugins' => ''); $system_info['system_info'] = array(__('Operating System', 'bestwebsoft') => PHP_OS, __('Server', 'bestwebsoft') => $_SERVER["SERVER_SOFTWARE"], __('Memory usage', 'bestwebsoft') => $memory_usage, __('MYSQL Version', 'bestwebsoft') => $sql_version, __('SQL Mode', 'bestwebsoft') => $sql_mode, __('PHP Version', 'bestwebsoft') => PHP_VERSION, __('PHP Safe Mode', 'bestwebsoft') => $safe_mode, __('PHP Allow URL fopen', 'bestwebsoft') => $allow_url_fopen, __('PHP Memory Limit', 'bestwebsoft') => $memory_limit, __('PHP Max Upload Size', 'bestwebsoft') => $upload_max_filesize, __('PHP Max Post Size', 'bestwebsoft') => $post_max_size, __('PHP Max Script Execute Time', 'bestwebsoft') => $max_execution_time, __('PHP Exif support', 'bestwebsoft') => $exif_read_data, __('PHP IPTC support', 'bestwebsoft') => $iptcparse, __('PHP XML support', 'bestwebsoft') => $xml_parser_create, __('Site URL', 'bestwebsoft') => $site_url, __('Home URL', 'bestwebsoft') => $home_url, '$_SERVER[HTTP_HOST]' => $_SERVER['HTTP_HOST'], '$_SERVER[SERVER_NAME]' => $_SERVER['SERVER_NAME'], __('WordPress Version', 'bestwebsoft') => $wp_version, __('WordPress DB Version', 'bestwebsoft') => $db_version, __('Multisite', 'bestwebsoft') => $multisite, __('Active Theme', 'bestwebsoft') => $theme['Name'] . ' ' . $theme['Version']); foreach ($all_plugins as $path => $plugin) { if (is_plugin_active($path)) { $system_info['active_plugins'][$plugin['Name']] = $plugin['Version']; } else { $system_info['inactive_plugins'][$plugin['Name']] = $plugin['Version']; } } } if (isset($_REQUEST['bwsmn_form_submit']) && check_admin_referer(plugin_basename(__FILE__), 'bwsmn_nonce_submit') || isset($_REQUEST['bwsmn_form_submit_custom_email']) && check_admin_referer(plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email')) { if (isset($_REQUEST['bwsmn_form_email'])) { $bwsmn_form_email = trim($_REQUEST['bwsmn_form_email']); if ($bwsmn_form_email == "" || !preg_match("/^((?:[a-z0-9']+(?:[a-z0-9\\-_\\.']+)?@[a-z0-9]+(?:[a-z0-9\\-\\.]+)?\\.[a-z]{2,5})[, ]*)+\$/i", $bwsmn_form_email)) { $error = __("Please enter a valid email address.", 'bestwebsoft'); } else { $email = $bwsmn_form_email; $bwsmn_form_email = ''; $message = __('Email with system info is sent to ', 'bestwebsoft') . $email; } } else { $email = '*****@*****.**'; $message = __('Thank you for contacting us.', 'bestwebsoft'); } if ($error == '') { $headers = 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\n"; $headers .= 'From: ' . get_option('admin_email'); $message_text = '<html><head><title>System Info From ' . $home_url . '</title></head><body> <h4>Environment</h4> <table>'; foreach ($system_info['system_info'] as $key => $value) { $message_text .= '<tr><td>' . $key . '</td><td>' . $value . '</td></tr>'; } $message_text .= '</table> <h4>Active Plugins</h4> <table>'; foreach ($system_info['active_plugins'] as $key => $value) { $message_text .= '<tr><td scope="row">' . $key . '</td><td scope="row">' . $value . '</td></tr>'; } $message_text .= '</table> <h4>Inactive Plugins</h4> <table>'; foreach ($system_info['inactive_plugins'] as $key => $value) { $message_text .= '<tr><td scope="row">' . $key . '</td><td scope="row">' . $value . '</td></tr>'; } $message_text .= '</table></body></html>'; $result = wp_mail($email, 'System Info From ' . $home_url, $message_text, $headers); if ($result != true) { $error = __("Sorry, email message could not be delivered.", 'bestwebsoft'); } } } ?> <div class="wrap"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2>BestWebSoft</h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=bws_plugins"><?php _e('Plugins', 'bestwebsoft'); ?> </a> <?php if ($wp_version >= '3.4') { ?> <a class="nav-tab<?php if (isset($_GET['action']) && 'themes' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=bws_plugins&action=themes"><?php _e('Themes', 'bestwebsoft'); ?> </a> <?php } ?> <a class="nav-tab<?php if (isset($_GET['action']) && 'system_status' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=bws_plugins&action=system_status"><?php _e('System status', 'bestwebsoft'); ?> </a> </h2> <?php if (!isset($_GET['action'])) { ?> <ul class="subsubsub"> <li><a <?php if (!isset($_GET['sub'])) { echo 'class="current" '; } ?> href="admin.php?page=bws_plugins"><?php _e('All', 'bestwebsoft'); ?> </a></li> | <li><a <?php if (isset($_GET['sub']) && 'installed' == $_GET['sub']) { echo 'class="current" '; } ?> href="admin.php?page=bws_plugins&sub=installed"><?php _e('Installed', 'bestwebsoft'); ?> </a></li> | <li><a <?php if (isset($_GET['sub']) && 'recommended' == $_GET['sub']) { echo 'class="current" '; } ?> href="admin.php?page=bws_plugins&sub=recommended"><?php _e('Recommended', 'bestwebsoft'); ?> </a></li> </ul> <div class="clear"></div> <?php if (isset($_GET['sub']) && 'installed' == $_GET['sub'] || !isset($_GET['sub'])) { ?> <h4 class="bws_installed"><?php _e('Installed plugins', 'bestwebsoft'); ?> </h4> <?php foreach ($all_plugins as $key_plugin => $value_plugin) { if (isset($bws_plugins_pro[$key_plugin])) { $key_plugin_explode = explode('-plugin-pro/', $key_plugin); if (isset($key_plugin_explode[1])) { $icon = $key_plugin_explode[0]; } else { $key_plugin_explode = explode('-pro/', $key_plugin); $icon = $key_plugin_explode[0]; } } elseif (isset($bws_plugins[$key_plugin])) { $key_plugin_explode = explode('-plugin/', $key_plugin); if (isset($key_plugin_explode[1])) { $icon = $key_plugin_explode[0]; } else { $key_plugin_explode = explode('/', $key_plugin); $icon = $key_plugin_explode[0]; } } if (in_array($key_plugin, $active_plugins) || is_plugin_active_for_network($key_plugin)) { ?> <?php if (isset($bws_plugins_pro[$key_plugin])) { ?> <div class="bws_product_box bws_exist_overlay"> <div class="bws_product"> <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?> </div> <div class="bws_product_content"> <div class="bws_product_icon"> <div class="bws_product_icon_pro"></div> <img src="<?php echo plugins_url("icons/", __FILE__) . $icon . '.png'; ?> "/> </div> <div class="bws_product_description"><?php echo $value_plugin["Description"]; ?> </div> </div> <div class="clear"></div> </div> <div class="bws_product_links"> <a href="<?php echo $bws_plugins_pro[$key_plugin]["link"]; ?> " target="_blank"><?php _e("Learn more", 'bestwebsoft'); ?> </a> <span> | </span> <a href="<?php echo $bws_plugins_pro[$key_plugin]["settings"]; ?> " target="_blank"><?php _e("Settings", 'bestwebsoft'); ?> </a> </div> </div> <?php } elseif (isset($bws_plugins[$key_plugin])) { ?> <div class="bws_product_box bws_product_free"> <div class="bws_product"> <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?> </div> <div class="bws_product_content"> <div class="bws_product_icon"> <img src="<?php echo plugins_url("icons/", __FILE__) . $icon . '.png'; ?> "/> </div> <div class="bws_product_description"><?php echo $bws_plugins[$key_plugin]["description"]; ?> </div> </div> <?php if (isset($bws_plugins[$key_plugin]['pro_version']) && isset($bws_plugins_pro[$bws_plugins[$key_plugin]['pro_version']])) { ?> <a class="bws_product_button" href="<?php echo $bws_plugins_pro[$bws_plugins[$key_plugin]['pro_version']]["purchase"]; ?> " target="_blank"> <?php _e('Go', 'bestwebsoft'); ?> <strong>PRO</strong> </a> <?php } else { ?> <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?> " target="_blank"> <strong><?php _e('DONATE', 'bestwebsoft'); ?> </strong> </a> <?php } ?> <div class="clear"></div> </div> <div class="bws_product_links"> <a href="<?php echo $bws_plugins[$key_plugin]["link"]; ?> " target="_blank"><?php _e("Learn more", 'bestwebsoft'); ?> </a> <span> | </span> <a href="<?php echo $bws_plugins[$key_plugin]["settings"]; ?> " target="_blank"><?php _e("Settings", 'bestwebsoft'); ?> </a> </div> </div> <?php } } else { if (isset($bws_plugins_pro[$key_plugin])) { ?> <div class="bws_product_box bws_product_deactivated"> <div class="bws_product"> <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?> </div> <div class="bws_product_content"> <div class="bws_product_icon"> <div class="bws_product_icon_pro"></div> <img src="<?php echo plugins_url("icons/", __FILE__) . $icon . '.png'; ?> "/> </div> <div class="bws_product_description"><?php echo $bws_plugins_pro[$key_plugin]["description"]; ?> </div> </div> <div class="clear"></div> </div> <div class="bws_product_links"> <a href="<?php echo $bws_plugins_pro[$key_plugin]["link"]; ?> " target="_blank"><?php _e("Learn more", 'bestwebsoft'); ?> </a> <span> | </span> <a class="bws_activate" href="plugins.php" title="<?php _e("Activate this plugin", 'bestwebsoft'); ?> " target="_blank"><?php _e("Activate", 'bestwebsoft'); ?> </a> </div> </div> <?php } elseif (isset($bws_plugins[$key_plugin])) { ?> <div class="bws_product_box bws_product_deactivated bws_product_free"> <div class="bws_product"> <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?> </div> <div class="bws_product_content"> <div class="bws_product_icon"> <img src="<?php echo plugins_url("icons/", __FILE__) . $icon . '.png'; ?> "/> </div> <div class="bws_product_description"><?php echo $bws_plugins[$key_plugin]["description"]; ?> </div> </div> <?php if (isset($bws_plugins[$key_plugin]['pro_version']) && isset($bws_plugins_pro[$bws_plugins[$key_plugin]['pro_version']])) { ?> <a class="bws_product_button" href="<?php echo $bws_plugins_pro[$bws_plugins[$key_plugin]['pro_version']]["purchase"]; ?> " target="_blank"> <?php _e('Go', 'bestwebsoft'); ?> <strong>PRO</strong> </a> <?php } else { ?> <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?> " target="_blank"> <strong><?php _e('DONATE', 'bestwebsoft'); ?> </strong> </a> <?php } ?> <div class="clear"></div> </div> <div class="bws_product_links"> <a href="<?php echo $bws_plugins[$key_plugin]["link"]; ?> " target="_blank"><?php _e("Learn more", 'bestwebsoft'); ?> </a> <span> | </span> <a class="bws_activate" href="plugins.php" title="<?php _e("Activate this plugin", 'bestwebsoft'); ?> " target="_blank"><?php _e("Activate", 'bestwebsoft'); ?> </a> </div> </div> <?php } } } } ?> <div class="clear"></div> <?php if (isset($_GET['sub']) && 'recommended' == $_GET['sub'] || !isset($_GET['sub'])) { ?> <h4 class="bws_recommended"><?php _e('Recommended plugins', 'bestwebsoft'); ?> </h4> <?php foreach ($recommend_plugins as $key_plugin => $value_plugin) { if (isset($bws_plugins_pro[$key_plugin])) { $key_plugin_explode = explode('-plugin-pro/', $key_plugin); if (isset($key_plugin_explode[1])) { $icon = $key_plugin_explode[0]; } else { $key_plugin_explode = explode('-pro/', $key_plugin); $icon = $key_plugin_explode[0]; } } elseif (isset($bws_plugins[$key_plugin])) { $key_plugin_explode = explode('-plugin/', $key_plugin); if (isset($key_plugin_explode[1])) { $icon = $key_plugin_explode[0]; } else { $key_plugin_explode = explode('/', $key_plugin); $icon = $key_plugin_explode[0]; } } ?> <div class="bws_product_box"> <div class="bws_product"> <div class="bws_product_title"><?php echo $value_plugin["name"]; ?> </div> <div class="bws_product_content"> <div class="bws_product_icon"> <?php if (isset($bws_plugins[$key_plugin]['pro_version']) && isset($bws_plugins_pro[$bws_plugins[$key_plugin]['pro_version']])) { ?> <div class="bws_product_icon_pro"></div> <?php } ?> <img src="<?php echo plugins_url("icons/", __FILE__) . $icon . '.png'; ?> "/> </div> <div class="bws_product_description"><?php echo $bws_plugins[$key_plugin]["description"]; ?> </div> </div> <?php if (isset($bws_plugins[$key_plugin]['pro_version']) && isset($bws_plugins_pro[$bws_plugins[$key_plugin]['pro_version']])) { ?> <a class="bws_product_button" href="<?php echo $bws_plugins_pro[$bws_plugins[$key_plugin]['pro_version']]["link"]; ?> " target="_blank"> <?php echo _e('Go', 'bestwebsoft'); ?> <strong>PRO</strong> </a> <?php } else { ?> <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?> " target="_blank"> <strong><?php echo _e('DONATE', 'bestwebsoft'); ?> </strong> </a> <?php } ?> </div> <div class="clear"></div> <div class="bws_product_links"> <a href="<?php echo $bws_plugins[$key_plugin]["link"]; ?> " target="_blank"><?php echo __("Learn more", 'bestwebsoft'); ?> </a> <span> | </span> <a href="<?php echo $bws_plugins[$key_plugin]["wp_install"]; ?> " target="_blank"><?php echo __("Install now", 'bestwebsoft'); ?> </a> </div> </div> <?php } } ?> <?php } elseif ('themes' == $_GET['action']) { ?> <div id="availablethemes"> <?php global $tabs, $tab, $paged, $type, $theme_field_defaults; include ABSPATH . 'wp-admin/includes/theme-install.php'; include ABSPATH . 'wp-admin/includes/class-wp-themes-list-table.php'; include ABSPATH . 'wp-admin/includes/class-wp-theme-install-list-table.php'; $theme_class = new WP_Theme_Install_List_Table(); $paged = $theme_class->get_pagenum(); $per_page = 36; $args = array('page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults); $args['author'] = 'bestwebsoft'; $args = apply_filters('install_themes_table_api_args_search', $args); $api = themes_api('query_themes', $args); if (is_wp_error($api)) { wp_die($api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __('Try again') . '</a>'); } $theme_class->items = $api->themes; $theme_class->set_pagination_args(array('total_items' => $api->info['results'], 'per_page' => $per_page, 'infinite_scroll' => true)); $themes = $theme_class->items; foreach ($themes as $theme) { ?> <div class="available-theme installable-theme"><?php global $themes_allowedtags; if (empty($theme)) { return; } $name = wp_kses($theme->name, $themes_allowedtags); $author = wp_kses($theme->author, $themes_allowedtags); $preview_title = sprintf(__('Preview “%s”'), $name); $preview_url = add_query_arg(array('tab' => 'theme-information', 'theme' => $theme->slug), self_admin_url('theme-install.php')); $actions = array(); $install_url = add_query_arg(array('action' => 'install-theme', 'theme' => $theme->slug), self_admin_url('update.php')); $update_url = add_query_arg(array('action' => 'upgrade-theme', 'theme' => $theme->slug), self_admin_url('update.php')); $status = 'install'; $installed_theme = wp_get_theme($theme->slug); if ($installed_theme->exists()) { if (version_compare($installed_theme->get('Version'), $theme->version, '=')) { $status = 'latest_installed'; } elseif (version_compare($installed_theme->get('Version'), $theme->version, '>')) { $status = 'newer_installed'; } else { $status = 'update_available'; } } switch ($status) { default: case 'install': $actions[] = '<a class="install-now" href="' . esc_url(wp_nonce_url($install_url, 'install-theme_' . $theme->slug)) . '" title="' . esc_attr(sprintf(__('Install %s'), $name)) . '">' . __('Install Now') . '</a>'; break; case 'update_available': $actions[] = '<a class="install-now" href="' . esc_url(wp_nonce_url($update_url, 'upgrade-theme_' . $theme->slug)) . '" title="' . esc_attr(sprintf(__('Update to version %s'), $theme->version)) . '">' . __('Update') . '</a>'; break; case 'newer_installed': case 'latest_installed': $actions[] = '<span class="install-now" title="' . esc_attr__('This theme is already installed and is up to date') . '">' . _x('Installed', 'theme') . '</span>'; break; } $actions[] = '<a class="install-theme-preview" href="' . esc_url($preview_url) . '" title="' . esc_attr(sprintf(__('Preview %s'), $name)) . '">' . __('Preview') . '</a>'; $actions = apply_filters('theme_install_actions', $actions, $theme); ?> <a class="screenshot install-theme-preview" href="<?php echo esc_url($preview_url); ?> " title="<?php echo esc_attr($preview_title); ?> "> <img src='<?php echo esc_url($theme->screenshot_url); ?> ' width='150' /> </a> <h3><?php echo $name; ?> </h3> <div class="theme-author"><?php printf(__('By %s'), $author); ?> </div> <div class="action-links"> <ul> <?php foreach ($actions as $action) { ?> <li><?php echo $action; ?> </li> <?php } ?> <li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details'); ?> </a></li> </ul> </div> <?php $theme_class->install_theme_info($theme); ?> </div> <?php } // end foreach $theme_names $theme_class->theme_installer(); ?> </div> <?php } elseif ('system_status' == $_GET['action']) { ?> <div class="updated fade" <?php if (!(isset($_REQUEST['bwsmn_form_submit']) || isset($_REQUEST['bwsmn_form_submit_custom_email'])) || $error != "") { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error" <?php if ("" == $error) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <h3><?php _e('System status', 'bestwebsoft'); ?> </h3> <div class="inside"> <table class="bws_system_info"> <thead><tr><th><?php _e('Environment', 'bestwebsoft'); ?> </th><td></td></tr></thead> <tbody> <?php foreach ($system_info['system_info'] as $key => $value) { ?> <tr> <td scope="row"><?php echo $key; ?> </td> <td scope="row"><?php echo $value; ?> </td> </tr> <?php } ?> </tbody> </table> <table class="bws_system_info"> <thead><tr><th><?php _e('Active Plugins', 'bestwebsoft'); ?> </th><th></th></tr></thead> <tbody> <?php foreach ($system_info['active_plugins'] as $key => $value) { ?> <tr> <td scope="row"><?php echo $key; ?> </td> <td scope="row"><?php echo $value; ?> </td> </tr> <?php } ?> </tbody> </table> <table class="bws_system_info"> <thead><tr><th><?php _e('Inactive Plugins', 'bestwebsoft'); ?> </th><th></th></tr></thead> <tbody> <?php if (!empty($system_info['inactive_plugins'])) { foreach ($system_info['inactive_plugins'] as $key => $value) { ?> <tr> <td scope="row"><?php echo $key; ?> </td> <td scope="row"><?php echo $value; ?> </td> </tr> <?php } } ?> </tbody> </table> <div class="clear"></div> <form method="post" action="admin.php?page=bws_plugins&action=system_status"> <p> <input type="hidden" name="bwsmn_form_submit" value="submit" /> <input type="submit" class="button-primary" value="<?php _e('Send to support', 'bestwebsoft'); ?> " /> <?php wp_nonce_field(plugin_basename(__FILE__), 'bwsmn_nonce_submit'); ?> </p> </form> <form method="post" action="admin.php?page=bws_plugins&action=system_status"> <p> <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" /> <input type="submit" class="button" value="<?php _e('Send to custom email »', 'bestwebsoft'); ?> " /> <input type="text" value="<?php echo $bwsmn_form_email; ?> " name="bwsmn_form_email" /> <?php wp_nonce_field(plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email'); ?> </p> </form> </div> <?php } ?> </div> <?php }
<?php // Load jQuery wp_enqueue_script('jquery'); // Load theme localization load_theme_textdomain('buffet'); $theme_data = get_theme(get_current_theme()); // Define PHP file constants. define(BF_DIR, TEMPLATEPATH); define(BF_LIB, BF_DIR . '/includes'); define(THEME_VERSION, $theme_data['Version']); // Not sure whether the filter will work. define(THEME_ID, apply_filters('bf_theme_id', 'buffet')); // Load library files. require_once BF_LIB . '/core.php'; require_once BF_LIB . '/actions.php'; require_once BF_LIB . '/filters.php'; require_once BF_LIB . '/helpers.php'; require_once BF_LIB . '/template.php'; require_once BF_LIB . '/widgets.php'; // Load theme options. require_once BF_LIB . '/options.php'; bf_flush_options(); // Load admin files. if (is_admin()) { require_once BF_LIB . '/admin.php'; } // Load extensions. require_once BF_LIB . '/extensions.php'; require_once BF_LIB . '/extensions/default-extensions.php'; // Finally, load the launcher.
function get_serverinfo() { global $wpdb; global $wp_version; $sqlversion = $wpdb->get_var("SELECT VERSION() AS version"); $mysqlinfo = $wpdb->get_results("SHOW VARIABLES LIKE 'sql_mode'"); if (is_array($mysqlinfo)) { $sql_mode = $mysqlinfo[0]->Value; } if (empty($sql_mode)) { $sql_mode = __('Not set', 'all_in_one_seo_pack'); } if (ini_get('safe_mode')) { $safe_mode = __('On', 'all_in_one_seo_pack'); } else { $safe_mode = __('Off', 'all_in_one_seo_pack'); } if (ini_get('allow_url_fopen')) { $allow_url_fopen = __('On', 'all_in_one_seo_pack'); } else { $allow_url_fopen = __('Off', 'all_in_one_seo_pack'); } if (ini_get('upload_max_filesize')) { $upload_max = ini_get('upload_max_filesize'); } else { $upload_max = __('N/A', 'all_in_one_seo_pack'); } if (ini_get('post_max_size')) { $post_max = ini_get('post_max_size'); } else { $post_max = __('N/A', 'all_in_one_seo_pack'); } if (ini_get('max_execution_time')) { $max_execute = ini_get('max_execution_time'); } else { $max_execute = __('N/A', 'all_in_one_seo_pack'); } if (ini_get('memory_limit')) { $memory_limit = ini_get('memory_limit'); } else { $memory_limit = __('N/A', 'all_in_one_seo_pack'); } if (function_exists('memory_get_usage')) { $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', 'all_in_one_seo_pack'); } else { $memory_usage = __('N/A', 'all_in_one_seo_pack'); } if (is_callable('exif_read_data')) { $exif = __('Yes', 'all_in_one_seo_pack') . " ( V" . $this->substr(phpversion('exif'), 0, 4) . ")"; } else { $exif = __('No', 'all_in_one_seo_pack'); } if (is_callable('iptcparse')) { $iptc = __('Yes', 'all_in_one_seo_pack'); } else { $iptc = __('No', 'all_in_one_seo_pack'); } if (is_callable('xml_parser_create')) { $xml = __('Yes', 'all_in_one_seo_pack'); } else { $xml = __('No', 'all_in_one_seo_pack'); } if (function_exists('wp_get_theme')) { $theme = wp_get_theme(); } else { $theme = get_theme(get_current_theme()); } if (function_exists('is_multisite')) { if (is_multisite()) { $ms = __('Yes', 'all_in_one_seo_pack'); } else { $ms = __('No', 'all_in_one_seo_pack'); } } else { $ms = __('N/A', 'all_in_one_seo_pack'); } $siteurl = get_option('siteurl'); $homeurl = get_option('home'); $db_version = get_option('db_version'); $debug_info = array(__('Operating System', 'all_in_one_seo_pack') => PHP_OS, __('Server', 'all_in_one_seo_pack') => $_SERVER["SERVER_SOFTWARE"], __('Memory usage', 'all_in_one_seo_pack') => $memory_usage, __('MYSQL Version', 'all_in_one_seo_pack') => $sqlversion, __('SQL Mode', 'all_in_one_seo_pack') => $sql_mode, __('PHP Version', 'all_in_one_seo_pack') => PHP_VERSION, __('PHP Safe Mode', 'all_in_one_seo_pack') => $safe_mode, __('PHP Allow URL fopen', 'all_in_one_seo_pack') => $allow_url_fopen, __('PHP Memory Limit', 'all_in_one_seo_pack') => $memory_limit, __('PHP Max Upload Size', 'all_in_one_seo_pack') => $upload_max, __('PHP Max Post Size', 'all_in_one_seo_pack') => $post_max, __('PHP Max Script Execute Time', 'all_in_one_seo_pack') => $max_execute, __('PHP Exif support', 'all_in_one_seo_pack') => $exif, __('PHP IPTC support', 'all_in_one_seo_pack') => $iptc, __('PHP XML support', 'all_in_one_seo_pack') => $xml, __('Site URL', 'all_in_one_seo_pack') => $siteurl, __('Home URL', 'all_in_one_seo_pack') => $homeurl, __('WordPress Version', 'all_in_one_seo_pack') => $wp_version, __('WordPress DB Version', 'all_in_one_seo_pack') => $db_version, __('Multisite', 'all_in_one_seo_pack') => $ms, __('Active Theme', 'all_in_one_seo_pack') => $theme['Name'] . ' ' . $theme['Version']); $debug_info['Active Plugins'] = null; $active_plugins = $inactive_plugins = array(); $plugins = get_plugins(); foreach ($plugins as $path => $plugin) { if (is_plugin_active($path)) { $debug_info[$plugin['Name']] = $plugin['Version']; } else { $inactive_plugins[$plugin['Name']] = $plugin['Version']; } } $debug_info['Inactive Plugins'] = null; $debug_info = array_merge($debug_info, (array) $inactive_plugins); $mail_text = __("All in One SEO Pack Pro Debug Info", 'all_in_one_seo_pack') . "\r\n------------------\r\n\r\n"; $page_text = ""; if (!empty($debug_info)) { foreach ($debug_info as $name => $value) { if ($value !== null) { $page_text .= "<li><strong>{$name}</strong> {$value}</li>"; $mail_text .= "{$name}: {$value}\r\n"; } else { $page_text .= "</ul><h2>{$name}</h2><ul class='sfwd_debug_settings'>"; $mail_text .= "\r\n{$name}\r\n----------\r\n"; } } } do { if (!empty($_REQUEST['sfwd_debug_submit'])) { $nonce = $_REQUEST['sfwd_debug_nonce']; if (!wp_verify_nonce($nonce, 'sfwd-debug-nonce')) { echo "<div class='sfwd_debug_error'>" . __("Form submission error: verification check failed.", 'all_in_one_seo_pack') . "</div>"; break; } if ($_REQUEST['sfwd_debug_send_email']) { if (wp_mail($_REQUEST['sfwd_debug_send_email'], sprintf(__("SFWD Debug Mail From Site %s.", 'all_in_one_seo_pack'), $siteurl), $mail_text)) { echo "<div class='sfwd_debug_mail_sent'>" . sprintf(__("Sent to %s.", 'all_in_one_seo_pack'), $_REQUEST['sfwd_debug_send_email']) . "</div>"; } else { echo "<div class='sfwd_debug_error'>" . sprintf(__("Failed to send to %s.", 'all_in_one_seo_pack'), $_REQUEST['sfwd_debug_send_email']) . "</div>"; } } else { echo "<div class='sfwd_debug_error'>" . __('Error: please enter an e-mail address before submitting.', 'all_in_one_seo_pack') . "</div>"; } } } while (0); // control structure for use with break $nonce = wp_create_nonce('sfwd-debug-nonce'); $buf = "<ul class='sfwd_debug_settings'>\n{$page_text}\n</ul>\n<p>\n" . '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __("E-mail debug information", 'all_in_one_seo_pack') . '"><input name="sfwd_debug_nonce" type="hidden" value="' . $nonce . '"><input name="sfwd_debug_submit" type="submit" value="' . __('Submit', 'all_in_one_seo_pack') . '" class="button-primary"><p>'; return $buf; }
URL: <?php echo esc_url(get_option('siteurl')); ?> PHP Version: <?php echo esc_html(phpversion()); ?> Version: <?php echo esc_html($wp_version); ?> Active Theme: <?php if (!function_exists('wp_get_theme')) { $theme = get_theme(get_current_theme()); echo esc_html($theme['Name'] . ' ' . $theme['Version']); } else { $theme = wp_get_theme(); echo esc_html($theme->Name . ' ' . $theme->Version); } ?> URLOpen Method: <?php echo esc_html(dsq_url_method()); ?> Plugin Version: <?php echo esc_html(DISQUS_VERSION); ?>
function my_custom_stylesheets() { $theme = get_theme(get_current_theme()); $version = $theme['Version']; $stylesheets = wp_enqueue_style('mycustom', get_bloginfo('template_directory') . '/yourstylesheet.css', 'theme', $version, 'screen, projection'); }
public static function get_local_details() { require_once $GLOBALS['ithemes_updater_path'] . '/keys.php'; $all_packages = self::get_all(); $keys = Ithemes_Updater_Keys::get(); $packages = array(); foreach ($all_packages as $file => $slug) { $packages[$slug][] = $file; } foreach ($packages as $slug => $paths) { $packages[$slug] = array_unique($paths); } $details = array(); foreach ($packages as $package => $paths) { foreach ($paths as $path) { $plugin_path = preg_replace('/^' . preg_quote(WP_PLUGIN_DIR, '/') . '/', '', $path); if ($plugin_path != $path) { $type = 'plugin'; $rel_path = preg_replace('|^[/\\\\]|', '', $plugin_path); $plugin_data = get_plugin_data($path, false, false); $version = $plugin_data['Version']; $info_url = $plugin_data['PluginURI']; } else { $type = 'theme'; $dir = basename(dirname($path)); $rel_path = "{$dir}/" . basename($path); if (function_exists('wp_get_theme')) { $theme_data = wp_get_theme($dir); $version = $theme_data->get('Version'); $info_url = $theme_data->get('ThemeURI'); } else { $theme_data = get_theme($dir); $version = $theme_data['Version']; $info_url = ''; } } $details[$rel_path] = array('type' => $type, 'package' => $package, 'installed' => $version, 'info-url' => $info_url, 'key' => isset($keys[$package]) ? $keys[$package] : ''); } } return $details; }
/** * Show the details of the current setup in the Sidebar. */ function cpm_show_comicpress_details() { global $cpm_config, $wpmu_version; $all_comic_dates_ok = true; $all_comic_dates = array(); foreach ($cpm_config->comic_files as $comic_file) { if (($result = cpm_breakdown_comic_filename(pathinfo($comic_file, PATHINFO_BASENAME))) !== false) { if (isset($all_comic_dates[$result['date']])) { $all_comic_dates_ok = false; break; } $all_comic_dates[$result['date']] = true; } } $subdir_path = ''; if (($subdir = cpm_get_subcomic_directory()) !== false) { $subdir_path .= '/' . $subdir; } ?> <!-- ComicPress details --> <div id="comicpress-details"> <h2 style="padding-right: 0"><?php _e('ComicPress Details', 'comicpress-manager'); ?> </h2> <ul style="padding-left: 30px; margin: 0"> <li><strong><?php _e("Configuration method:", 'comicpress-manager'); ?> </strong> <?php if ($cpm_config->config_method == "comicpress-config.php") { ?> <a href="?page=<?php echo plugin_basename(__FILE__); ?> -config"><?php echo $cpm_config->config_method; ?> </a> <?php if ($cpm_config->can_write_config) { ?> <?php _e('(click to edit)', 'comicpress-manager'); ?> <?php } else { ?> <?php _e('(click to edit, cannot update automatically)', 'comicpress-manager'); ?> <?php } ?> <?php } else { ?> <?php echo $cpm_config->config_method; ?> <?php } ?> </li> <li><strong><?php _e('Comics folder:', 'comicpress-manager'); ?> </strong> <?php echo $cpm_config->properties['comic_folder'] . $subdir_path; ?> <br /> <?php $too_many_comics_message = ""; if (!$all_comic_dates_ok) { ob_start(); ?> , <a href="?page=<?php echo plugin_basename(__FILE__); ?> -status"><em><?php _e("multiple files on the same date!", 'comicpress-manager'); ?> </em></a> <?php $too_many_comics_message = trim(ob_get_clean()); } ?> <?php printf(_n('(%d comic in folder%s)', '(%d comics in folder%s)', count($cpm_config->comic_files), 'comicpress-manager'), count($cpm_config->comic_files), $too_many_comics_message); ?> </li> <?php foreach (array('archive' => __('Archive folder:', 'comicpress-manager'), 'rss' => __('RSS feed folder:', 'comicpress-manager'), 'mini' => __('Minithumb folder:', 'comicpress-manager')) as $type => $title) { $realpath = realpath(CPM_DOCUMENT_ROOT . '/' . $cpm_config->properties["{$type}_comic_folder"] . $subdir_path); ?> <li><strong><?php echo $title; ?> </strong> <?php echo $cpm_config->properties["{$type}_comic_folder"] . $subdir_path; ?> <?php if ($cpm_config->get_scale_method() != CPM_SCALE_NONE && cpm_option("cpm-{$type}-generate-thumbnails") == 1 && $cpm_config->separate_thumbs_folder_defined[$type] && $cpm_config->thumbs_folder_writable[$type]) { ?> (<em><?php _e('generating', 'comicpress-manager'); ?> </em>) <?php } else { $reasons = array(); if ($cpm_config->get_scale_method() == CPM_SCALE_NONE) { $reasons[] = __("No scaling software", 'comicpress-manager'); } if (cpm_option("cpm-{$type}-generate-thumbnails") == 0) { $reasons[] = __("Generation disabled", 'comicpress-manager'); } if (!$cpm_config->separate_thumbs_folder_defined[$type]) { $reasons[] = __("Same as comics folder", 'comicpress-manager'); } if (!$cpm_config->thumbs_folder_writable[$type]) { $reasons[] = __("Not writable", 'comicpress-manager'); } ?> (<em style="cursor: help; text-decoration: underline" title="<?php echo implode(", ", $reasons); ?> ">not generating</em>) <?php } ?> <?php if ($realpath !== false) { printf(__("(<em>%d files in folder</em>)", 'comicpress-manager'), count(glob($realpath . "/*"))); } else { _e('(<em>folder not found</em>)', 'comicpress-manager'); } ?> </li> <?php } ?> <li><strong> <?php if (is_array($cpm_config->properties['comiccat']) && count($cpm_config->properties['comiccat']) != 1) { _e("Comic categories:", 'comicpress-manager'); } else { _e("Comic category:", 'comicpress-manager'); } ?> </strong> <?php if (is_array($cpm_config->properties['comiccat'])) { ?> <ul> <?php foreach ($cpm_config->properties['comiccat'] as $cat_id) { ?> <li><a href="<?php echo get_category_link($cat_id); ?> "><?php echo get_cat_name($cat_id); ?> </a> <?php printf(__('(ID %s)', 'comicpress-manager'), $cat_id); ?> </li> <?php } ?> </ul> <?php } else { ?> <a href="<?php echo get_category_link($cpm_config->properties['comiccat']); ?> "><?php echo $cpm_config->comic_category_info['name']; ?> </a> <?php printf(__('(ID %s)', 'comicpress-manager'), $cpm_config->properties['comiccat']); ?> <?php } ?> </li> <li><strong><?php _e('Blog category:', 'comicpress-manager'); ?> </strong> <a href="<?php echo get_category_link($cpm_config->properties['blogcat']); ?> "> <?php echo $cpm_config->blog_category_info['name']; ?> </a> <?php printf(__('(ID %s)', 'comicpress-manager'), $cpm_config->properties['blogcat']); ?> </li> <?php if (!$wpmu_version) { ?> <li><strong><?php _e("PHP Version:", 'comicpress-manager'); ?> </strong> <?php echo phpversion(); ?> <?php if (substr(phpversion(), 0, 3) < 5.2) { ?> (<a href="http://gophp5.org/hosts"><?php _e("upgrade strongly recommended", 'comicpress-manager'); ?> </a>) <?php } ?> </li> <li> <strong><?php _e('Theme folder:', 'comicpress-manager'); ?> </strong> <?php $theme_info = get_theme(get_current_theme()); if (!empty($theme_info['Template'])) { echo $theme_info['Template']; } else { echo __("<em>Something's misconfigured with your theme...</em>", 'comicpress-manager'); } ?> </li> <?php if (count($cpm_config->detailed_warnings) != 0) { ?> <li> <strong><?php _e('Additional, non-fatal warnings:', 'comicpress-manager'); ?> </strong> <ul> <?php foreach ($cpm_config->detailed_warnings as $warning) { ?> <li><?php echo $warning; ?> </li> <?php } ?> </ul> </li> <?php } ?> <li> <strong><a href="#" onclick="Element.show('debug-info'); $('cpm-right-column').style.minHeight = $('cpm-left-column').offsetHeight + 'px'; return false"><?php _e('Show debug info', 'comicpress-manager'); ?> </a></strong> (<em><?php _e("this data is sanitized to protect your server's configuration", 'comicpress-manager'); ?> </em>) <?php echo cpm_show_debug_info(); ?> </li> <?php } ?> </ul> </div> <?php }
function theme_action() { //Read form data $action = $_POST['action']; $theme = $_POST['theme']; if ('activate' === $action) { include_once ABSPATH . '/wp-admin/includes/theme.php'; $theTheme = get_theme($theme); if (null !== $theTheme && '' !== $theTheme) { switch_theme($theTheme['Template'], $theTheme['Stylesheet']); } } else { if ('delete' === $action) { include_once ABSPATH . '/wp-admin/includes/theme.php'; // if (file_exists(ABSPATH . '/wp-admin/includes/deprecated.php')) include_once(ABSPATH . '/wp-admin/includes/deprecated.php'); if (file_exists(ABSPATH . '/wp-admin/includes/screen.php')) { include_once ABSPATH . '/wp-admin/includes/screen.php'; } include_once ABSPATH . '/wp-admin/includes/file.php'; include_once ABSPATH . '/wp-admin/includes/template.php'; include_once ABSPATH . '/wp-admin/includes/misc.php'; include_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php'; include_once ABSPATH . '/wp-admin/includes/class-wp-filesystem-base.php'; include_once ABSPATH . '/wp-admin/includes/class-wp-filesystem-direct.php'; $wp_filesystem = $this->getWPFilesystem(); if (empty($wp_filesystem)) { $wp_filesystem = new WP_Filesystem_Direct(null); } $themeUpgrader = new Theme_Upgrader(); $theme_name = wp_get_theme()->get('Name'); $themes = explode('||', $theme); foreach ($themes as $idx => $themeToDelete) { if ($themeToDelete !== $theme_name) { $theTheme = get_theme($themeToDelete); if (null !== $theTheme && '' !== $theTheme) { $tmp['theme'] = $theTheme['Template']; if (true === $themeUpgrader->delete_old_theme(null, null, null, $tmp)) { $args = array('action' => 'delete', 'Name' => $theTheme['Name']); do_action('mainwp_child_theme_action', $args); } } } } } else { $information['status'] = 'FAIL'; } } if (!isset($information['status'])) { $information['status'] = 'SUCCESS'; } $information['sync'] = $this->getSiteStats(array(), false); MainWP_Helper::write($information); }
function st_registerstyles() { $theme = get_theme(get_current_theme()); $version = $theme['Version']; $stylesheets = wp_enqueue_style('skeleton', get_bloginfo('template_directory') . '/skeleton.css', false, $version, 'screen, projection'); $stylesheets .= wp_enqueue_style('theme', get_bloginfo('stylesheet_directory') . '/style.css', 'skeleton', $version, 'screen, projection'); $stylesheets .= wp_enqueue_style('layout', get_bloginfo('template_directory') . '/layout.css', 'theme', $version, 'screen, projection'); $stylesheets .= wp_enqueue_style('formalize', get_bloginfo('template_directory') . '/formalize.css', 'theme', $version, 'screen, projection'); $stylesheets .= wp_enqueue_style('superfish', get_bloginfo('template_directory') . '/superfish.css', 'theme', $version, 'screen, projection'); if (class_exists('jigoshop')) { $stylesheets .= wp_enqueue_style('jigoshop', get_bloginfo('template_directory') . '/jigoshop.css', 'theme', $version, 'screen, projection'); } echo apply_filters('child_add_stylesheets', $stylesheets); }
/** * Load theme's infinite scroll annotation file, if present in the IS plugin. * The `setup_theme` action is used because the annotation files should be using `after_setup_theme` to register support for IS. * * As released in Jetpack 2.0, a child theme's parent wasn't checked for in the plugin's bundled support, hence the convoluted way the parent is checked for now. * * @uses is_admin, wp_get_theme, get_theme, get_current_theme, apply_filters * @action setup_theme * @return null */ function action_after_setup_theme() { $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_theme(get_current_theme()); if (!is_a($theme, 'WP_Theme') && !is_array($theme)) { return; } $customization_file = apply_filters('infinite_scroll_customization_file', dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Stylesheet']}.php", $theme['Stylesheet']); if (is_readable($customization_file)) { require_once $customization_file; } elseif (!empty($theme['Template'])) { $customization_file = dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Template']}.php"; if (is_readable($customization_file)) { require_once $customization_file; } } }