예제 #1
0
 function __construct()
 {
     $widget_ops = array('classname' => 'widget--latest-comments', 'description' => __('The latest comments', 'rosa_txtd'));
     parent::__construct('recent-comments', wpgrade::themename() . ' ' . __('Latest Comments', 'rosa_txtd'), $widget_ops);
     $this->alt_option_name = 'widget_recent_comments';
     add_action('comment_post', array($this, 'flush_widget_cache'));
     add_action('transition_comment_status', array($this, 'flush_widget_cache'));
 }
예제 #2
0
/**
 * Adds an update notification to the Admin Bar
 */
function wpgrade_callback_update_notifier_bar_menu()
{
    if (wpgrade::option('themeforest_upgrade')) {
        // stop if simplexml_load_string funtion isn't available
        if (function_exists('simplexml_load_string')) {
            global $wp_admin_bar, $wpdb;
            // don't display notification in admin bar if it's disabled or
            // the current user isn't an administrator
            if (!is_super_admin() || !is_admin_bar_showing()) {
                return;
            }
            $newversion = wpgrade_update_notifier_check_if_new_version();
            // compare current theme version with the remote XML version
            if ($newversion) {
                $wp_admin_bar->add_menu(array('id' => 'update_notifier', 'title' => '<span>' . wpgrade::themename() . ' <span id="ab-updates">New Updates</span></span>', 'href' => get_admin_url() . 'index.php?page=theme-update-notifier'));
            }
        }
    }
}
 public function __construct()
 {
     parent::__construct('wpgrade_social_links', wpgrade::themename() . ' ' . __('Social Links', 'rosa_txtd'), array('description' => __("Display the social links defined in the theme's options", 'rosa_txtd')));
 }
예제 #4
0
		optionsLink: "<?php 
echo $options_url;
?>
",
		envatoDetails: <?php 
echo $envatoDetails;
?>
	};
</script>

<div class="wrap">

	<div id="icon-tools" class="icon32"></div>

	<h2><?php 
echo wpgrade::themename();
?>
 Theme Updates</h2>

	<?php 
if (!(isset($_GET['wpgrade_update']) && $_GET['wpgrade_update'] == 'true')) {
    ?>

	<div id="message" class="updated below-h2">
		<p>
			<strong><?php 
    echo $xml->message;
    ?>
</strong> You have version <?php 
    echo $theme_data->Version;
    ?>
예제 #5
0
//	'title'  => __( 'Header', 'rosa_txtd' ),
//	'desc'   => '<p class="description">' . __( 'Header options allow you to control both the visual and functional aspects of the page header area.', 'rosa_txtd' ) . '</p>',
//	'fields' => array()
//);
$sections[] = array('icon' => 'icon-note-1', 'title' => __('Footer', 'rosa_txtd'), 'desc' => '<p class="description">' . __('Footer options allow you to control both the visual and functional aspects of the page footer area.', 'rosa_txtd') . '</p>', 'fields' => array(array('id' => 'footer_number_of_columns', 'type' => 'select', 'title' => __('Widget Area Number of Columns', 'rosa_txtd'), 'subtitle' => __('Select how many number of columns should the Footer widget area have.', 'rosa_txtd'), 'options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6'), 'default' => '2', 'placeholder' => __('Select the number of columns', 'rosa_txtd'), 'select2' => array('minimumResultsForSearch' => -1, 'allowClear' => false)), array('id' => 'footer_column_width', 'type' => 'select', 'title' => __('Widget Column width', 'rosa_txtd'), 'options' => array('one-third' => 'One third', 'two-thirds' => 'Two thirds', 'one-whole' => 'Whole'), 'default' => 'one_third', 'placeholder' => __('Select the widget width', 'rosa_txtd'), 'select2' => array('minimumResultsForSearch' => -1, 'allowClear' => false), 'required' => array('footer_number_of_columns', '=', 1)), array('id' => 'copyright_text', 'type' => 'editor', 'title' => __('Copyright Text', 'rosa_txtd'), 'subtitle' => sprintf(__('Text that will appear in bottom left area (eg. Copyright 2014 %s | All Rights Reserved).', 'rosa_txtd'), wpgrade::themename()), 'default' => '2014 &copy; Handcrafted with love by <a href="#">PixelGrade</a> Team', 'rows' => 3)));
// Archives Options
// ------------------------------------------------------------------------
$sections[] = array('icon' => 'icon-pencil-1', 'title' => __('Blog - Archive', 'rosa_txtd'), 'desc' => sprintf('<p class="description">' . __('Archive options control the various aspects related to displaying posts in blog archives. You can control things like excerpt length and various layout aspects.', 'rosa_txtd') . '</p>', wpgrade::themename()), 'fields' => array(array('id' => 'blog_read_more_text', 'type' => 'text', 'title' => __('Read More Text', 'rosa_txtd'), 'subtitle' => __('Set the read more link text.', 'rosa_txtd'), 'default' => 'Read more'), array('id' => 'blog_excerpt_more_text', 'type' => 'text', 'title' => __('Excerpt "More" Text', 'rosa_txtd'), 'subtitle' => __('Change the default [...] with something else.', 'rosa_txtd'), 'default' => '..'), array('id' => 'blog_excerpt_length', 'type' => 'text', 'title' => __('Excerpt Length', 'rosa_txtd'), 'subtitle' => __('Set the number of characters for posts excerpt.', 'rosa_txtd'), 'default' => '140'), array('id' => 'posts_meta_data-218293204', 'desc' => '<h4>' . __('Posts Meta Informations', 'rosa_txtd') . '</h4>', 'type' => 'info'), array('id' => 'blog_show_date', 'type' => 'checkbox', 'title' => __('Date', 'rosa_txtd'), 'subtitle' => __('Display the post publish date.', 'rosa_txtd'), 'default' => '1'), array('id' => 'blog_custom_date_separator', 'type' => 'checkbox', 'title' => __('Dot Separator', 'rosa_txtd'), 'subtitle' => __('Change spaces, commas or slashes with a custom dot.', 'rosa_txtd'), 'default' => '1', 'required' => array('blog_show_date', '=', true))));
$sections[] = array('icon' => 'icon-pencil-1', 'title' => __('Blog - Single', 'rosa_txtd'), 'desc' => sprintf('<p class="description">' . __('Post options control the various aspects related to the <b>single post page</b>.', 'rosa_txtd') . '</p>', wpgrade::themename()), 'fields' => array(array('id' => 'blog_single_show_author_box', 'type' => 'switch', 'title' => __('Show Author Info Box', 'rosa_txtd'), 'subtitle' => __('Do you want to show author info box with avatar and description bellow the post?', 'rosa_txtd'), 'default' => true), array('id' => 'posts_share-links-812329384', 'desc' => '<h4>' . __('Share Links', 'rosa_txtd') . '</h4>', 'type' => 'info'), array('id' => 'blog_single_show_share_links', 'type' => 'switch', 'title' => __('Show Share Links', 'rosa_txtd'), 'subtitle' => __('Do you want to show share icon links in your articles?', 'rosa_txtd'), 'default' => true), array('id' => 'posts_comments-812329384', 'desc' => '<h4>' . __('Comments', 'rosa_txtd') . '</h4>', 'type' => 'info'), array('id' => 'comments_show_avatar', 'type' => 'switch', 'title' => __('Show Comments Avatars', 'rosa_txtd'), 'subtitle' => __('Do you want to show avatars in comments?', 'rosa_txtd'), 'default' => false), array('id' => 'comments_show_numbering', 'type' => 'switch', 'title' => __('Show Comments Numbers', 'rosa_txtd'), 'subtitle' => __('Do you want to show numbers beside each comment?', 'rosa_txtd'), 'default' => true), array('id' => 'posts_sidebar-812329384', 'desc' => '<h4>' . __('Sidebar', 'rosa_txtd') . '</h4>', 'type' => 'info'), array('id' => 'blog_single_show_sidebar', 'type' => 'switch', 'title' => __('Show Sidebar', 'rosa_txtd'), 'subtitle' => __('Show the main sidebar in the single post pages.', 'rosa_txtd'), 'default' => '1', 'switch' => true)));
$sections[] = array('type' => 'divide');
// Social and SEO options
// ------------------------------------------------------------------------
$sections[] = array('icon' => "icon-thumbs-up-1", 'icon_class' => '', 'title' => __('Social and SEO', 'rosa_txtd'), 'desc' => '<p class="description">' . __('Social and SEO options allow you to display your social links and choose where to display them. Then you can set the social SEO related info added in the meta tags or used in various widgets.', 'rosa_txtd') . '</p>', 'fields' => array(array('id' => 'header_layout-218293203', 'desc' => '<h3>' . __('Sharing', 'rosa_txtd') . '</h3>', 'type' => 'info'), array('id' => 'share_buttons_settings', 'type' => 'text', 'title' => __('Share Services', 'rosa_txtd'), 'subtitle' => __('Add here the share services you want to use, single comma delimited (no spaces). You can find the full list of services here: <a href="http://www.addthis.com/services/list">http://www.addthis.com/services/list</a>. Also you can use the <strong>more</strong> tag to show the plus sign and the <strong>counter</strong> tag to show a global share counter.<br/><br/>Important: If you want to allow AddThis to show your visitors personalized lists of share buttons you can use the <strong>preferred</strong> tag. More about this here: <a href="http://bit.ly/1fLP69i">http://bit.ly/1fLP69i</a>.', 'rosa_txtd'), 'default' => 'more,preferred,preferred,preferred,preferred'), array('id' => 'share_buttons_enable_tracking', 'type' => 'switch', 'title' => __('Sharing Analytics', 'rosa_txtd'), 'subtitle' => __('Do you want to get analytics for your social shares?', 'rosa_txtd'), 'default' => '0'), array('id' => 'share_buttons_enable_addthis_tracking', 'type' => 'switch', 'title' => __('AddThis Tracking', 'rosa_txtd'), 'subtitle' => __('Do you want to enable AddThis tracking? This will all you to see sharing analytics in your AddThis account (see more here: <a href="http://bit.ly/1oe5zad">bit.ly/1oe5zad</a>)', 'rosa_txtd'), 'default' => '0', 'required' => array('share_buttons_enable_tracking', '=', 1)), array('id' => 'share_buttons_addthis_username', 'type' => 'text', 'title' => __('AddThis Username', 'rosa_txtd'), 'subtitle' => __('Enter here your AddThis username so you will receive analytics data.', 'rosa_txtd'), 'default' => '', 'required' => array('share_buttons_enable_addthis_tracking', '=', 1)), array('id' => 'share_buttons_enable_ga_tracking', 'type' => 'switch', 'title' => __('Google Analytics Tracking', 'rosa_txtd'), 'subtitle' => __('Do you want to enable the AddThis - Google Analytics tracking integration? See more about this here: <a href="http://bit.ly/1kxPg7K">bit.ly/1kxPg7K</a>', 'rosa_txtd'), 'default' => '0', 'required' => array('share_buttons_enable_tracking', '=', 1)), array('id' => 'share_buttons_ga_id', 'type' => 'text', 'title' => __('GA Property ID', 'rosa_txtd'), 'subtitle' => __('Enter here your GA property ID (generally a serial number of the form UA-xxxxxx-x).', 'rosa_txtd'), 'default' => '', 'required' => array('share_buttons_enable_ga_tracking', '=', 1)), array('id' => 'share_buttons_enable_ga_social_tracking', 'type' => 'switch', 'title' => __('GA Social Tracking', 'rosa_txtd'), 'subtitle' => __('If you are using the latest version of GA code, you can take advantage of Google\'s new <a href="http://bit.ly/1iVvkbk">social interaction analytics</a>.', 'rosa_txtd'), 'default' => '0', 'required' => array('share_buttons_enable_ga_tracking', '=', 1)), array('id' => 'header_layout-218293203', 'desc' => '<h3>' . __('Social Links', 'rosa_txtd') . '</h3>', 'type' => 'info'), array('id' => 'social_icons', 'type' => 'text_sortable', 'title' => __('Social Links', 'rosa_txtd'), 'subtitle' => sprintf(__('Define and reorder your social pages links.<br /><b>Note:</b> These will be displayed in the "%s Social Links" widget so you can put them anywhere on your site. Only those filled will appear.<br /><br /><strong> You need to input the <strong>complete</strong> URL (ie. http://twitter.com/username)</strong>', 'rosa_txtd'), wpgrade::themename()), 'desc' => __('Icons provided by <strong>FontAwesome</strong> and <strong>Entypo</strong>.', 'rosa_txtd'), 'checkboxes' => array('widget' => __('Widget', 'rosa_txtd'), 'header' => __('Header', 'rosa_txtd')), 'options' => array('flickr' => __('Flickr', 'rosa_txtd'), 'tumblr' => __('Tumblr', 'rosa_txtd'), 'pinterest' => __('Pinterest', 'rosa_txtd'), 'instagram' => __('Instagram', 'rosa_txtd'), 'foursquare' => __('Foursquare', 'rosa_txtd'), 'yelp' => __('Yelp', 'rosa_txtd'), 'behance' => __('Behance', 'rosa_txtd'), 'fivehundredpx' => __('500px', 'rosa_txtd'), 'deviantart' => __('DeviantART', 'rosa_txtd'), 'dribbble' => __('Dribbble', 'rosa_txtd'), 'twitter' => __('Twitter', 'rosa_txtd'), 'facebook' => __('Facebook', 'rosa_txtd'), 'gplus' => __('Google+', 'rosa_txtd'), 'youtube' => __('Youtube', 'rosa_txtd'), 'vimeo' => __('Vimeo', 'rosa_txtd'), 'linkedin' => __('LinkedIn', 'rosa_txtd'), 'skype' => __('Skype', 'rosa_txtd'), 'soundcloud' => __('SoundCloud', 'rosa_txtd'), 'digg' => __('Digg', 'rosa_txtd'), 'lastfm' => __('Last.FM', 'rosa_txtd'), 'rdio' => __('Rdio', 'rosa_txtd'), 'sina-weibo' => __('Sina Weibo', 'rosa_txtd'), 'vkontakte' => __('VKontakte', 'rosa_txtd'), 'appnet' => __('App.net', 'rosa_txtd'), 'rss' => __('RSS Feed', 'rosa_txtd'), 'tripadvisor' => __('Tripadvisor', 'rosa_txtd'))), array('id' => 'social_icons_target_blank', 'type' => 'switch', 'title' => __('Open Social Links In a New Tab?', 'rosa_txtd'), 'subtitle' => __('Do you want to open social links in a new tab?', 'rosa_txtd'), 'default' => '1'), array('id' => 'header_layout-218293203', 'desc' => '<h3>' . __('Social Metas', 'rosa_txtd') . '</h3>', 'type' => 'info'), array('id' => 'prepare_for_social_share', 'type' => 'switch', 'title' => __('Add Social Meta Tags', 'rosa_txtd'), 'subtitle' => __('Let us properly prepare your theme for the social sharing and discovery by adding the needed metatags in the <head> section. These include Open Graph (Facebook), Google+ and Twitter metas.', 'rosa_txtd'), 'default' => '1'), array('id' => 'facebook_id_app', 'type' => 'text', 'title' => __('Facebook Application ID', 'rosa_txtd'), 'subtitle' => __('Enter the Facebook Application ID of the Fan Page which is associated with this website. You can create one <a href="https://developers.facebook.com/apps">here</a>.', 'rosa_txtd'), 'required' => array('prepare_for_social_share', '=', 1)), array('id' => 'facebook_admin_id', 'type' => 'text', 'title' => __('Facebook Admin ID', 'rosa_txtd'), 'subtitle' => __('The id of the user that has administrative privileges to your Facebook App so you can access the <a href="https://www.facebook.com/insights/">Facebook Insights</a>.', 'rosa_txtd'), 'required' => array('prepare_for_social_share', '=', 1)), array('id' => 'google_page_url', 'type' => 'text', 'title' => __('Google+ Publisher', 'rosa_txtd'), 'subtitle' => __('Enter your Google Plus page ID (example: https://plus.google.com/<b>105345678532237339285</b>) here if you have set up a "Google+ Page".', 'rosa_txtd'), 'required' => array('prepare_for_social_share', '=', 1)), array('id' => 'twitter_card_site', 'type' => 'text', 'title' => __('Twitter Site Username', 'rosa_txtd'), 'subtitle' => __('The Twitter username of the entire site. The username for the author will be taken from the author\'s profile', 'rosa_txtd'), 'required' => array('prepare_for_social_share', '=', 1), 'validate_callback' => 'wpgrade_trim_twitter_username'), array('id' => 'social_share_default_image', 'type' => 'media', 'title' => __('Default Social Share Image', 'rosa_txtd'), 'desc' => __('If an image is uploaded, this will be used for content sharing if you don\'t upload a custom image with your content (at least 200px wide recommended).', 'rosa_txtd')), array('id' => 'remove_parameters_from_static_res', 'type' => 'switch', 'title' => __('Clean Static Files URL', 'rosa_txtd'), 'subtitle' => __('Do you want us to remove the version parameters from static resources so they can be cached better?', 'rosa_txtd'), 'default' => '0')));
// Custom Code
// ------------------------------------------------------------------------
$sections[] = array('icon' => "icon-database-1", 'icon_class' => '', 'title' => __('Custom Code', 'rosa_txtd'), 'desc' => '<p class="description">' . __('You can change the site style and behaviour by adding custom scripts to all pages within your site using the custom code areas below.', 'rosa_txtd') . '</p>', 'fields' => array(array('id' => 'custom_css', 'type' => 'ace_editor', 'title' => __('Custom CSS', 'rosa_txtd'), 'subtitle' => __('Enter your custom CSS code. It will be included in the head section of the page and will overwrite the main CSS styling.', 'rosa_txtd'), 'mode' => 'css', 'theme' => 'chrome', 'compiler' => true), array('id' => 'inject_custom_css', 'type' => 'select', 'title' => __('Apply Custom CSS', 'rosa_txtd'), 'subtitle' => sprintf(__('Select how to insert the custom CSS into your pages.', 'rosa_txtd'), wpgrade::themename()), 'default' => 'inline', 'options' => array('inline' => __('Inline <em>(recommended)</em>', 'rosa_txtd'), 'file' => __('Write To File (might require file permissions)', 'rosa_txtd')), 'select2' => array('minimumResultsForSearch' => -1, 'allowClear' => false), 'compiler' => true), array('id' => 'custom_js', 'type' => 'ace_editor', 'title' => __('Custom JavaScript (header)', 'rosa_txtd'), 'subtitle' => __('Enter your custom Javascript code. This code will be loaded in the head section of your pages.', 'rosa_txtd'), 'mode' => 'text', 'theme' => 'chrome'), array('id' => 'custom_js_footer', 'type' => 'ace_editor', 'title' => __('Custom JavaScript (footer)', 'rosa_txtd'), 'subtitle' => __('This javascript code will be loaded in the footer. You can paste here your <strong>Google Analytics tracking code</strong> (or for what matters any tracking code) and we will put it on every page.', 'rosa_txtd'), 'mode' => 'text', 'theme' => 'chrome')));
// Utilities - Theme Auto Update + Import Demo Data
// ------------------------------------------------------------------------
$sections[] = array('icon' => "icon-truck", 'icon_class' => '', 'title' => __('Utilities', 'rosa_txtd'), 'desc' => '<p class="description">' . __('Utilities help you keep up-to-date with new versions of the theme. Also you can import the demo data from here.', 'rosa_txtd') . '</p>', 'fields' => array(array('id' => 'theme-one-click-update-info', 'desc' => __('<h3>Theme One-Click Update</h3>
				<p class="description">' . __('Let us notify you when new versions of this theme are live on ThemeForest! Update with just one button click and forget about manual updates!</p><p> If you have any troubles with this system please refer to <a href="http://bit.ly/backend-update">Updating a theme</a> article.', 'rosa_txtd') . '</p>', 'rosa_txtd'), 'type' => 'info'), array('id' => 'themeforest_upgrade', 'type' => 'switch', 'title' => __('One-Click Update', 'rosa_txtd'), 'subtitle' => __('Activate this to enter the info needed for the theme\'s one-click update to work.', 'rosa_txtd'), 'default' => true), array('id' => 'marketplace_username', 'type' => 'text', 'title' => __('ThemeForest Username', 'rosa_txtd'), 'subtitle' => __('Enter here your ThemeForest (or Envato) username account (i.e. pixelgrade).', 'rosa_txtd'), 'required' => array('themeforest_upgrade', '=', 1)), array('id' => 'marketplace_api_key', 'type' => 'text', 'title' => __('ThemeForest Secret API Key', 'rosa_txtd'), 'subtitle' => __('Enter here the secret api key you\'ve created on ThemeForest. You can create a new one in the Settings > API Keys section of your profile.', 'rosa_txtd'), 'required' => array('themeforest_upgrade', '=', 1)), array('id' => 'themeforest_upgrade_backup', 'type' => 'switch', 'title' => __('Backup Theme Before Upgrade?', 'rosa_txtd'), 'subtitle' => __('Check this if you want us to automatically save your theme as a ZIP archive before an upgrade. The directory those backups get saved to is <code>wp-content/envato-backups</code>. However, if you\'re experiencing problems while attempting to upgrade, it\'s likely to be a permissions issue and you may want to manually backup your theme before upgrading. Alternatively, if you don\'t want to backup your theme you can disable this.', 'rosa_txtd'), 'default' => '0', 'required' => array('themeforest_upgrade', '=', 1)), array('id' => 'import-demo-data-info', 'desc' => __('<h3>Import Demo Data</h3>
				<p class="description">' . __('Here you can import the demo data and get on your way of setting up the site like the theme demo (images not included due to copyright).', 'rosa_txtd') . '</p>', 'rosa_txtd'), 'type' => 'info'), array('id' => 'wpGrade_import_demodata_button', 'type' => 'info', 'desc' => '
                    <input type="hidden" name="wpGrade-nonce-import-posts-pages" value="' . wp_create_nonce('wpGrade_nonce_import_demo_posts_pages') . '" />
						<input type="hidden" name="wpGrade-nonce-import-theme-options" value="' . wp_create_nonce('wpGrade_nonce_import_demo_theme_options') . '" />
						<input type="hidden" name="wpGrade-nonce-import-widgets" value="' . wp_create_nonce('wpGrade_nonce_import_demo_widgets') . '" />
						<input type="hidden" name="wpGrade_import_ajax_url" value="' . admin_url("admin-ajax.php") . '" />

						<a href="#" class="button button-primary" id="wpGrade_import_demodata_button">
							' . __('Import demo data', 'rosa_txtd') . '
						</a>

						<div class="wpGrade-loading-wrap hidden">