Make WordPress Themes

Changeset 356445


Ignore:
Timestamp:
10/31/2026 12:32:15 PM (11 hours ago)
Author:
themedropbox
Message:

New version of Aster Travel Blog - 2.5.1

Location:
aster-travel-blog/2.5.1
Files:
7 added
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • aster-travel-blog/2.5.1/functions.php

    r353516 r356445  
    8484                add_theme_support( 'responsive-embeds' );
    8585
     86                /*  Demo Import */
     87                require get_parent_theme_file_path( '/theme-wizard/config.php' );
     88
    8689                /*
    8790                * This theme styles the visual editor to resemble the theme style,
    … …  
    8992                */
    9093                add_editor_style( '/resource/css/editor-style.css' );
     94
     95                if ( ! defined( 'ASTER_TRAVEL_BLOG_WELCOME_MESSAGE' ) ) {
     96                        define( 'ASTER_TRAVEL_BLOG_WELCOME_MESSAGE', __( 'Welcome to Aster Travel Blog', 'aster-travel-blog' ) );
     97                }
    9198        }
    9299endif;
    … …  
    275282}
    276283add_action('after_setup_theme', 'aster_travel_blog_links_setup');
    277 
    278 /**
    279  * Theme Wizard
    280 */
    281 add_action( 'init', 'aster_travel_blog_load_theme_wizard' );
    282 function aster_travel_blog_load_theme_wizard() {
    283     require get_parent_theme_file_path( '/theme-wizard/config.php' );
    284 }
    285284
    286285// Enqueue Customizer live preview script
    … …  
    327326}
    328327add_action('wp_ajax_aster_travel_blog_reset_demo_import_settings', 'aster_travel_blog_reset_demo_import_settings');
     328
     329add_filter( 'woocommerce_enable_setup_wizard', '__return_false' );
  • aster-travel-blog/2.5.1/languages/aster-travel-blog.pot

    r354840 r356445  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Aster Travel Blog 2.4.9\n"
     5"Project-Id-Version: Aster Travel Blog 2.5.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/aster-travel-blog\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-10-19T02:04:11+00:00\n"
     12"POT-Creation-Date: 2026-10-31T05:42:35+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
    … …  
    6767msgstr ""
    6868
    69 #: functions.php:103
     69#: functions.php:96
     70msgid "Welcome to Aster Travel Blog"
     71msgstr ""
     72
     73#: functions.php:110
    7074msgid "Sidebar"
    7175msgstr ""
    7276
    73 #: functions.php:105
     77#: functions.php:112
    7478msgid "Add widgets here."
    7579msgstr ""
    7680
    77 #: functions.php:117
     81#: functions.php:124
    7882msgid "Footer  "
    7983msgstr ""
    8084
    81 #: functions.php:119
     85#: functions.php:126
    8286msgid "The Footer Widget Area"
    8387msgstr ""
    8488
    85 #: functions.php:252
     89#: functions.php:259
    8690msgid "https://asterthemes.com/products/travel-blogger-wordpress-theme"
    8791msgstr ""
    8892
    89 #: functions.php:255
     93#: functions.php:262
    9094msgid "https://asterthemes.com/products/aster-travel-blog"
    9195msgstr ""
    9296
    93 #: functions.php:258
     97#: functions.php:265
    9498msgid "https://wordpress.org/support/theme/aster-travel-blog/"
    9599msgstr ""
    96100
    97 #: functions.php:261
     101#: functions.php:268
    98102msgid "https://wordpress.org/support/theme/aster-travel-blog/reviews/"
    99103msgstr ""
    100104
    101 #: functions.php:264
     105#: functions.php:271
    102106msgid "https://demo.asterthemes.com/aster-travel-blog/"
    103107msgstr ""
    104108
    105 #: functions.php:267
     109#: functions.php:274
    106110msgid "https://demo.asterthemes.com/docs/aster-travel-blog-free/"
    107111msgstr ""
    108112
    109 #: functions.php:270
     113#: functions.php:277
    110114msgid "https://demo.asterthemes.com/docs/aster-travel-blog-pro/"
    111115msgstr ""
    112116
    113 #: functions.php:273
     117#: functions.php:280
    114118msgid "https://asterthemes.com/products/wp-theme-bundle"
    115119msgstr ""
    116120
    117 #: functions.php:323
     121#: functions.php:322
    118122msgid "Demo import settings have been reset."
    119123msgstr ""
    120124
    121 #: functions.php:325
     125#: functions.php:324
    122126msgid "Permission denied."
    123127msgstr ""
    … …  
    12351239
    12361240#: theme-library/function-files/class-breadcrumb-trail.php:250
    1237 #: theme-wizard/whizzie.php:253
     1241#: theme-wizard/whizzie.php:547
    12381242msgid "Home"
    12391243msgstr ""
    … …  
    13191323
    13201324#: theme-library/function-files/customizer-settings-functions.php:109
    1321 #: theme-wizard/whizzie.php:259
     1325#: theme-wizard/whizzie.php:553
    13221326msgid "Blogs"
    13231327msgstr ""
    … …  
    13811385#: theme-library/function-files/template-functions.php:435
    13821386msgid "Calendar"
    1383 msgstr ""
    1384 
    1385 #: theme-library/function-files/template-functions.php:497
    1386 msgid "Welcome to Aster Travel Blog"
    13871387msgstr ""
    13881388
    … …  
    14381438#: theme-library/getting-started/getting-started.php:15
    14391439#: theme-library/getting-started/getting-started.php:16
    1440 #: theme-library/getting-started/getting-started.php:98
     1440#: theme-library/getting-started/getting-started.php:116
    14411441msgid "Getting Started"
    14421442msgstr ""
    … …  
    14551455msgstr ""
    14561456
    1457 #: theme-library/getting-started/getting-started.php:74
     1457#: theme-library/getting-started/getting-started.php:88
    14581458msgid "Import Theme Demo"
    14591459msgstr ""
    14601460
    1461 #: theme-library/getting-started/getting-started.php:78
     1461#: theme-library/getting-started/getting-started.php:96
    14621462msgid "Visit Your Website"
    14631463msgstr ""
    14641464
    1465 #: theme-library/getting-started/getting-started.php:86
     1465#: theme-library/getting-started/getting-started.php:104
    14661466#: theme-library/getting-started/tabs/link-panel.php:34
    14671467msgid "WP Theme Bundle"
    14681468msgstr ""
    14691469
    1470 #: theme-library/getting-started/getting-started.php:87
     1470#: theme-library/getting-started/getting-started.php:105
    14711471#: theme-library/getting-started/tabs/link-panel.php:35
    14721472msgid "Get access to a collection of premium WordPress themes in one bundle. Enjoy effortless website building, full customization, and dedicated customer support for a smooth, professional web experience."
    14731473msgstr ""
    14741474
    1475 #: theme-library/getting-started/getting-started.php:88
     1475#: theme-library/getting-started/getting-started.php:106
    14761476#: theme-library/getting-started/tabs/link-panel.php:22
    14771477#: theme-library/getting-started/tabs/link-panel.php:36
    … …  
    14791479msgstr ""
    14801480
    1481 #: theme-library/getting-started/getting-started.php:89
     1481#: theme-library/getting-started/getting-started.php:107
    14821482#: theme-library/getting-started/tabs/link-panel.php:37
    14831483msgid "Exclusive Theme Bundle - $99"
    14841484msgstr ""
    14851485
    1486 #: theme-library/getting-started/getting-started.php:103
     1486#: theme-library/getting-started/getting-started.php:121
    14871487msgid "Free Vs Pro"
    14881488msgstr ""
    14891489
    1490 #: theme-library/getting-started/getting-started.php:116
    1491 #: theme-library/getting-started/getting-started.php:118
     1490#: theme-library/getting-started/getting-started.php:134
     1491#: theme-library/getting-started/getting-started.php:136
    14921492msgid "Review Theme"
    14931493msgstr ""
    14941494
    1495 #: theme-library/getting-started/getting-started.php:122
    1496 #: theme-library/getting-started/getting-started.php:124
     1495#: theme-library/getting-started/getting-started.php:140
     1496#: theme-library/getting-started/getting-started.php:142
    14971497msgid "Contact Support"
    14981498msgstr ""
    14991499
    1500 #: theme-library/getting-started/getting-started.php:128
    1501 #: theme-library/getting-started/getting-started.php:130
     1500#: theme-library/getting-started/getting-started.php:146
     1501#: theme-library/getting-started/getting-started.php:148
    15021502#: theme-library/getting-started/tabs/help-panel.php:13
    15031503msgid "Free Theme Documentation"
    … …  
    17111711msgstr ""
    17121712
    1713 #: theme-wizard/config.php:32
    1714 #: theme-wizard/whizzie.php:158
     1713#: theme-wizard/config.php:36
     1714#: theme-wizard/whizzie.php:290
    17151715msgid "Welcome to "
    17161716msgstr ""
    17171717
    1718 #: theme-wizard/config.php:34
    1719 #: theme-wizard/whizzie.php:161
     1718#: theme-wizard/config.php:38
     1719#: theme-wizard/whizzie.php:294
    17201720msgid "Start Now"
    17211721msgstr ""
    17221722
    1723 #: theme-wizard/config.php:39
    1724 #: theme-wizard/whizzie.php:166
     1723#: theme-wizard/config.php:43
     1724#: theme-wizard/whizzie.php:299
     1725msgid "Plugins"
     1726msgstr ""
     1727
     1728#: theme-wizard/config.php:45
     1729#: theme-wizard/tgm/class-tgm-plugin-activation.php:341
     1730#: theme-wizard/whizzie.php:303
     1731msgid "Install Plugins"
     1732msgstr ""
     1733
     1734#: theme-wizard/config.php:50
     1735#: theme-wizard/whizzie.php:308
    17251736msgid "Demo Importer"
    17261737msgstr ""
    17271738
    1728 #: theme-wizard/config.php:41
    1729 #: theme-wizard/whizzie.php:169
     1739#: theme-wizard/config.php:52
     1740#: theme-wizard/whizzie.php:312
    17301741msgid "Import Demo"
    17311742msgstr ""
    17321743
    1733 #: theme-wizard/config.php:46
    1734 #: theme-wizard/whizzie.php:174
     1744#: theme-wizard/config.php:57
     1745#: theme-wizard/whizzie.php:317
    17351746msgid "All Done"
    17361747msgstr ""
    17371748
    1738 #: theme-wizard/whizzie.php:95
     1749#: theme-wizard/tgm/class-tgm-plugin-activation.php:340
     1750msgid "Install Required Plugins"
     1751msgstr ""
     1752
     1753#. translators: %s: plugin name.
     1754#: theme-wizard/tgm/class-tgm-plugin-activation.php:343
     1755msgid "Installing Plugin: %s"
     1756msgstr ""
     1757
     1758#. translators: %s: plugin name.
     1759#: theme-wizard/tgm/class-tgm-plugin-activation.php:345
     1760msgid "Updating Plugin: %s"
     1761msgstr ""
     1762
     1763#: theme-wizard/tgm/class-tgm-plugin-activation.php:346
     1764msgid "Something went wrong with the plugin API."
     1765msgstr ""
     1766
     1767#. translators: 1: plugin name(s).
     1768#: theme-wizard/tgm/class-tgm-plugin-activation.php:348
     1769msgid "This theme requires the following plugin: %1$s."
     1770msgid_plural "This theme requires the following plugins: %1$s."
     1771msgstr[0] ""
     1772msgstr[1] ""
     1773
     1774#. translators: 1: plugin name(s).
     1775#: theme-wizard/tgm/class-tgm-plugin-activation.php:354
     1776msgid "This theme recommends the following plugin: %1$s."
     1777msgid_plural "This theme recommends the following plugins: %1$s."
     1778msgstr[0] ""
     1779msgstr[1] ""
     1780
     1781#. translators: 1: plugin name(s).
     1782#: theme-wizard/tgm/class-tgm-plugin-activation.php:360
     1783msgid "The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s."
     1784msgid_plural "The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s."
     1785msgstr[0] ""
     1786msgstr[1] ""
     1787
     1788#. translators: 1: plugin name(s).
     1789#: theme-wizard/tgm/class-tgm-plugin-activation.php:366
     1790msgid "There is an update available for: %1$s."
     1791msgid_plural "There are updates available for the following plugins: %1$s."
     1792msgstr[0] ""
     1793msgstr[1] ""
     1794
     1795#. translators: 1: plugin name(s).
     1796#: theme-wizard/tgm/class-tgm-plugin-activation.php:372
     1797msgid "The following required plugin is currently inactive: %1$s."
     1798msgid_plural "The following required plugins are currently inactive: %1$s."
     1799msgstr[0] ""
     1800msgstr[1] ""
     1801
     1802#. translators: 1: plugin name(s).
     1803#: theme-wizard/tgm/class-tgm-plugin-activation.php:378
     1804msgid "The following recommended plugin is currently inactive: %1$s."
     1805msgid_plural "The following recommended plugins are currently inactive: %1$s."
     1806msgstr[0] ""
     1807msgstr[1] ""
     1808
     1809#: theme-wizard/tgm/class-tgm-plugin-activation.php:383
     1810msgid "Begin installing plugin"
     1811msgid_plural "Begin installing plugins"
     1812msgstr[0] ""
     1813msgstr[1] ""
     1814
     1815#: theme-wizard/tgm/class-tgm-plugin-activation.php:388
     1816msgid "Begin updating plugin"
     1817msgid_plural "Begin updating plugins"
     1818msgstr[0] ""
     1819msgstr[1] ""
     1820
     1821#: theme-wizard/tgm/class-tgm-plugin-activation.php:393
     1822msgid "Begin activating plugin"
     1823msgid_plural "Begin activating plugins"
     1824msgstr[0] ""
     1825msgstr[1] ""
     1826
     1827#: theme-wizard/tgm/class-tgm-plugin-activation.php:398
     1828msgid "Return to Required Plugins Installer"
     1829msgstr ""
     1830
     1831#: theme-wizard/tgm/class-tgm-plugin-activation.php:399
     1832msgid "Return to the Dashboard"
     1833msgstr ""
     1834
     1835#: theme-wizard/tgm/class-tgm-plugin-activation.php:400
     1836#: theme-wizard/tgm/class-tgm-plugin-activation.php:3311
     1837msgid "Plugin activated successfully."
     1838msgstr ""
     1839
     1840#: theme-wizard/tgm/class-tgm-plugin-activation.php:401
     1841#: theme-wizard/tgm/class-tgm-plugin-activation.php:3103
     1842msgid "The following plugin was activated successfully:"
     1843msgid_plural "The following plugins were activated successfully:"
     1844msgstr[0] ""
     1845msgstr[1] ""
     1846
     1847#. translators: 1: plugin name.
     1848#: theme-wizard/tgm/class-tgm-plugin-activation.php:403
     1849msgid "No action taken. Plugin %1$s was already active."
     1850msgstr ""
     1851
     1852#. translators: 1: plugin name.
     1853#: theme-wizard/tgm/class-tgm-plugin-activation.php:405
     1854msgid "Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin."
     1855msgstr ""
     1856
     1857#. translators: 1: dashboard link.
     1858#: theme-wizard/tgm/class-tgm-plugin-activation.php:407
     1859msgid "All plugins installed and activated successfully. %1$s"
     1860msgstr ""
     1861
     1862#: theme-wizard/tgm/class-tgm-plugin-activation.php:408
     1863msgid "Dismiss this notice"
     1864msgstr ""
     1865
     1866#: theme-wizard/tgm/class-tgm-plugin-activation.php:409
     1867msgid "There are one or more required or recommended plugins to install, update or activate."
     1868msgstr ""
     1869
     1870#: theme-wizard/tgm/class-tgm-plugin-activation.php:410
     1871msgid "Please contact the administrator of this site for help."
     1872msgstr ""
     1873
     1874#: theme-wizard/tgm/class-tgm-plugin-activation.php:616
     1875msgid "This plugin needs to be updated to be compatible with your theme."
     1876msgstr ""
     1877
     1878#: theme-wizard/tgm/class-tgm-plugin-activation.php:617
     1879msgid "Update Required"
     1880msgstr ""
     1881
     1882#: theme-wizard/tgm/class-tgm-plugin-activation.php:735
     1883msgid "Set the parent_slug config variable instead."
     1884msgstr ""
     1885
     1886#: theme-wizard/tgm/class-tgm-plugin-activation.php:1042
     1887msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
     1888msgstr ""
     1889
     1890#: theme-wizard/tgm/class-tgm-plugin-activation.php:1042
     1891#: theme-wizard/tgm/class-tgm-plugin-activation.php:1052
     1892msgid "Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines."
     1893msgstr ""
     1894
     1895#: theme-wizard/tgm/class-tgm-plugin-activation.php:1052
     1896msgid "The remote plugin package consists of more than one file, but the files are not packaged in a folder."
     1897msgstr ""
     1898
     1899#: theme-wizard/tgm/class-tgm-plugin-activation.php:1243
     1900#: theme-wizard/tgm/class-tgm-plugin-activation.php:3099
     1901msgctxt "plugin A *and* plugin B"
     1902msgid "and"
     1903msgstr ""
     1904
     1905#. translators: %s: version number
     1906#: theme-wizard/tgm/class-tgm-plugin-activation.php:2112
     1907msgid "TGMPA v%s"
     1908msgstr ""
     1909
     1910#: theme-wizard/tgm/class-tgm-plugin-activation.php:2421
     1911msgid "Required"
     1912msgstr ""
     1913
     1914#: theme-wizard/tgm/class-tgm-plugin-activation.php:2424
     1915msgid "Recommended"
     1916msgstr ""
     1917
     1918#: theme-wizard/tgm/class-tgm-plugin-activation.php:2440
     1919msgid "WordPress Repository"
     1920msgstr ""
     1921
     1922#: theme-wizard/tgm/class-tgm-plugin-activation.php:2443
     1923msgid "External Source"
     1924msgstr ""
     1925
     1926#: theme-wizard/tgm/class-tgm-plugin-activation.php:2446
     1927msgid "Pre-Packaged"
     1928msgstr ""
     1929
     1930#: theme-wizard/tgm/class-tgm-plugin-activation.php:2463
     1931msgid "Not Installed"
     1932msgstr ""
     1933
     1934#: theme-wizard/tgm/class-tgm-plugin-activation.php:2467
     1935msgid "Installed But Not Activated"
     1936msgstr ""
     1937
     1938#: theme-wizard/tgm/class-tgm-plugin-activation.php:2469
     1939msgid "Active"
     1940msgstr ""
     1941
     1942#: theme-wizard/tgm/class-tgm-plugin-activation.php:2475
     1943msgid "Required Update not Available"
     1944msgstr ""
     1945
     1946#: theme-wizard/tgm/class-tgm-plugin-activation.php:2478
     1947msgid "Requires Update"
     1948msgstr ""
     1949
     1950#: theme-wizard/tgm/class-tgm-plugin-activation.php:2481
     1951msgid "Update recommended"
     1952msgstr ""
     1953
     1954#. translators: 1: install status, 2: update status
     1955#: theme-wizard/tgm/class-tgm-plugin-activation.php:2490
     1956msgctxt "Install/Update Status"
     1957msgid "%1$s, %2$s"
     1958msgstr ""
     1959
     1960#. translators: 1: number of plugins.
     1961#: theme-wizard/tgm/class-tgm-plugin-activation.php:2536
     1962msgctxt "plugins"
     1963msgid "All <span class=\"count\">(%s)</span>"
     1964msgid_plural "All <span class=\"count\">(%s)</span>"
     1965msgstr[0] ""
     1966msgstr[1] ""
     1967
     1968#. translators: 1: number of plugins.
     1969#: theme-wizard/tgm/class-tgm-plugin-activation.php:2540
     1970msgid "To Install <span class=\"count\">(%s)</span>"
     1971msgid_plural "To Install <span class=\"count\">(%s)</span>"
     1972msgstr[0] ""
     1973msgstr[1] ""
     1974
     1975#. translators: 1: number of plugins.
     1976#: theme-wizard/tgm/class-tgm-plugin-activation.php:2544
     1977msgid "Update Available <span class=\"count\">(%s)</span>"
     1978msgid_plural "Update Available <span class=\"count\">(%s)</span>"
     1979msgstr[0] ""
     1980msgstr[1] ""
     1981
     1982#. translators: 1: number of plugins.
     1983#: theme-wizard/tgm/class-tgm-plugin-activation.php:2548
     1984msgid "To Activate <span class=\"count\">(%s)</span>"
     1985msgid_plural "To Activate <span class=\"count\">(%s)</span>"
     1986msgstr[0] ""
     1987msgstr[1] ""
     1988
     1989#: theme-wizard/tgm/class-tgm-plugin-activation.php:2630
     1990msgctxt "as in: \"version nr unknown\""
     1991msgid "unknown"
     1992msgstr ""
     1993
     1994#: theme-wizard/tgm/class-tgm-plugin-activation.php:2638
     1995msgid "Installed version:"
     1996msgstr ""
     1997
     1998#: theme-wizard/tgm/class-tgm-plugin-activation.php:2646
     1999msgid "Minimum required version:"
     2000msgstr ""
     2001
     2002#: theme-wizard/tgm/class-tgm-plugin-activation.php:2658
     2003msgid "Available version:"
     2004msgstr ""
     2005
     2006#: theme-wizard/tgm/class-tgm-plugin-activation.php:2681
     2007msgid "No plugins to install, update or activate."
     2008msgstr ""
     2009
     2010#: theme-wizard/tgm/class-tgm-plugin-activation.php:2695
     2011msgid "Plugin"
     2012msgstr ""
     2013
     2014#: theme-wizard/tgm/class-tgm-plugin-activation.php:2696
     2015msgid "Source"
     2016msgstr ""
     2017
     2018#: theme-wizard/tgm/class-tgm-plugin-activation.php:2697
     2019msgid "Type"
     2020msgstr ""
     2021
     2022#: theme-wizard/tgm/class-tgm-plugin-activation.php:2701
     2023msgid "Version"
     2024msgstr ""
     2025
     2026#: theme-wizard/tgm/class-tgm-plugin-activation.php:2702
     2027msgid "Status"
     2028msgstr ""
     2029
     2030#. translators: %2$s: plugin name in screen reader markup
     2031#: theme-wizard/tgm/class-tgm-plugin-activation.php:2751
     2032msgid "Install %2$s"
     2033msgstr ""
     2034
     2035#. translators: %2$s: plugin name in screen reader markup
     2036#: theme-wizard/tgm/class-tgm-plugin-activation.php:2756
     2037msgid "Update %2$s"
     2038msgstr ""
     2039
     2040#. translators: %2$s: plugin name in screen reader markup
     2041#: theme-wizard/tgm/class-tgm-plugin-activation.php:2762
     2042msgid "Activate %2$s"
     2043msgstr ""
     2044
     2045#: theme-wizard/tgm/class-tgm-plugin-activation.php:2834
     2046msgid "Upgrade message from the plugin author:"
     2047msgstr ""
     2048
     2049#: theme-wizard/tgm/class-tgm-plugin-activation.php:2867
     2050msgid "Install"
     2051msgstr ""
     2052
     2053#: theme-wizard/tgm/class-tgm-plugin-activation.php:2873
     2054msgid "Update"
     2055msgstr ""
     2056
     2057#: theme-wizard/tgm/class-tgm-plugin-activation.php:2876
     2058msgid "Activate"
     2059msgstr ""
     2060
     2061#: theme-wizard/tgm/class-tgm-plugin-activation.php:2907
     2062msgid "No plugins were selected to be installed. No action taken."
     2063msgstr ""
     2064
     2065#: theme-wizard/tgm/class-tgm-plugin-activation.php:2909
     2066msgid "No plugins were selected to be updated. No action taken."
     2067msgstr ""
     2068
     2069#: theme-wizard/tgm/class-tgm-plugin-activation.php:2950
     2070msgid "No plugins are available to be installed at this time."
     2071msgstr ""
     2072
     2073#: theme-wizard/tgm/class-tgm-plugin-activation.php:2952
     2074msgid "No plugins are available to be updated at this time."
     2075msgstr ""
     2076
     2077#: theme-wizard/tgm/class-tgm-plugin-activation.php:3059
     2078msgid "No plugins were selected to be activated. No action taken."
     2079msgstr ""
     2080
     2081#: theme-wizard/tgm/class-tgm-plugin-activation.php:3085
     2082msgid "No plugins are available to be activated at this time."
     2083msgstr ""
     2084
     2085#: theme-wizard/tgm/class-tgm-plugin-activation.php:3310
     2086msgid "Plugin activation failed."
     2087msgstr ""
     2088
     2089#. translators: 1: plugin name, 2: action number 3: total number of actions.
     2090#: theme-wizard/tgm/class-tgm-plugin-activation.php:3655
     2091msgid "Updating Plugin %1$s (%2$d/%3$d)"
     2092msgstr ""
     2093
     2094#. translators: 1: plugin name, 2: error message.
     2095#: theme-wizard/tgm/class-tgm-plugin-activation.php:3658
     2096msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
     2097msgstr ""
     2098
     2099#. translators: 1: plugin name.
     2100#: theme-wizard/tgm/class-tgm-plugin-activation.php:3660
     2101msgid "The installation of %1$s failed."
     2102msgstr ""
     2103
     2104#: theme-wizard/tgm/class-tgm-plugin-activation.php:3664
     2105msgid "The installation and activation process is starting. This process may take a while on some hosts, so please be patient."
     2106msgstr ""
     2107
     2108#. translators: 1: plugin name.
     2109#: theme-wizard/tgm/class-tgm-plugin-activation.php:3666
     2110msgid "%1$s installed and activated successfully."
     2111msgstr ""
     2112
     2113#: theme-wizard/tgm/class-tgm-plugin-activation.php:3667
     2114msgid "All installations and activations have been completed."
     2115msgstr ""
     2116
     2117#. translators: 1: plugin name, 2: action number 3: total number of actions.
     2118#: theme-wizard/tgm/class-tgm-plugin-activation.php:3669
     2119msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
     2120msgstr ""
     2121
     2122#: theme-wizard/tgm/class-tgm-plugin-activation.php:3672
     2123msgid "The installation process is starting. This process may take a while on some hosts, so please be patient."
     2124msgstr ""
     2125
     2126#. translators: 1: plugin name.
     2127#: theme-wizard/tgm/class-tgm-plugin-activation.php:3674
     2128msgid "%1$s installed successfully."
     2129msgstr ""
     2130
     2131#: theme-wizard/tgm/class-tgm-plugin-activation.php:3675
     2132msgid "All installations have been completed."
     2133msgstr ""
     2134
     2135#. translators: 1: plugin name, 2: action number 3: total number of actions.
     2136#: theme-wizard/tgm/class-tgm-plugin-activation.php:3677
     2137msgid "Installing Plugin %1$s (%2$d/%3$d)"
     2138msgstr ""
     2139
     2140#: theme-wizard/tgm/class-tgm-plugin-activation.php:3682
     2141msgid "Show Details"
     2142msgstr ""
     2143
     2144#: theme-wizard/tgm/class-tgm-plugin-activation.php:3682
     2145msgid "Hide Details"
     2146msgstr ""
     2147
     2148#: theme-wizard/tgm/tgm.php:9
     2149msgid "WooCommerce"
     2150msgstr ""
     2151
     2152#: theme-wizard/whizzie.php:200
    17392153msgid "More Info"
    17402154msgstr ""
    17412155
    1742 #: theme-wizard/whizzie.php:121
    1743 #: theme-wizard/whizzie.php:227
     2156#: theme-wizard/whizzie.php:220
     2157#: theme-wizard/whizzie.php:428
    17442158msgid "Visit Site"
    17452159msgstr ""
    17462160
    1747 #: theme-wizard/whizzie.php:185
     2161#: theme-wizard/whizzie.php:240
     2162msgid "Theme Setup Wizard"
     2163msgstr ""
     2164
     2165#: theme-wizard/whizzie.php:348
    17482166msgid "Thank you for choosing our theme! We are excited to help you get started with your new website."
    17492167msgstr ""
    17502168
    1751 #: theme-wizard/whizzie.php:186
     2169#: theme-wizard/whizzie.php:349
    17522170msgid "This section will guide you through setting up and customizing the theme. You can follow the steps to import demo content or adjust settings at any time to make the website look and work the way you want."
    17532171msgstr ""
    17542172
    1755 #: theme-wizard/whizzie.php:193
     2173#: theme-wizard/whizzie.php:364
     2174msgid "Additional plugins always make your website exceptional. Install these plugins by clicking the install button. You may also deactivate them from the dashboard."
     2175msgstr ""
     2176
     2177#: theme-wizard/whizzie.php:393
    17562178msgid "To get started, use the button below to import demo content and add widgets to your site. After installation, you can manage settings and customize your site using the Customizer. Enjoy your new theme!"
    17572179msgstr ""
    17582180
    1759 #: theme-wizard/whizzie.php:201
     2181#: theme-wizard/whizzie.php:402
    17602182msgid "Setup Navigation Menu"
    17612183msgstr ""
    17622184
    1763 #: theme-wizard/whizzie.php:202
     2185#: theme-wizard/whizzie.php:403
    17642186msgid "Follow the following Steps to Setup Menu"
    17652187msgstr ""
    17662188
    1767 #: theme-wizard/whizzie.php:203
     2189#: theme-wizard/whizzie.php:404
    17682190msgid "A) Create Pages"
    17692191msgstr ""
    17702192
    1771 #: theme-wizard/whizzie.php:205
     2193#: theme-wizard/whizzie.php:406
    17722194msgid "Go to Dashboard >> Pages >> Add New"
    17732195msgstr ""
    17742196
    1775 #: theme-wizard/whizzie.php:206
     2197#: theme-wizard/whizzie.php:407
    17762198msgid "Enter Page Details And Save Changes"
    17772199msgstr ""
    17782200
    1779 #: theme-wizard/whizzie.php:208
     2201#: theme-wizard/whizzie.php:409
    17802202msgid "B) Add Pages To Menu"
    17812203msgstr ""
    17822204
    1783 #: theme-wizard/whizzie.php:210
     2205#: theme-wizard/whizzie.php:411
    17842206msgid "Go to Dashboard >> Appearance >> Menu"
    17852207msgstr ""
    17862208
    1787 #: theme-wizard/whizzie.php:211
     2209#: theme-wizard/whizzie.php:412
    17882210msgid "Click On The Create Menu Option"
    17892211msgstr ""
    17902212
    1791 #: theme-wizard/whizzie.php:212
     2213#: theme-wizard/whizzie.php:413
    17922214msgid "Select The Pages And Click On The Add to Menu Button"
    17932215msgstr ""
    17942216
    1795 #: theme-wizard/whizzie.php:213
     2217#: theme-wizard/whizzie.php:414
    17962218msgid "Select Primary Menu From The Menu Setting"
    17972219msgstr ""
    17982220
    1799 #: theme-wizard/whizzie.php:214
     2221#: theme-wizard/whizzie.php:415
    18002222msgid "Click On The Save Menu Button"
    18012223msgstr ""
    18022224
    1803 #: theme-wizard/whizzie.php:218
     2225#: theme-wizard/whizzie.php:419
    18042226msgid "Setup Footer Widgets"
    18052227msgstr ""
    18062228
    1807 #: theme-wizard/whizzie.php:219
     2229#: theme-wizard/whizzie.php:420
    18082230msgid "Follow the following Steps to Setup Footer Widgets"
    18092231msgstr ""
    18102232
    1811 #: theme-wizard/whizzie.php:221
     2233#: theme-wizard/whizzie.php:422
    18122234msgid "Go to Dashboard >> Appearance >> Widgets"
    18132235msgstr ""
    18142236
    1815 #: theme-wizard/whizzie.php:222
     2237#: theme-wizard/whizzie.php:423
    18162238msgid "Drag And Add The Widgets In The Footer Columns"
    18172239msgstr ""
    18182240
    1819 #: theme-wizard/whizzie.php:230
     2241#: theme-wizard/whizzie.php:431
    18202242msgid "Customize Your Demo"
    18212243msgstr ""
    18222244
    1823 #: theme-wizard/whizzie.php:233
     2245#: theme-wizard/whizzie.php:434
    18242246msgid "Dashboard"
    18252247msgstr ""
    18262248
    1827 #: theme-wizard/whizzie.php:265
     2249#: theme-wizard/whizzie.php:487
     2250msgid "Activating Plugin"
     2251msgstr ""
     2252
     2253#: theme-wizard/whizzie.php:502
     2254msgid "Updating Plugin"
     2255msgstr ""
     2256
     2257#: theme-wizard/whizzie.php:517
     2258msgid "Installing Plugin"
     2259msgstr ""
     2260
     2261#: theme-wizard/whizzie.php:526
     2262msgid "Success"
     2263msgstr ""
     2264
     2265#: theme-wizard/whizzie.php:559
    18282266msgid "About"
    18292267msgstr ""
  • aster-travel-blog/2.5.1/readme.txt

    r354840 r356445  
    66Requires at least: 5.0
    77Tested up to: 7.0
    8 Stable tag: 2.4.9
     8Stable tag: 2.5.1
    99Requires PHP: 7.4
    1010License: GNU General Public License v3 or later
    … …  
    177177* Updated Theme.
    178178
     179= 2.5.1 =
     180* Updated Demo import code.
     181
    179182== Images Screenshot ==
    180183
  • aster-travel-blog/2.5.1/style.css

    r354840 r356445  
    55Author URI: https://asterthemes.com
    66Description: The Aster Travel Blog Theme is a dynamic and feature-packed template tailored for travel lovers, including bloggers, digital nomads, globetrotters, and adventure seekers who want to craft an engaging online travel guide. This theme is perfect for displaying stunning wanderlust photography, travel vlogs, and a variety of travel experiences—ranging from budget tips and luxury reviews to solo trips and group excursions. With its sleek, responsive, and SEO-optimized design, it enhances visibility for keywords like travel blog and adventure blog. The theme features a customiser for adjustable homepage sections, interactive widgets, trending post layouts, and ad spaces to facilitate effective monetization through affiliate marketing and sponsored content. Additionally, seamless integrations with platforms such as Instagram, Pinterest, and YouTube enhance content engagement, while newsletter signup forms aid in building an email list to foster audience growth. Aster is well-suited for documenting both local and global travel adventures, gear reviews, food trails, and cultural experiences, providing a visually appealing and functional platform to inspire readers and connect with a worldwide audience.
    7 Version: 2.4.9
     7Version: 2.5.1
    88Tested up to: 7.1
    99Requires PHP: 7.4
  • aster-travel-blog/2.5.1/theme-library/function-files/template-functions.php

    r353516 r356445  
    495495        <div class="getstrat updated notice notice-success is-dismissible notice-get-started-class">
    496496            <div class="at-admin-content" >
    497                 <h2><?php esc_html_e('Welcome to Aster Travel Blog', 'aster-travel-blog'); ?></h2>
     497                <h2><?php echo esc_html( ASTER_TRAVEL_BLOG_WELCOME_MESSAGE ); ?></h2>
    498498                <p><?php _e('Explore the features of our Pro Theme and take your Travel journey to the next level.', 'aster-travel-blog'); ?></p>
    499499                <p ><?php _e('Get Started With Theme By Clicking On Getting Started.', 'aster-travel-blog'); ?><p>
  • aster-travel-blog/2.5.1/theme-library/getting-started/getting-started.php

    r353516 r356445  
    7171                                                        <div class="btns-wizard">
    7272                                                                <?php if ( ! get_option( $aster_travel_blog_demo_option ) ) : ?>
    73                                                                         <a href="<?php echo esc_url( admin_url( 'themes.php?page=astertravelblog-wizard' ) ); ?>" class="button button-primary wizard">
    74                                                                                 <?php esc_html_e( 'Import Theme Demo', 'aster-travel-blog' ); ?>
    75                                                                         </a>
     73
     74                                                                        <?php
     75                                                                        $aster_travel_blog_theme_name = wp_get_theme()->get( 'Name' );
     76                                                                        $aster_travel_blog_demo_importer_url = '';
     77
     78                                                                        if ( $aster_travel_blog_theme_name === 'Aster Travel Blog' ) {
     79                                                                                $aster_travel_blog_demo_importer_url = admin_url( 'themes.php?page=astertravelblog-wizard' );
     80                                                                        } elseif ( $aster_travel_blog_theme_name === 'Travel Blog Lite' ) {
     81                                                                                $aster_travel_blog_demo_importer_url = admin_url( 'themes.php?page=travelbloglite-wizard' );
     82                                                                        }
     83                                                                        ?>
     84
     85                                                                        <?php if ( ! empty( $aster_travel_blog_demo_importer_url ) ) : ?>
     86                                                                                <a href="<?php echo esc_url( $aster_travel_blog_demo_importer_url ); ?>"
     87                                                                                class="button button-primary wizard">
     88                                                                                        <?php esc_html_e( 'Import Theme Demo', 'aster-travel-blog' ); ?>
     89                                                                                </a>
     90                                                                        <?php endif; ?>
     91
    7692                                                                <?php else : ?>
    77                                                                         <a target="_blank" href="<?php echo esc_url( home_url() ); ?>" class="button button-primary view-site">
     93                                                                        <a target="_blank"
     94                                                                        href="<?php echo esc_url( home_url( '/' ) ); ?>"
     95                                                                        class="button button-primary view-site">
    7896                                                                                <?php esc_html_e( 'Visit Your Website', 'aster-travel-blog' ); ?>
    7997                                                                        </a>
  • aster-travel-blog/2.5.1/theme-wizard/assets/js/theme-wizard-script.js

    r265719 r356445  
    1 var Whizzie = (function ($) {
    2   var current_step = '', step_pointer = '';
    3 
     1var Whizzie = (function($) {
     2
     3  var t;
     4  var current_step = '';
     5  var step_pointer = '';
     6
     7  // callbacks from form button clicks.
    48  var callbacks = {
    5     do_next_step: function (btn) {
    6       do_next_step(btn);
     9    do_next_step: function(btn) {
     10       do_next_step(btn);
    711    },
    8     install_widgets: function (btn) {
     12    install_plugins: function(btn) {
     13      var plugins = new PluginManager();
     14      plugins.init(btn);
     15    },
     16    install_widgets: function(btn) {
    917      var widgets = new WidgetManager();
    1018      widgets.init(btn);
    1119    },
    12     install_content: function (btn) {
     20    install_content: function(btn) {
    1321      var content = new ContentManager();
    1422      content.init(btn);
    15     },
     23    }
    1624  };
    1725
    1826  function window_loaded() {
    1927    var maxHeight = 0;
    20     $('.whizzie-menu li.step').each(function () {
     28
     29    $('.whizzie-menu li.step').each(function(index) {
    2130      $(this).attr('data-height', $(this).innerHeight());
    22       maxHeight = Math.max(maxHeight, $(this).innerHeight());
    23     });
    24 
    25     $('.whizzie-menu li .detail').each(function () {
    26       $(this).attr('data-height', $(this).innerHeight()).addClass('scale-down');
    27     });
     31      if ($(this).innerHeight() > maxHeight) {
     32        maxHeight = $(this).innerHeight();
     33      }
     34    });
     35
     36    $('.whizzie-menu li .detail').each(function(index) {
     37      $(this).attr('data-height', $(this).innerHeight());
     38      $(this).addClass('scale-down');
     39    });
     40
    2841
    2942    $('.whizzie-menu li.step').css('height', '100%');
    30     $('.whizzie-menu li.step:first-child, .whizzie-nav li:first-child').addClass('active-step');
     43    $('.whizzie-menu li.step:first-child').addClass('active-step');
     44    $('.whizzie-nav li:first-child').addClass('active-step');
     45
    3146    $('.whizzie-wrap').addClass('loaded');
    3247
    33     $('.do-it').on('click', function (e) {
     48    // init button clicks:
     49    $('.do-it').on('click', function(e) {
    3450      e.preventDefault();
    3551      step_pointer = $(this).data('step');
    36       current_step = $('.step-' + step_pointer);
     52      current_step = $('.step-' + $(this).data('step'));
    3753      $('.whizzie-wrap').addClass('spinning');
    38       var callback = $(this).data('callback');
    39       if (callback && callbacks[callback]) {
    40         callbacks[callback](this);
     54      // setTimeout(myFunc,2000);
     55      // function myFunc(){
     56      //   $('.whizzie-wrap').removeClass('spinning');
     57      // }
     58      if ($(this).data('callback') && typeof callbacks[$(this).data('callback')] != 'undefined') {
     59        // we have to process a callback before continue with form submission
     60        callbacks[$(this).data('callback')](this);
     61        return false;
    4162      } else {
    4263        loading_content();
    43       }
    44     });
    45 
    46     $('.more-info').on('click', function (e) {
     64        return true;
     65      }
     66    });
     67
     68    $('.button-upload').on('click', function(e) {
    4769      e.preventDefault();
    48       toggleDetail($(this).closest('.step'), maxHeight);
    49     }).trigger('click');
    50   }
    51 
    52   function toggleDetail(parent, maxHeight) {
    53     parent.toggleClass('show-detail');
    54     var detail = parent.find('.detail');
    55     if (parent.hasClass('show-detail')) {
    56       parent.animate({ height: parent.data('height') + detail.data('height') }, 500, function () {
    57         detail.toggleClass('scale-down');
    58       }).css('overflow', 'visible');
    59     } else {
    60       parent.animate({ height: maxHeight }, 500, function () {
    61         detail.toggleClass('scale-down');
    62       }).css('overflow', 'visible');
    63     }
    64   }
    65 
    66   function do_next_step() {
    67     current_step.removeClass('active-step').addClass('done-step').fadeOut(500, function () {
     70      renderMediaUploader();
     71    });
     72    $('.theme-presets a').on('click', function(e) {
     73      e.preventDefault();
     74      var $ul = $(this).parents('ul').first();
     75      $ul.find('.current').removeClass('current');
     76      var $li = $(this).parents('li').first();
     77      $li.addClass('current');
     78      var newcolor = $(this).data('style');
     79      $('#new_style').val(newcolor);
     80      return false;
     81    });
     82    $('.more-info').on('click', function(e) {
     83      e.preventDefault();
     84      var parent = $(this).parent().parent();
     85      parent.toggleClass('show-detail');
     86      if (parent.hasClass('show-detail')) {
     87        var detail = parent.find('.detail');
     88        parent.animate({
     89            height: parent.data('height') + detail.data('height')
     90          },
     91          500,
     92          function() {
     93            detail.toggleClass('scale-down');
     94          }).css('overflow', 'visible');;
     95      } else {
     96        parent.animate({
     97            height: maxHeight
     98          },
     99          500,
     100          function() {
     101            detail = parent.find('.detail');
     102            detail.toggleClass('scale-down');
     103          }).css('overflow', 'visible');
     104      }
     105    });
     106
     107    $( '.more-info' ).trigger('click');
     108  }
     109
     110  function loading_content() {
     111
     112  }
     113
     114
     115  function do_next_step(btn) {
     116    current_step.removeClass('active-step');
     117    $('.nav-step-' + step_pointer).removeClass('active-step');
     118    current_step.addClass('done-step');
     119    $('.nav-step-' + step_pointer).addClass('done-step');
     120    current_step.fadeOut(500, function() {
    68121      current_step = current_step.next();
    69122      step_pointer = current_step.data('step');
    70       current_step.fadeIn().addClass('active-step');
     123      current_step.fadeIn();
     124      current_step.addClass('active-step');
    71125      $('.nav-step-' + step_pointer).addClass('active-step');
    72126      $('.whizzie-wrap').removeClass('spinning');
    … …  
    74128  }
    75129
     130  function PluginManager() {
     131
     132    var complete;
     133    var items_completed = 0;
     134    var current_item = '';
     135    var $current_node;
     136    var current_item_hash = '';
     137
     138    function ajax_callback(response) {
     139      if (typeof response == 'object' && typeof response.message != 'undefined') {
     140        $current_node.find('span').text(response.message);
     141        if (typeof response.url != 'undefined') {
     142          // we have an ajax url action to perform.
     143
     144          if (response.hash == current_item_hash) {
     145            $current_node.find('span').text("failed");
     146            find_next();
     147          } else {
     148            current_item_hash = response.hash;
     149            jQuery.post(response.url, response, function(response2) {
     150              process_current();
     151              $current_node.find('span').text(response.message + aster_travel_blog_whizzie_params.verify_text);
     152            }).fail(ajax_callback);
     153          }
     154
     155        } else if (typeof response.done != 'undefined') {
     156          // finished processing this plugin, move onto next
     157          find_next();
     158        } else {
     159          // error processing this plugin
     160          find_next();
     161        }
     162      } else {
     163        // error - try again with next plugin
     164        $current_node.find('span').text("ajax error");
     165        find_next();
     166      }
     167    }
     168
     169    function process_current() {
     170      if (current_item) {
     171        // query our ajax handler to get the ajax to send to TGM
     172        // if we don't get a reply we can assume everything worked and continue onto the next one.
     173        jQuery.post(aster_travel_blog_whizzie_params.ajaxurl, {
     174          action: 'setup_plugins',
     175          wpnonce: aster_travel_blog_whizzie_params.wpnonce,
     176          slug: current_item
     177        }, ajax_callback).fail(ajax_callback);
     178      }
     179    }
     180
     181    function find_next() {
     182      var do_next = false;
     183      if ($current_node) {
     184        if (!$current_node.data('done_item')) {
     185          items_completed++;
     186          $current_node.data('done_item', 1);
     187        }
     188        $current_node.find('.spinner').css('visibility', 'hidden');
     189      }
     190      var $li = $('.whizzie-do-plugins li');
     191      $li.each(function() {
     192        if (current_item == '' || do_next) {
     193          current_item = $(this).data('slug');
     194          $current_node = $(this);
     195          process_current();
     196          do_next = false;
     197        } else if ($(this).data('slug') == current_item) {
     198          do_next = true;
     199        }
     200      });
     201      if (items_completed >= $li.length) {
     202        // finished all plugins!
     203        complete();
     204      }
     205    }
     206
     207    return {
     208      init: function(btn) {
     209        $('.envato-wizard-plugins').addClass('installing');
     210        complete = function() {
     211           do_next_step();
     212          // window.location.href=btn.href;
     213          // window.location.href = "http://localhost/catapult_themes/whizzie/wp-admin/themes.php?page=whizzie";
     214        };
     215        find_next();
     216      }
     217    }
     218  }
     219
    76220  function WidgetManager() {
    77221    function import_widgets() {
    78       jQuery.post(aster_travel_blog_whizzie_params.ajaxurl, {
    79         action: 'setup_widgets',
    80         wpnonce: aster_travel_blog_whizzie_params.wpnonce
    81       }, complete);
    82     }
    83 
     222      jQuery.post(
     223        aster_travel_blog_whizzie_params.ajaxurl, {
     224          action: 'setup_widgets',
     225          wpnonce: aster_travel_blog_whizzie_params.wpnonce
     226        },
     227        complete
     228      );
     229    }
    84230    return {
    85       init: function () {
    86         complete = function () { do_next_step(); };
     231      init: function(btn) {
     232        complete = function() {
     233           do_next_step();
     234        }
    87235        import_widgets();
    88236      }
    89     };
     237    }
    90238  }
    91239
    92240  function ContentManager() {
    93     var complete, current_item = '', $current_node;
     241
     242    var complete;
     243    var items_completed = 0;
     244    var current_item = '';
     245    var $current_node;
     246    var current_item_hash = '';
    94247
    95248    function ajax_callback(response) {
    96       if (response && response.message) {
     249      if (typeof response == 'object' && typeof response.message != 'undefined') {
    97250        $current_node.find('span').text(response.message);
    98         if (response.url) {
    99           jQuery.post(response.url, response, ajax_callback)
    100             .fail(function () {
    101               $current_node.find('span').text("Error during AJAX call.");
    102             });
     251        if (typeof response.url != 'undefined') {
     252          // we have an ajax url action to perform.
     253          if (response.hash == current_item_hash) {
     254            $current_node.find('span').text("failed");
     255            find_next();
     256          } else {
     257            current_item_hash = response.hash;
     258            jQuery.post(response.url, response, ajax_callback).fail(ajax_callback); // recuurrssionnnnn
     259          }
     260        } else if (typeof response.done != 'undefined') {
     261          // finished processing this plugin, move onto next
     262          find_next();
     263        } else {
     264          // error processing this plugin
     265          find_next();
    103266        }
    104267      } else {
    105         console.error('Unexpected response format', response);
    106       }
    107     }
     268        // error - try again with next plugin
     269        $current_node.find('span').text("ajax error");
     270        find_next();
     271      }
     272    }
     273
     274    function process_current() {
     275      if (current_item) {
     276
     277        var $check = $current_node.find('input:checkbox');
     278        if ($check.is(':checked')) {
     279          // process htis one!
     280          jQuery.post(aster_travel_blog_whizzie_params.ajaxurl, {
     281            action: 'envato_setup_content',
     282            wpnonce: aster_travel_blog_whizzie_params.wpnonce,
     283            content: current_item
     284          }, ajax_callback).fail(ajax_callback);
     285        } else {
     286          $current_node.find('span').text("Skipping");
     287          setTimeout(find_next, 100);
     288        }
     289      }
     290    }
     291
    108292
    109293    return {
    110       init: function (btn) {
    111         complete = function () {
     294      init: function(btn) {
     295        $('.envato-setup-pages').addClass('installing');
     296        $('.envato-setup-pages').find('input').prop("disabled", true);
     297        complete = function() {
    112298          loading_content();
    113299          window.location.href = btn.href;
    … …  
    115301        find_next();
    116302      }
    117     };
     303    }
     304  }
     305
     306  /**
     307   * Callback function for the 'click' event of the 'Set Footer Image'
     308   * anchor in its meta box.
     309   *
     310   * Displays the media uploader for selecting an image.
     311   *
     312   * @since 0.1.0
     313   */
     314  function renderMediaUploader() {
     315    'use strict';
     316
     317    var file_frame, attachment;
     318
     319    if (undefined !== file_frame) {
     320      file_frame.open();
     321      return;
     322    }
     323
     324    file_frame = wp.media.frames.file_frame = wp.media({
     325      title: 'Upload Logo', //jQuery( this ).data( 'uploader_title' ),
     326      button: {
     327        text: 'Select Logo' //jQuery( this ).data( 'uploader_button_text' )
     328      },
     329      multiple: false // Set to true to allow multiple files to be selected
     330    });
     331
     332    // When an image is selected, run a callback.
     333    file_frame.on('select', function() {
     334      // We set multiple to false so only get one image from the uploader
     335      attachment = file_frame.state().get('selection').first().toJSON();
     336
     337      jQuery('.site-logo').attr('src', attachment.url);
     338      jQuery('#new_logo_id').val(attachment.id);
     339      // Do something with attachment.id and/or attachment.url here
     340    });
     341    // Now display the actual file_frame
     342    file_frame.open();
     343
    118344  }
    119345
    120346  return {
    121     init: function () {
     347    init: function() {
     348      t = this;
    122349      $(window_loaded);
    123     }
    124   };
     350    },
     351    callback: function(func) {
     352      console.log(func);
     353      console.log(this);
     354    }
     355  }
    125356
    126357})(jQuery);
    … …  
    128359Whizzie.init();
    129360
    130 // Tab content functionality
    131361function openCity(evt, cityName) {
    132   var tabcontent = document.getElementsByClassName("tabcontent");
    133   for (var i = 0; i < tabcontent.length; i++) {
    134     tabcontent[i].style.display = "none";
    135   }
    136   var tablinks = document.getElementsByClassName("tablinks");
    137   for (var i = 0; i < tablinks.length; i++) {
    138     tablinks[i].className = tablinks[i].className.replace(" active", "");
    139   }
    140   document.getElementById(cityName).style.display = "block";
    141   evt.currentTarget.className += " active";
     362    var i, tabcontent, tablinks;
     363    tabcontent = document.getElementsByClassName("tabcontent");
     364    for (i = 0; i < tabcontent.length; i++) {
     365        tabcontent[i].style.display = "none";
     366    }
     367    tablinks = document.getElementsByClassName("tablinks");
     368    for (i = 0; i < tablinks.length; i++) {
     369        tablinks[i].className = tablinks[i].className.replace(" active", "");
     370    }
     371    document.getElementById(cityName).style.display = "block";
     372    evt.currentTarget.className += " active";
    142373}
    143374
    144 // jQuery DOM ready function for setup navigation
    145 jQuery(document).ready(function () {
     375jQuery(document).ready(function() {
     376
    146377  jQuery('#at-demo-setup-guid .at-setup-menu').attr("checked", "checked");
    147378
    148   jQuery('#at-setup-menu').click(function () {
    149     jQuery('#at-demo-setup-guid .at-setup-menu').show();
    150     jQuery('#at-demo-setup-guid .at-setup-contact, #at-demo-setup-guid .at-setup-widget').hide();
     379  jQuery('#at-setup-menu').click(function() {
     380    jQuery('#at-demo-setup-guid .at-setup-menu').css("display", "block");
     381    jQuery('#at-demo-setup-guid .at-setup-contact').css("display", "none");
     382    jQuery('#at-demo-setup-guid .at-setup-widget').css("display", "none");
    151383  });
    152384
    153   jQuery('#at-setup-contact').click(function () {
    154     jQuery('#at-demo-setup-guid .at-setup-contact').show();
    155     jQuery('#at-demo-setup-guid .at-setup-menu, #at-demo-setup-guid .at-setup-widget').hide();
     385  jQuery('#at-setup-contact').click(function() {
     386    jQuery('#at-demo-setup-guid .at-setup-menu').css("display", "none");
     387    jQuery('#at-demo-setup-guid .at-setup-contact').css("display", "block");
     388    jQuery('#at-demo-setup-guid .at-setup-widget').css("display", "none");
    156389  });
    157390
    158   jQuery('#at-setup-widget').click(function () {
    159     jQuery('#at-demo-setup-guid .at-setup-widget').show();
    160     jQuery('#at-demo-setup-guid .at-setup-menu, #at-demo-setup-guid .at-setup-contact').hide();
     391  jQuery('#at-setup-widget').click(function() {
     392    jQuery('#at-demo-setup-guid .at-setup-menu').css("display", "none");
     393    jQuery('#at-demo-setup-guid .at-setup-contact').css("display", "none");
     394    jQuery('#at-demo-setup-guid .at-setup-widget').css("display", "block");
    161395  });
    162396});
  • aster-travel-blog/2.5.1/theme-wizard/config.php

    r265719 r356445  
    88 */
    99
    10 /*** Define constants ***/
     10/**
     11 * Define constants
     12 **/
    1113if ( ! defined( 'WHIZZIE_DIR' ) ) {
    1214        define( 'WHIZZIE_DIR', dirname( __FILE__ ) );
    … …  
    1921
    2022
    21 /*** Make changes below ***/
     23/**
     24 * Make changes below
     25 **/
    2226
    2327// Change the title and slug of your wizard page
    … …  
    3539                'can_skip'              => false // Show a skip button?
    3640        ),
     41        'plugins' => array(
     42                'id'                    => 'plugins',
     43                'title'                 => __( 'Plugins', 'aster-travel-blog' ),
     44                'icon'                  => 'admin-plugins',
     45                'button_text'   => __( 'Install Plugins', 'aster-travel-blog' ),
     46                'can_skip'              => false
     47        ),
    3748        'widgets' => array(
    3849                'id'                    => 'widgets',
    … …  
    4960);
    5061
    51 /*** This kicks off the wizard ***/
     62/**
     63 * This kicks off the wizard
     64 **/
    5265if( class_exists( 'Whizzie' ) ) {
    5366        $Whizzie = new Whizzie( $config );
  • aster-travel-blog/2.5.1/theme-wizard/whizzie.php

    r353516 r356445  
    11<?php
    22/**
    3 * Wizard
    4 * @package Whizzie
    5 * @since 1.0.0
    6 */
     3 * Wizard
     4 *
     5 * @package Whizzie
     6 * @author Aster Themes
     7 * @since 1.0.0
     8 */
    79
    810class Whizzie {
     11
    912        protected $version = '1.1.0';
    1013        protected $theme_name = '';
    … …  
    1316        protected $page_title = '';
    1417        protected $config_steps = array();
     18        public $plugin_path;
    1519        public $parent_slug;
    1620        /**
    17          * Constructor
    18          * @param $config Configuration parameters
     21         * Relative plugin url for this plugin folder
     22         * @since 1.0.0
     23         * @var string
    1924         */
     25        protected $plugin_url = '';
     26
     27        /**
     28         * TGMPA instance storage
     29         *
     30         * @var object
     31         */
     32        protected $tgmpa_instance;
     33
     34        /**
     35         * TGMPA Menu slug
     36         *
     37         * @var string
     38         */
     39        protected $tgmpa_menu_slug = 'tgmpa-install-plugins';
     40
     41        /**
     42         * TGMPA Menu url
     43         *
     44         * @var string
     45         */
     46        protected $tgmpa_url = 'themes.php?page=tgmpa-install-plugins';
     47
     48        /*** Constructor ***
     49        * @param $config        Our config parameters
     50        */
    2051        public function __construct( $config ) {
    2152                $this->set_vars( $config );
    … …  
    2455
    2556        /**
    26          * Set variables based on configuration
    27          * @param $config Configuration parameters
    28          */
     57        * Set some settings
     58        * @since 1.0.0
     59        * @param $config        Our config parameters
     60        */
     61
    2962        public function set_vars( $config ) {
    30                 if ( isset( $config['page_slug'] ) ) {
     63                // require_once trailingslashit( WHIZZIE_DIR ) . 'tgm/class-tgm-plugin-activation.php';
     64                require_once trailingslashit( WHIZZIE_DIR ) . 'tgm/tgm.php';
     65
     66                if( isset( $config['page_slug'] ) ) {
    3167                        $this->page_slug = esc_attr( $config['page_slug'] );
    3268                }
    33                 if ( isset( $config['page_title'] ) ) {
     69                if( isset( $config['page_title'] ) ) {
    3470                        $this->page_title = esc_attr( $config['page_title'] );
    3571                }
    36                 if ( isset( $config['steps'] ) ) {
     72                if( isset( $config['steps'] ) ) {
    3773                        $this->config_steps = $config['steps'];
    3874                }
    3975
     76                $this->plugin_path = trailingslashit( dirname( __FILE__ ) );
     77                $relative_url = str_replace( get_template_directory(), '', $this->plugin_path );
     78                $this->plugin_url = trailingslashit( get_template_directory_uri() . $relative_url );
    4079                $current_theme = wp_get_theme();
    4180                $this->theme_title = $current_theme->get( 'Name' );
    … …  
    4584        }
    4685
    47         /*** Initialize hooks and actions ***/
     86        /**
     87         * Hooks and filters
     88         * @since 1.0.0
     89         */
    4890        public function init() {
     91                if ( class_exists( 'TGM_Plugin_Activation' ) && isset( $GLOBALS['tgmpa'] ) ) {
     92                        add_action( 'init', array( $this, 'get_tgmpa_instance' ), 30 );
     93                        add_action( 'init', array( $this, 'set_tgmpa_url' ), 40 );
     94                }
    4995                add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
    5096                add_action( 'admin_menu', array( $this, 'menu_page' ) );
     97                add_action( 'admin_init', array( $this, 'get_plugins' ), 30 );
     98                add_filter( 'tgmpa_load', array( $this, 'tgmpa_load' ), 10, 1 );
     99                add_action( 'wp_ajax_setup_plugins', array( $this, 'setup_plugins' ) );
    51100                add_action( 'wp_ajax_setup_widgets', array( $this, 'setup_widgets' ) );
    52101        }
    53        
     102
    54103        public function enqueue_scripts() {
    55104                wp_enqueue_style( 'theme-wizard-style', get_template_directory_uri() . '/theme-wizard/assets/css/theme-wizard-style.css');
    56                 wp_register_script( 'theme-wizard-script', get_template_directory_uri() . '/theme-wizard/assets/js/theme-wizard-script.js', array( 'jquery' ));
     105                wp_register_script( 'theme-wizard-script', get_template_directory_uri() . '/theme-wizard/assets/js/theme-wizard-script.js', array( 'jquery' ), );
     106
    57107                wp_localize_script(
    58108                        'theme-wizard-script',
    59109                        'aster_travel_blog_whizzie_params',
    60110                        array(
    61                                 'ajaxurl' => admin_url( 'admin-ajax.php' ),
    62                                 'verify_text' => esc_html( 'verifying', 'aster-travel-blog' )
     111                                'ajaxurl'               => admin_url( 'admin-ajax.php' ),
     112                                'verify_text'   => esc_html( 'verifying', 'aster-travel-blog' )
    63113                        )
    64114                );
    … …  
    66116        }
    67117
     118        public static function get_instance() {
     119                if ( ! self::$instance ) {
     120                        self::$instance = new self;
     121                }
     122                return self::$instance;
     123        }
     124
     125        public function tgmpa_load( $status ) {
     126                return is_admin() || current_user_can( 'install_themes' );
     127        }
     128
     129        /**
     130         * Get configured TGMPA instance
     131         *
     132         * @access public
     133         * @since 1.1.2*/
     134        public function get_tgmpa_instance() {
     135                $this->tgmpa_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
     136        }
     137
     138        /**
     139         * Update $tgmpa_menu_slug and $tgmpa_parent_slug from TGMPA instance
     140         *
     141         * @access public
     142         * @since 1.1.2
     143         */
     144        public function set_tgmpa_url() {
     145                $this->tgmpa_menu_slug = ( property_exists( $this->tgmpa_instance, 'menu' ) ) ? $this->tgmpa_instance->menu : $this->tgmpa_menu_slug;
     146                $this->tgmpa_menu_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_tgmpa_menu_slug', $this->tgmpa_menu_slug );
     147                $tgmpa_parent_slug = ( property_exists( $this->tgmpa_instance, 'parent_slug' ) && $this->tgmpa_instance->parent_slug !== 'themes.php' ) ? 'admin.php' : 'themes.php';
     148                $this->tgmpa_url = apply_filters( $this->theme_name . '_theme_setup_wizard_tgmpa_url', $tgmpa_parent_slug . '?page=' . $this->tgmpa_menu_slug );
     149        }
     150
     151        /***        Make a modal screen for the wizard        ***/
     152       
    68153        public function menu_page() {
    69154                add_theme_page( esc_html( $this->page_title ), esc_html( $this->page_title ), 'manage_options', $this->page_slug, array( $this, 'aster_travel_blog_setup_wizard' ) );
    70155        }
    71156
    72         /*** Display the wizard page content ***/
    73         public function wizard_page() { ?>
     157        /***        Make an interface for the wizard        ***/
     158
     159        public function wizard_page() {
     160                tgmpa_load_bulk_installer();
     161                // install plugins with TGM.
     162                if ( ! class_exists( 'TGM_Plugin_Activation' ) || ! isset( $GLOBALS['tgmpa'] ) ) {
     163                        die( 'Failed to find TGM' );
     164                }
     165                $url = wp_nonce_url( add_query_arg( array( 'plugins' => 'go' ) ), 'whizzie-setup' );
     166
     167                // copied from TGM
     168                $method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
     169                $fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem.
     170                if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) {
     171                        return true; // Stop the normal page form from displaying, credential request form will be shown.
     172                }
     173                // Now we have some credentials, setup WP_Filesystem.
     174                if ( ! WP_Filesystem( $creds ) ) {
     175                        // Our credentials were no good, ask the user for them again.
     176                        request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields );
     177                        return true;
     178                }
     179                /* If we arrive here, we have the filesystem */ ?>
    74180                <div class="main-wrap">
    75                         <div class="card whizzie-wrap">
    76                                 <ul class="whizzie-menu">
    77                                         <?php foreach ( $this->get_steps() as $step ) : ?>
    78                                                 <li data-step="<?php echo esc_attr( $step['id'] ); ?>" class="step step-<?php echo esc_attr( $step['id'] ); ?>">
    79 
    80                                                         <h2><?php echo esc_html( $step['title'] ); ?></h2>
    81 
    82                                                         <?php
    83                                                         $content = call_user_func( array( $this, $step['view'] ) );
    84                                                         ?>
    85 
    86                                                         <?php if ( isset( $content['summary'] ) ) : ?>
    87                                                                 <div class="summary">
    88                                                                         <?php echo wp_kses_post( $content['summary'] ); ?>
    89                                                                 </div>
    90                                                         <?php endif; ?>
    91 
    92                                                         <?php if ( isset( $content['detail'] ) ) : ?>
    93                                                                 <p>
    94                                                                         <a href="#" class="more-info">
    95                                                                                 <?php esc_html_e( 'More Info', 'aster-travel-blog' ); ?>
    96                                                                         </a>
    97                                                                 </p>
    98                                                                 <div class="detail">
    99                                                                         <?php echo wp_kses_post( $content['detail'] ); ?>
    100                                                                 </div>
    101                                                         <?php endif; ?>
    102 
    103                                                         <?php if ( ! empty( $step['button_text'] ) ) : ?>
    104                                                                 <div class="button-wrap">
    105 
    106                                                                         <?php if ( ! get_option( 'is-demo-imported-' . get_stylesheet() ) ) : ?>
    107 
    108                                                                                 <a href="#"
    109                                                                                 class="button button-primary do-it"
    110                                                                                 data-callback="<?php echo esc_attr( $step['callback'] ); ?>"
    111                                                                                 data-step="<?php echo esc_attr( $step['id'] ); ?>">
    112                                                                                         <?php echo esc_html( $step['button_text'] ); ?>
    113                                                                                 </a>
    114 
    115                                                                         <?php else : ?>
    116 
    117                                                                                 <a target="_blank"
    118                                                                                 href="<?php echo esc_url( home_url() ); ?>"
    119                                                                                 class="button button-primary"
    120                                                                                 style="font-size:20px;font-weight:600;">
    121                                                                                         <?php esc_html_e( 'Visit Site', 'aster-travel-blog' ); ?>
    122                                                                                 </a>
    123 
    124                                                                         <?php endif; ?>
    125 
    126                                                                 </div>
    127                                                         <?php endif; ?>
    128 
    129                                                 </li>
    130                                         <?php endforeach; ?>
    131                                 </ul>
    132                                 <div class="step-loading">
    133                                         <span class="spinner"></span>
     181                        <?php
     182                        echo '<div class="card whizzie-wrap">';
     183                                // The wizard is a list with only one item visible at a time
     184                                $steps = $this->get_steps();
     185                                echo '<ul class="whizzie-menu">';
     186                                foreach( $steps as $step ) {
     187                                        $class = 'step step-' . esc_attr( $step['id'] );
     188                                        echo '<li data-step="' . esc_attr( $step['id'] ) . '" class="' . esc_attr( $class ) . '">';
     189                                                printf( '<h2>%s</h2>', esc_html( $step['title'] ) );
     190                                                // $content is split into summary and detail
     191                                                $content = call_user_func( array( $this, $step['view'] ) );
     192                                                if( isset( $content['summary'] ) ) {
     193                                                        printf(
     194                                                                '<div class="summary">%s</div>',
     195                                                                wp_kses_post( $content['summary'] )
     196                                                        );
     197                                                }
     198                                                if( isset( $content['detail'] ) ) {
     199                                                        // Add a link to see more detail
     200                                                        printf( '<p><a href="#" class="more-info">%s</a></p>', __( 'More Info', 'aster-travel-blog' ) );
     201                                                        printf(
     202                                                                '<div class="detail">%s</div>',
     203                                                                $content['detail'] // Need to escape this
     204                                                        );
     205                                                }
     206                                                // The next button
     207                                                if( isset( $step['button_text'] ) && $step['button_text'] ) {
     208                            ?>
     209                            <?php if ( ! get_option( 'is-demo-imported-' . get_stylesheet() ) ) : ?>
     210                            <?php
     211                            printf(
     212                                '<div class="button-wrap"><a href="#" class="button button-primary do-it" data-callback="%s" data-step="%s">%s</a></div>',
     213                                esc_attr( $step['callback'] ),
     214                                esc_attr( $step['id'] ),
     215                                esc_html( $step['button_text'] )
     216                            );
     217                            ?>
     218                            <?php else : ?>
     219                                <a target="_blank" href="<?php echo esc_url( home_url() ); ?>" class="button button-primary" style="margin: auto; font-size: 20px; font-weight: 600">
     220                                    <?php esc_html_e( 'Visit Site', 'aster-travel-blog' ); ?>
     221                                </a>
     222                            <?php endif; ?>
     223                            <?php
     224                        }
     225                                        echo '</li>';
     226                                }
     227                                echo '</ul>';
     228                                ?>
     229                                <div class="step-loading"><span class="spinner"></span></div>
     230                        </div><!-- .whizzie-wrap -->
     231
     232                </div><!-- .wrap -->
     233        <?php }
     234
     235
     236
     237        public function activation_page() {
     238                ?>
     239                <div class="main-wrap">
     240                        <h3><?php esc_html_e('Theme Setup Wizard','aster-travel-blog'); ?></h3>
     241                </div>
     242                <?php
     243        }
     244
     245        public function aster_travel_blog_setup_wizard(){
     246
     247                        $display_string = '';
     248
     249                        $body = [
     250                                'home_url'                                       => home_url(),
     251                                'theme_text_domain'      => wp_get_theme()->get( 'TextDomain' )
     252                        ];
     253
     254                        $body = wp_json_encode( $body );
     255                        $options = [
     256                                'body'        => $body,
     257                                'sslverify'     => false,
     258                                'headers'     => [
     259                                        'Content-Type' => 'application/json',
     260                                ]
     261                        ];
     262
     263                        //custom function about theme customizer
     264                        $return = add_query_arg( array()) ;
     265                        $theme = wp_get_theme( 'aster-travel-blog' );
     266
     267                        ?>
     268                                <div class="wrapper-info get-stared-page-wrap">
     269                                        <div class="tab-sec theme-option-tab">
     270                                                <div id="demo_offer" class="tabcontent">
     271                                                        <?php $this->wizard_page(); ?>
     272                                                </div>
     273                                        </div>
    134274                                </div>
    135                         </div>
    136                 </div>
    137         <?php }
    138 
    139         /*** Setup wizard page content and options ***/
    140         public function aster_travel_blog_setup_wizard() { ?>
    141                 <div class="wrapper-info get-stared-page-wrap">
    142                         <div class="tab-sec theme-option-tab">
    143                                 <div id="demo_offer" class="tabcontent">
    144                                         <?php $this->wizard_page(); ?>
    145                                 </div>
    146                         </div>
    147                 </div>
    148         <?php }
    149 
    150         /**
    151          * Get the steps for the wizard
    152          * @return array
    153          */
     275                        <?php
     276        }
     277       
     278
     279        /**
     280        * Set options for the steps
     281        * Incorporate any options set by the theme dev
     282        * Return the array for the steps
     283        * @return Array
     284        */
    154285        public function get_steps() {
     286                $dev_steps = $this->config_steps;
    155287                $steps = array(
    156288                        'intro' => array(
    157                                 'id' => 'intro',
    158                                 'title' => __( 'Welcome to ', 'aster-travel-blog' ) . $this->theme_title,
    159                                 'view' => 'get_step_intro',
    160                                 'callback' => 'do_next_step',
    161                                 'button_text' => __( 'Start Now', 'aster-travel-blog' ),
    162                                 'can_skip' => false
     289                                'id'                    => 'intro',
     290                                'title'                 => __( 'Welcome to ', 'aster-travel-blog' ) . $this->theme_title,
     291                                'icon'                  => 'dashboard',
     292                                'view'                  => 'get_step_intro', // Callback for content
     293                                'callback'              => 'do_next_step', // Callback for JS
     294                                'button_text'   => __( 'Start Now', 'aster-travel-blog' ),
     295                                'can_skip'              => false // Show a skip button?
     296                        ),
     297                        'plugins' => array(
     298                                'id'                    => 'plugins',
     299                                'title'                 => __( 'Plugins', 'aster-travel-blog' ),
     300                                'icon'                  => 'admin-plugins',
     301                                'view'                  => 'get_step_plugins',
     302                                'callback'              => 'install_plugins',
     303                                'button_text'   => __( 'Install Plugins', 'aster-travel-blog' ),
     304                                'can_skip'              => true
    163305                        ),
    164306                        'widgets' => array(
    165                                 'id' => 'widgets',
    166                                 'title' => __( 'Demo Importer', 'aster-travel-blog' ),
    167                                 'view' => 'get_step_widgets',
    168                                 'callback' => 'install_widgets',
    169                                 'button_text' => __( 'Import Demo', 'aster-travel-blog' ),
    170                                 'can_skip' => true
     307                                'id'                    => 'widgets',
     308                                'title'                 => __( 'Demo Importer', 'aster-travel-blog' ),
     309                                'icon'                  => 'welcome-widgets-menus',
     310                                'view'                  => 'get_step_widgets',
     311                                'callback'              => 'install_widgets',
     312                                'button_text'   => __( 'Import Demo', 'aster-travel-blog' ),
     313                                'can_skip'              => true
    171314                        ),
    172315                        'done' => array(
    173                                 'id' => 'done',
    174                                 'title' => __( 'All Done', 'aster-travel-blog' ),
    175                                 'view' => 'get_step_done'
     316                                'id'                    => 'done',
     317                                'title'                 => __( 'All Done', 'aster-travel-blog' ),
     318                                'icon'                  => 'yes',
     319                                'view'                  => 'get_step_done',
     320                                'callback'              => ''
    176321                        )
    177322                );
    178323
     324                // Iterate through each step and replace with dev config values
     325                if( $dev_steps ) {
     326                        // Configurable elements - these are the only ones the dev can update from config.php
     327                        $can_config = array( 'title', 'icon', 'button_text', 'can_skip' );
     328                        foreach( $dev_steps as $dev_step ) {
     329                                // We can only proceed if an ID exists and matches one of our IDs
     330                                if( isset( $dev_step['id'] ) ) {
     331                                        $id = $dev_step['id'];
     332                                        if( isset( $steps[$id] ) ) {
     333                                                foreach( $can_config as $element ) {
     334                                                        if( isset( $dev_step[$element] ) ) {
     335                                                                $steps[$id][$element] = $dev_step[$element];
     336                                                        }
     337                                                }
     338                                        }
     339                                }
     340                        }
     341                }
    179342                return $steps;
    180343        }
    … …  
    187350                </div>
    188351        <?php }
     352       
     353       
     354
     355        /**
     356         * Get the content for the plugins step
     357         * @return $content Array
     358         */
     359        public function get_step_plugins() {
     360                $plugins = $this->get_plugins();
     361                $content = array(); ?>
     362                        <div class="summary">
     363                                <p>
     364                                        <?php esc_html_e('Additional plugins always make your website exceptional. Install these plugins by clicking the install button. You may also deactivate them from the dashboard.','aster-travel-blog') ?>
     365                                </p>
     366                        </div>
     367                <?php // The detail element is initially hidden from the user
     368                $content['detail'] = '<ul class="whizzie-do-plugins">';
     369                // Add each plugin into a list
     370                foreach( $plugins['all'] as $slug=>$plugin ) {
     371                        $content['detail'] .= '<li data-slug="' . esc_attr( $slug ) . '">' . esc_html( $plugin['name'] ) . '<span>';
     372                        $keys = array();
     373                        if ( isset( $plugins['install'][ $slug ] ) ) {
     374                            $keys[] = 'Installation';
     375                        }
     376                        if ( isset( $plugins['update'][ $slug ] ) ) {
     377                            $keys[] = 'Update';
     378                        }
     379                        if ( isset( $plugins['activate'][ $slug ] ) ) {
     380                            $keys[] = 'Activation';
     381                        }
     382                        $content['detail'] .= implode( ' and ', $keys ) . ' required';
     383                        $content['detail'] .= '</span></li>';
     384                }
     385                $content['detail'] .= '</ul>';
     386
     387                return $content;
     388        }
    189389
    190390        /*** Display the content for the widgets step ***/
    … …  
    195395        <?php }
    196396
    197         /*** Display the content for the final step ***/
     397        /***        Print the content for the final step        ***/
     398
    198399        public function get_step_done() { ?>
    199400                <div id="aster-demo-setup-guid">
    … …  
    223424                                </ol>
    224425                        </div>
    225                         <div style="display:flex; flex-wrap: wrap; justify-content: center; margin-top: 20px; gap:20px">
     426                        <div style="display:flex; justify-content: center; margin-top: 20px; gap:20px">
    226427                                <div class="aster-setup-finish">
    227                                         <a target="_blank" href="<?php echo esc_url(home_url()); ?>" class="button button-primary"><?php esc_html_e('Visit Site','aster-travel-blog'); ?></a>
     428                                        <a target="_blank" href="<?php echo esc_url(home_url()); ?>" class="button button-primary"><?php esc_html_e( 'Visit Site', 'aster-travel-blog' ); ?></a>
    228429                                </div>
    229430                                <div class="aster-setup-finish">
    230                                         <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>" class="button button-primary"><?php esc_html_e('Customize Your Demo','aster-travel-blog'); ?></a>
     431                                        <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>" class="button button-primary"><?php esc_html_e( 'Customize Your Demo', 'aster-travel-blog' ); ?></a>
    231432                                </div>
    232433                                <div class="aster-setup-finish">
    233                                         <a target="_blank" href="<?php echo esc_url( admin_url('themes.php?page=aster-travel-blog-getting-started') ); ?>" class="button button-primary"><?php esc_html_e('Dashboard','aster-travel-blog'); ?></a>
     434                                        <a target="_blank" href="<?php echo esc_url( admin_url('themes.php?page=aster-travel-blog-getting-started') ); ?>" class="button button-primary"><?php esc_html_e( 'Dashboard', 'aster-travel-blog' ); ?></a>
    234435                                </div>
    235436                        </div>
    236437                </div>
    237438        <?php }
     439
     440        /***       Get the plugins registered with TGMPA       ***/
     441        public function get_plugins() {
     442                $instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
     443                $plugins = array(
     444                        'all'           => array(),
     445                        'install'       => array(),
     446                        'update'        => array(),
     447                        'activate'      => array()
     448                );
     449                foreach( $instance->plugins as $slug=>$plugin ) {
     450                        if( $instance->is_plugin_active( $slug ) && false === $instance->does_plugin_have_update( $slug ) ) {
     451                                // Plugin is installed and up to date
     452                                continue;
     453                        } else {
     454                                $plugins['all'][$slug] = $plugin;
     455                                if( ! $instance->is_plugin_installed( $slug ) ) {
     456                                        $plugins['install'][$slug] = $plugin;
     457                                } else {
     458                                        if( false !== $instance->does_plugin_have_update( $slug ) ) {
     459                                                $plugins['update'][$slug] = $plugin;
     460                                        }
     461                                        if( $instance->can_plugin_activate( $slug ) ) {
     462                                                $plugins['activate'][$slug] = $plugin;
     463                                        }
     464                                }
     465                        }
     466                }
     467                return $plugins;
     468        }
     469
     470
     471        public function setup_plugins() {
     472                $json = array();
     473                // send back some json we use to hit up TGM
     474                $plugins = $this->get_plugins();
     475
     476                // what are we doing with this plugin?
     477                foreach ( $plugins['activate'] as $slug => $plugin ) {
     478                        if ( $_POST['slug'] == $slug ) {
     479                                $json = array(
     480                                        'url'           => admin_url( $this->tgmpa_url ),
     481                                        'plugin'        => array( $slug ),
     482                                        'tgmpa-page'    => $this->tgmpa_menu_slug,
     483                                        'plugin_status' => 'all',
     484                                        '_wpnonce'      => wp_create_nonce( 'bulk-plugins' ),
     485                                        'action'        => 'tgmpa-bulk-activate',
     486                                        'action2'       => - 1,
     487                                        'message'       => esc_html__( 'Activating Plugin','aster-travel-blog' ),
     488                                );
     489                                break;
     490                        }
     491                }
     492                foreach ( $plugins['update'] as $slug => $plugin ) {
     493                        if ( $_POST['slug'] == $slug ) {
     494                                $json = array(
     495                                        'url'           => admin_url( $this->tgmpa_url ),
     496                                        'plugin'        => array( $slug ),
     497                                        'tgmpa-page'    => $this->tgmpa_menu_slug,
     498                                        'plugin_status' => 'all',
     499                                        '_wpnonce'      => wp_create_nonce( 'bulk-plugins' ),
     500                                        'action'        => 'tgmpa-bulk-update',
     501                                        'action2'       => - 1,
     502                                        'message'       => esc_html__( 'Updating Plugin','aster-travel-blog' ),
     503                                );
     504                                break;
     505                        }
     506                }
     507                foreach ( $plugins['install'] as $slug => $plugin ) {
     508                        if ( $_POST['slug'] == $slug ) {
     509                                $json = array(
     510                                        'url'           => admin_url( $this->tgmpa_url ),
     511                                        'plugin'        => array( $slug ),
     512                                        'tgmpa-page'    => $this->tgmpa_menu_slug,
     513                                        'plugin_status' => 'all',
     514                                        '_wpnonce'      => wp_create_nonce( 'bulk-plugins' ),
     515                                        'action'        => 'tgmpa-bulk-install',
     516                                        'action2'       => - 1,
     517                                        'message'       => esc_html__( 'Installing Plugin','aster-travel-blog' ),
     518                                );
     519                                break;
     520                        }
     521                }
     522                if ( $json ) {
     523                        $json['hash'] = md5( serialize( $json ) ); // used for checking if duplicates happen, move to next plugin
     524                        wp_send_json( $json );
     525                } else {
     526                        wp_send_json( array( 'done' => 1, 'message' => esc_html__( 'Success','aster-travel-blog' ) ) );
     527                }
     528                exit;
     529        }
     530
     531        /***------------------------------------------------- Imports the Demo Content* @since 1.1.0 ----------------------------------------------****/
    238532
    239533
    … …  
    450744
    451745
     746                // ------------------------- Product Section -------------------------
     747
     748                set_theme_mod( 'travel_blog_lite_products_enable', true);
     749
     750                $aster_travel_blog_products = array(
     751                        'Travelling Bag',
     752
     753                        'Travelling Shoes',
     754
     755                        'Tent House',
     756                       
     757                        'Battery Tourch',
     758                );
     759               
     760                $aster_travel_blog_product_prices = array(
     761                        50.00,
     762                        70.00,
     763                        90.00,
     764                        90.00,
     765                );
     766               
     767                $trending_cat_id = wp_create_category('Trending Products');
     768               
     769                foreach ($aster_travel_blog_products as $index => $product_title) {
     770                        $content = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.';
     771                        $post_id = wp_insert_post(array(
     772                                'post_title'   => wp_strip_all_tags($product_title),
     773                                'post_content' => $content,
     774                                'post_status'  => 'publish',
     775                                'post_type'    => 'product',
     776                        ));
     777               
     778                        if ( ! is_wp_error($post_id) && $post_id ) {
     779                                wp_set_post_terms($post_id, array($trending_cat_id), 'product_cat');
     780               
     781                                $price = $aster_travel_blog_product_prices[$index];
     782                                $sale_price = $price - 10;
     783               
     784                                update_post_meta($post_id, '_regular_price', $price);
     785                                update_post_meta($post_id, '_sale_price', $sale_price);
     786                                update_post_meta($post_id, '_price', $sale_price);
     787
     788                                // Product image
     789                                $image_name = 'product' . ($index + 1) . '.png';
     790                                $image_url  = get_template_directory_uri() . '/resource/img/' . $image_name;
     791                                $image_data = file_get_contents($image_url);
     792
     793                                if ($image_data) {
     794                                        $upload_dir = wp_upload_dir();
     795                                        $filename   = wp_unique_filename($upload_dir['path'], $image_name);
     796                                        $file       = $upload_dir['path'] . '/' . $filename;
     797
     798                                        if (!function_exists('WP_Filesystem')) {
     799                                                require_once(ABSPATH . 'wp-admin/includes/file.php');
     800                                        }
     801                                        WP_Filesystem();
     802                                        global $wp_filesystem;
     803
     804                                        if ($wp_filesystem->put_contents($file, $image_data, FS_CHMOD_FILE)) {
     805                                                $wp_filetype = wp_check_filetype($filename, null);
     806                                                $attachment = array(
     807                                                        'post_mime_type' => $wp_filetype['type'],
     808                                                        'post_title'     => sanitize_file_name($filename),
     809                                                        'post_status'    => 'inherit',
     810                                                        'post_type'      => 'attachment',
     811                                                );
     812                                                $attach_id = wp_insert_attachment($attachment, $file, $post_id);
     813                                                require_once(ABSPATH . 'wp-admin/includes/image.php');
     814                                                $attach_data = wp_generate_attachment_metadata($attach_id, $file);
     815                                                wp_update_attachment_metadata($attach_id, $attach_data);
     816                                                set_post_thumbnail($post_id, $attach_id);
     817                                        }
     818                                }
     819
     820                        }
     821                }
     822
     823
    452824                // ---------------------------------------- Travel Section --------------------------------------------------- //
    453825
Note: See TracChangeset for help on using the changeset viewer.