Changeset 356445
- Timestamp:
- 10/31/2026 12:32:15 PM (11 hours ago)
- Location:
- aster-travel-blog/2.5.1
- Files:
-
- 7 added
- 9 edited
- 1 copied
-
. (copied) (copied from aster-travel-blog/2.4.9 )
-
functions.php (modified) (4 diffs)
-
languages/aster-travel-blog.pot (modified) (10 diffs)
-
readme.txt (modified) (2 diffs)
-
resource/img/product1.png (added)
-
resource/img/product2.png (added)
-
resource/img/product3.png (added)
-
resource/img/product4.png (added)
-
style.css (modified) (1 diff)
-
theme-library/function-files/template-functions.php (modified) (1 diff)
-
theme-library/getting-started/getting-started.php (modified) (1 diff)
-
theme-wizard/assets/js/theme-wizard-script.js (modified) (4 diffs)
-
theme-wizard/config.php (modified) (4 diffs)
-
theme-wizard/tgm (added)
-
theme-wizard/tgm/class-tgm-plugin-activation.php (added)
-
theme-wizard/tgm/tgm.php (added)
-
theme-wizard/whizzie.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
aster-travel-blog/2.5.1/functions.php
r353516 r356445 84 84 add_theme_support( 'responsive-embeds' ); 85 85 86 /* Demo Import */ 87 require get_parent_theme_file_path( '/theme-wizard/config.php' ); 88 86 89 /* 87 90 * This theme styles the visual editor to resemble the theme style, … … 89 92 */ 90 93 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 } 91 98 } 92 99 endif; … … 275 282 } 276 283 add_action('after_setup_theme', 'aster_travel_blog_links_setup'); 277 278 /**279 * Theme Wizard280 */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 }285 284 286 285 // Enqueue Customizer live preview script … … 327 326 } 328 327 add_action('wp_ajax_aster_travel_blog_reset_demo_import_settings', 'aster_travel_blog_reset_demo_import_settings'); 328 329 add_filter( 'woocommerce_enable_setup_wizard', '__return_false' ); -
aster-travel-blog/2.5.1/languages/aster-travel-blog.pot
r354840 r356445 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Aster Travel Blog 2. 4.9\n"5 "Project-Id-Version: Aster Travel Blog 2.5.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/theme/aster-travel-blog\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 67 67 msgstr "" 68 68 69 #: functions.php:103 69 #: functions.php:96 70 msgid "Welcome to Aster Travel Blog" 71 msgstr "" 72 73 #: functions.php:110 70 74 msgid "Sidebar" 71 75 msgstr "" 72 76 73 #: functions.php:1 0577 #: functions.php:112 74 78 msgid "Add widgets here." 75 79 msgstr "" 76 80 77 #: functions.php:1 1781 #: functions.php:124 78 82 msgid "Footer " 79 83 msgstr "" 80 84 81 #: functions.php:1 1985 #: functions.php:126 82 86 msgid "The Footer Widget Area" 83 87 msgstr "" 84 88 85 #: functions.php:25 289 #: functions.php:259 86 90 msgid "https://asterthemes.com/products/travel-blogger-wordpress-theme" 87 91 msgstr "" 88 92 89 #: functions.php:2 5593 #: functions.php:262 90 94 msgid "https://asterthemes.com/products/aster-travel-blog" 91 95 msgstr "" 92 96 93 #: functions.php:2 5897 #: functions.php:265 94 98 msgid "https://wordpress.org/support/theme/aster-travel-blog/" 95 99 msgstr "" 96 100 97 #: functions.php:26 1101 #: functions.php:268 98 102 msgid "https://wordpress.org/support/theme/aster-travel-blog/reviews/" 99 103 msgstr "" 100 104 101 #: functions.php:2 64105 #: functions.php:271 102 106 msgid "https://demo.asterthemes.com/aster-travel-blog/" 103 107 msgstr "" 104 108 105 #: functions.php:2 67109 #: functions.php:274 106 110 msgid "https://demo.asterthemes.com/docs/aster-travel-blog-free/" 107 111 msgstr "" 108 112 109 #: functions.php:27 0113 #: functions.php:277 110 114 msgid "https://demo.asterthemes.com/docs/aster-travel-blog-pro/" 111 115 msgstr "" 112 116 113 #: functions.php:2 73117 #: functions.php:280 114 118 msgid "https://asterthemes.com/products/wp-theme-bundle" 115 119 msgstr "" 116 120 117 #: functions.php:32 3121 #: functions.php:322 118 122 msgid "Demo import settings have been reset." 119 123 msgstr "" 120 124 121 #: functions.php:32 5125 #: functions.php:324 122 126 msgid "Permission denied." 123 127 msgstr "" … … 1235 1239 1236 1240 #: theme-library/function-files/class-breadcrumb-trail.php:250 1237 #: theme-wizard/whizzie.php: 2531241 #: theme-wizard/whizzie.php:547 1238 1242 msgid "Home" 1239 1243 msgstr "" … … 1319 1323 1320 1324 #: theme-library/function-files/customizer-settings-functions.php:109 1321 #: theme-wizard/whizzie.php: 2591325 #: theme-wizard/whizzie.php:553 1322 1326 msgid "Blogs" 1323 1327 msgstr "" … … 1381 1385 #: theme-library/function-files/template-functions.php:435 1382 1386 msgid "Calendar" 1383 msgstr ""1384 1385 #: theme-library/function-files/template-functions.php:4971386 msgid "Welcome to Aster Travel Blog"1387 1387 msgstr "" 1388 1388 … … 1438 1438 #: theme-library/getting-started/getting-started.php:15 1439 1439 #: theme-library/getting-started/getting-started.php:16 1440 #: theme-library/getting-started/getting-started.php: 981440 #: theme-library/getting-started/getting-started.php:116 1441 1441 msgid "Getting Started" 1442 1442 msgstr "" … … 1455 1455 msgstr "" 1456 1456 1457 #: theme-library/getting-started/getting-started.php: 741457 #: theme-library/getting-started/getting-started.php:88 1458 1458 msgid "Import Theme Demo" 1459 1459 msgstr "" 1460 1460 1461 #: theme-library/getting-started/getting-started.php: 781461 #: theme-library/getting-started/getting-started.php:96 1462 1462 msgid "Visit Your Website" 1463 1463 msgstr "" 1464 1464 1465 #: theme-library/getting-started/getting-started.php: 861465 #: theme-library/getting-started/getting-started.php:104 1466 1466 #: theme-library/getting-started/tabs/link-panel.php:34 1467 1467 msgid "WP Theme Bundle" 1468 1468 msgstr "" 1469 1469 1470 #: theme-library/getting-started/getting-started.php: 871470 #: theme-library/getting-started/getting-started.php:105 1471 1471 #: theme-library/getting-started/tabs/link-panel.php:35 1472 1472 msgid "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." 1473 1473 msgstr "" 1474 1474 1475 #: theme-library/getting-started/getting-started.php: 881475 #: theme-library/getting-started/getting-started.php:106 1476 1476 #: theme-library/getting-started/tabs/link-panel.php:22 1477 1477 #: theme-library/getting-started/tabs/link-panel.php:36 … … 1479 1479 msgstr "" 1480 1480 1481 #: theme-library/getting-started/getting-started.php: 891481 #: theme-library/getting-started/getting-started.php:107 1482 1482 #: theme-library/getting-started/tabs/link-panel.php:37 1483 1483 msgid "Exclusive Theme Bundle - $99" 1484 1484 msgstr "" 1485 1485 1486 #: theme-library/getting-started/getting-started.php:1 031486 #: theme-library/getting-started/getting-started.php:121 1487 1487 msgid "Free Vs Pro" 1488 1488 msgstr "" 1489 1489 1490 #: theme-library/getting-started/getting-started.php:1 161491 #: theme-library/getting-started/getting-started.php:1 181490 #: theme-library/getting-started/getting-started.php:134 1491 #: theme-library/getting-started/getting-started.php:136 1492 1492 msgid "Review Theme" 1493 1493 msgstr "" 1494 1494 1495 #: theme-library/getting-started/getting-started.php:1 221496 #: theme-library/getting-started/getting-started.php:1 241495 #: theme-library/getting-started/getting-started.php:140 1496 #: theme-library/getting-started/getting-started.php:142 1497 1497 msgid "Contact Support" 1498 1498 msgstr "" 1499 1499 1500 #: theme-library/getting-started/getting-started.php:1 281501 #: theme-library/getting-started/getting-started.php:1 301500 #: theme-library/getting-started/getting-started.php:146 1501 #: theme-library/getting-started/getting-started.php:148 1502 1502 #: theme-library/getting-started/tabs/help-panel.php:13 1503 1503 msgid "Free Theme Documentation" … … 1711 1711 msgstr "" 1712 1712 1713 #: theme-wizard/config.php:3 21714 #: theme-wizard/whizzie.php: 1581713 #: theme-wizard/config.php:36 1714 #: theme-wizard/whizzie.php:290 1715 1715 msgid "Welcome to " 1716 1716 msgstr "" 1717 1717 1718 #: theme-wizard/config.php:3 41719 #: theme-wizard/whizzie.php: 1611718 #: theme-wizard/config.php:38 1719 #: theme-wizard/whizzie.php:294 1720 1720 msgid "Start Now" 1721 1721 msgstr "" 1722 1722 1723 #: theme-wizard/config.php:39 1724 #: theme-wizard/whizzie.php:166 1723 #: theme-wizard/config.php:43 1724 #: theme-wizard/whizzie.php:299 1725 msgid "Plugins" 1726 msgstr "" 1727 1728 #: theme-wizard/config.php:45 1729 #: theme-wizard/tgm/class-tgm-plugin-activation.php:341 1730 #: theme-wizard/whizzie.php:303 1731 msgid "Install Plugins" 1732 msgstr "" 1733 1734 #: theme-wizard/config.php:50 1735 #: theme-wizard/whizzie.php:308 1725 1736 msgid "Demo Importer" 1726 1737 msgstr "" 1727 1738 1728 #: theme-wizard/config.php: 411729 #: theme-wizard/whizzie.php: 1691739 #: theme-wizard/config.php:52 1740 #: theme-wizard/whizzie.php:312 1730 1741 msgid "Import Demo" 1731 1742 msgstr "" 1732 1743 1733 #: theme-wizard/config.php: 461734 #: theme-wizard/whizzie.php: 1741744 #: theme-wizard/config.php:57 1745 #: theme-wizard/whizzie.php:317 1735 1746 msgid "All Done" 1736 1747 msgstr "" 1737 1748 1738 #: theme-wizard/whizzie.php:95 1749 #: theme-wizard/tgm/class-tgm-plugin-activation.php:340 1750 msgid "Install Required Plugins" 1751 msgstr "" 1752 1753 #. translators: %s: plugin name. 1754 #: theme-wizard/tgm/class-tgm-plugin-activation.php:343 1755 msgid "Installing Plugin: %s" 1756 msgstr "" 1757 1758 #. translators: %s: plugin name. 1759 #: theme-wizard/tgm/class-tgm-plugin-activation.php:345 1760 msgid "Updating Plugin: %s" 1761 msgstr "" 1762 1763 #: theme-wizard/tgm/class-tgm-plugin-activation.php:346 1764 msgid "Something went wrong with the plugin API." 1765 msgstr "" 1766 1767 #. translators: 1: plugin name(s). 1768 #: theme-wizard/tgm/class-tgm-plugin-activation.php:348 1769 msgid "This theme requires the following plugin: %1$s." 1770 msgid_plural "This theme requires the following plugins: %1$s." 1771 msgstr[0] "" 1772 msgstr[1] "" 1773 1774 #. translators: 1: plugin name(s). 1775 #: theme-wizard/tgm/class-tgm-plugin-activation.php:354 1776 msgid "This theme recommends the following plugin: %1$s." 1777 msgid_plural "This theme recommends the following plugins: %1$s." 1778 msgstr[0] "" 1779 msgstr[1] "" 1780 1781 #. translators: 1: plugin name(s). 1782 #: theme-wizard/tgm/class-tgm-plugin-activation.php:360 1783 msgid "The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s." 1784 msgid_plural "The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s." 1785 msgstr[0] "" 1786 msgstr[1] "" 1787 1788 #. translators: 1: plugin name(s). 1789 #: theme-wizard/tgm/class-tgm-plugin-activation.php:366 1790 msgid "There is an update available for: %1$s." 1791 msgid_plural "There are updates available for the following plugins: %1$s." 1792 msgstr[0] "" 1793 msgstr[1] "" 1794 1795 #. translators: 1: plugin name(s). 1796 #: theme-wizard/tgm/class-tgm-plugin-activation.php:372 1797 msgid "The following required plugin is currently inactive: %1$s." 1798 msgid_plural "The following required plugins are currently inactive: %1$s." 1799 msgstr[0] "" 1800 msgstr[1] "" 1801 1802 #. translators: 1: plugin name(s). 1803 #: theme-wizard/tgm/class-tgm-plugin-activation.php:378 1804 msgid "The following recommended plugin is currently inactive: %1$s." 1805 msgid_plural "The following recommended plugins are currently inactive: %1$s." 1806 msgstr[0] "" 1807 msgstr[1] "" 1808 1809 #: theme-wizard/tgm/class-tgm-plugin-activation.php:383 1810 msgid "Begin installing plugin" 1811 msgid_plural "Begin installing plugins" 1812 msgstr[0] "" 1813 msgstr[1] "" 1814 1815 #: theme-wizard/tgm/class-tgm-plugin-activation.php:388 1816 msgid "Begin updating plugin" 1817 msgid_plural "Begin updating plugins" 1818 msgstr[0] "" 1819 msgstr[1] "" 1820 1821 #: theme-wizard/tgm/class-tgm-plugin-activation.php:393 1822 msgid "Begin activating plugin" 1823 msgid_plural "Begin activating plugins" 1824 msgstr[0] "" 1825 msgstr[1] "" 1826 1827 #: theme-wizard/tgm/class-tgm-plugin-activation.php:398 1828 msgid "Return to Required Plugins Installer" 1829 msgstr "" 1830 1831 #: theme-wizard/tgm/class-tgm-plugin-activation.php:399 1832 msgid "Return to the Dashboard" 1833 msgstr "" 1834 1835 #: theme-wizard/tgm/class-tgm-plugin-activation.php:400 1836 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3311 1837 msgid "Plugin activated successfully." 1838 msgstr "" 1839 1840 #: theme-wizard/tgm/class-tgm-plugin-activation.php:401 1841 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3103 1842 msgid "The following plugin was activated successfully:" 1843 msgid_plural "The following plugins were activated successfully:" 1844 msgstr[0] "" 1845 msgstr[1] "" 1846 1847 #. translators: 1: plugin name. 1848 #: theme-wizard/tgm/class-tgm-plugin-activation.php:403 1849 msgid "No action taken. Plugin %1$s was already active." 1850 msgstr "" 1851 1852 #. translators: 1: plugin name. 1853 #: theme-wizard/tgm/class-tgm-plugin-activation.php:405 1854 msgid "Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin." 1855 msgstr "" 1856 1857 #. translators: 1: dashboard link. 1858 #: theme-wizard/tgm/class-tgm-plugin-activation.php:407 1859 msgid "All plugins installed and activated successfully. %1$s" 1860 msgstr "" 1861 1862 #: theme-wizard/tgm/class-tgm-plugin-activation.php:408 1863 msgid "Dismiss this notice" 1864 msgstr "" 1865 1866 #: theme-wizard/tgm/class-tgm-plugin-activation.php:409 1867 msgid "There are one or more required or recommended plugins to install, update or activate." 1868 msgstr "" 1869 1870 #: theme-wizard/tgm/class-tgm-plugin-activation.php:410 1871 msgid "Please contact the administrator of this site for help." 1872 msgstr "" 1873 1874 #: theme-wizard/tgm/class-tgm-plugin-activation.php:616 1875 msgid "This plugin needs to be updated to be compatible with your theme." 1876 msgstr "" 1877 1878 #: theme-wizard/tgm/class-tgm-plugin-activation.php:617 1879 msgid "Update Required" 1880 msgstr "" 1881 1882 #: theme-wizard/tgm/class-tgm-plugin-activation.php:735 1883 msgid "Set the parent_slug config variable instead." 1884 msgstr "" 1885 1886 #: theme-wizard/tgm/class-tgm-plugin-activation.php:1042 1887 msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work." 1888 msgstr "" 1889 1890 #: theme-wizard/tgm/class-tgm-plugin-activation.php:1042 1891 #: theme-wizard/tgm/class-tgm-plugin-activation.php:1052 1892 msgid "Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines." 1893 msgstr "" 1894 1895 #: theme-wizard/tgm/class-tgm-plugin-activation.php:1052 1896 msgid "The remote plugin package consists of more than one file, but the files are not packaged in a folder." 1897 msgstr "" 1898 1899 #: theme-wizard/tgm/class-tgm-plugin-activation.php:1243 1900 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3099 1901 msgctxt "plugin A *and* plugin B" 1902 msgid "and" 1903 msgstr "" 1904 1905 #. translators: %s: version number 1906 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2112 1907 msgid "TGMPA v%s" 1908 msgstr "" 1909 1910 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2421 1911 msgid "Required" 1912 msgstr "" 1913 1914 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2424 1915 msgid "Recommended" 1916 msgstr "" 1917 1918 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2440 1919 msgid "WordPress Repository" 1920 msgstr "" 1921 1922 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2443 1923 msgid "External Source" 1924 msgstr "" 1925 1926 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2446 1927 msgid "Pre-Packaged" 1928 msgstr "" 1929 1930 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2463 1931 msgid "Not Installed" 1932 msgstr "" 1933 1934 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2467 1935 msgid "Installed But Not Activated" 1936 msgstr "" 1937 1938 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2469 1939 msgid "Active" 1940 msgstr "" 1941 1942 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2475 1943 msgid "Required Update not Available" 1944 msgstr "" 1945 1946 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2478 1947 msgid "Requires Update" 1948 msgstr "" 1949 1950 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2481 1951 msgid "Update recommended" 1952 msgstr "" 1953 1954 #. translators: 1: install status, 2: update status 1955 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2490 1956 msgctxt "Install/Update Status" 1957 msgid "%1$s, %2$s" 1958 msgstr "" 1959 1960 #. translators: 1: number of plugins. 1961 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2536 1962 msgctxt "plugins" 1963 msgid "All <span class=\"count\">(%s)</span>" 1964 msgid_plural "All <span class=\"count\">(%s)</span>" 1965 msgstr[0] "" 1966 msgstr[1] "" 1967 1968 #. translators: 1: number of plugins. 1969 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2540 1970 msgid "To Install <span class=\"count\">(%s)</span>" 1971 msgid_plural "To Install <span class=\"count\">(%s)</span>" 1972 msgstr[0] "" 1973 msgstr[1] "" 1974 1975 #. translators: 1: number of plugins. 1976 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2544 1977 msgid "Update Available <span class=\"count\">(%s)</span>" 1978 msgid_plural "Update Available <span class=\"count\">(%s)</span>" 1979 msgstr[0] "" 1980 msgstr[1] "" 1981 1982 #. translators: 1: number of plugins. 1983 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2548 1984 msgid "To Activate <span class=\"count\">(%s)</span>" 1985 msgid_plural "To Activate <span class=\"count\">(%s)</span>" 1986 msgstr[0] "" 1987 msgstr[1] "" 1988 1989 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2630 1990 msgctxt "as in: \"version nr unknown\"" 1991 msgid "unknown" 1992 msgstr "" 1993 1994 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2638 1995 msgid "Installed version:" 1996 msgstr "" 1997 1998 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2646 1999 msgid "Minimum required version:" 2000 msgstr "" 2001 2002 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2658 2003 msgid "Available version:" 2004 msgstr "" 2005 2006 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2681 2007 msgid "No plugins to install, update or activate." 2008 msgstr "" 2009 2010 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2695 2011 msgid "Plugin" 2012 msgstr "" 2013 2014 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2696 2015 msgid "Source" 2016 msgstr "" 2017 2018 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2697 2019 msgid "Type" 2020 msgstr "" 2021 2022 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2701 2023 msgid "Version" 2024 msgstr "" 2025 2026 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2702 2027 msgid "Status" 2028 msgstr "" 2029 2030 #. translators: %2$s: plugin name in screen reader markup 2031 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2751 2032 msgid "Install %2$s" 2033 msgstr "" 2034 2035 #. translators: %2$s: plugin name in screen reader markup 2036 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2756 2037 msgid "Update %2$s" 2038 msgstr "" 2039 2040 #. translators: %2$s: plugin name in screen reader markup 2041 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2762 2042 msgid "Activate %2$s" 2043 msgstr "" 2044 2045 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2834 2046 msgid "Upgrade message from the plugin author:" 2047 msgstr "" 2048 2049 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2867 2050 msgid "Install" 2051 msgstr "" 2052 2053 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2873 2054 msgid "Update" 2055 msgstr "" 2056 2057 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2876 2058 msgid "Activate" 2059 msgstr "" 2060 2061 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2907 2062 msgid "No plugins were selected to be installed. No action taken." 2063 msgstr "" 2064 2065 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2909 2066 msgid "No plugins were selected to be updated. No action taken." 2067 msgstr "" 2068 2069 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2950 2070 msgid "No plugins are available to be installed at this time." 2071 msgstr "" 2072 2073 #: theme-wizard/tgm/class-tgm-plugin-activation.php:2952 2074 msgid "No plugins are available to be updated at this time." 2075 msgstr "" 2076 2077 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3059 2078 msgid "No plugins were selected to be activated. No action taken." 2079 msgstr "" 2080 2081 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3085 2082 msgid "No plugins are available to be activated at this time." 2083 msgstr "" 2084 2085 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3310 2086 msgid "Plugin activation failed." 2087 msgstr "" 2088 2089 #. translators: 1: plugin name, 2: action number 3: total number of actions. 2090 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3655 2091 msgid "Updating Plugin %1$s (%2$d/%3$d)" 2092 msgstr "" 2093 2094 #. translators: 1: plugin name, 2: error message. 2095 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3658 2096 msgid "An error occurred while installing %1$s: <strong>%2$s</strong>." 2097 msgstr "" 2098 2099 #. translators: 1: plugin name. 2100 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3660 2101 msgid "The installation of %1$s failed." 2102 msgstr "" 2103 2104 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3664 2105 msgid "The installation and activation process is starting. This process may take a while on some hosts, so please be patient." 2106 msgstr "" 2107 2108 #. translators: 1: plugin name. 2109 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3666 2110 msgid "%1$s installed and activated successfully." 2111 msgstr "" 2112 2113 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3667 2114 msgid "All installations and activations have been completed." 2115 msgstr "" 2116 2117 #. translators: 1: plugin name, 2: action number 3: total number of actions. 2118 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3669 2119 msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)" 2120 msgstr "" 2121 2122 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3672 2123 msgid "The installation process is starting. This process may take a while on some hosts, so please be patient." 2124 msgstr "" 2125 2126 #. translators: 1: plugin name. 2127 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3674 2128 msgid "%1$s installed successfully." 2129 msgstr "" 2130 2131 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3675 2132 msgid "All installations have been completed." 2133 msgstr "" 2134 2135 #. translators: 1: plugin name, 2: action number 3: total number of actions. 2136 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3677 2137 msgid "Installing Plugin %1$s (%2$d/%3$d)" 2138 msgstr "" 2139 2140 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3682 2141 msgid "Show Details" 2142 msgstr "" 2143 2144 #: theme-wizard/tgm/class-tgm-plugin-activation.php:3682 2145 msgid "Hide Details" 2146 msgstr "" 2147 2148 #: theme-wizard/tgm/tgm.php:9 2149 msgid "WooCommerce" 2150 msgstr "" 2151 2152 #: theme-wizard/whizzie.php:200 1739 2153 msgid "More Info" 1740 2154 msgstr "" 1741 2155 1742 #: theme-wizard/whizzie.php: 1211743 #: theme-wizard/whizzie.php: 2272156 #: theme-wizard/whizzie.php:220 2157 #: theme-wizard/whizzie.php:428 1744 2158 msgid "Visit Site" 1745 2159 msgstr "" 1746 2160 1747 #: theme-wizard/whizzie.php:185 2161 #: theme-wizard/whizzie.php:240 2162 msgid "Theme Setup Wizard" 2163 msgstr "" 2164 2165 #: theme-wizard/whizzie.php:348 1748 2166 msgid "Thank you for choosing our theme! We are excited to help you get started with your new website." 1749 2167 msgstr "" 1750 2168 1751 #: theme-wizard/whizzie.php: 1862169 #: theme-wizard/whizzie.php:349 1752 2170 msgid "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." 1753 2171 msgstr "" 1754 2172 1755 #: theme-wizard/whizzie.php:193 2173 #: theme-wizard/whizzie.php:364 2174 msgid "Additional plugins always make your website exceptional. Install these plugins by clicking the install button. You may also deactivate them from the dashboard." 2175 msgstr "" 2176 2177 #: theme-wizard/whizzie.php:393 1756 2178 msgid "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!" 1757 2179 msgstr "" 1758 2180 1759 #: theme-wizard/whizzie.php: 2012181 #: theme-wizard/whizzie.php:402 1760 2182 msgid "Setup Navigation Menu" 1761 2183 msgstr "" 1762 2184 1763 #: theme-wizard/whizzie.php: 2022185 #: theme-wizard/whizzie.php:403 1764 2186 msgid "Follow the following Steps to Setup Menu" 1765 2187 msgstr "" 1766 2188 1767 #: theme-wizard/whizzie.php: 2032189 #: theme-wizard/whizzie.php:404 1768 2190 msgid "A) Create Pages" 1769 2191 msgstr "" 1770 2192 1771 #: theme-wizard/whizzie.php: 2052193 #: theme-wizard/whizzie.php:406 1772 2194 msgid "Go to Dashboard >> Pages >> Add New" 1773 2195 msgstr "" 1774 2196 1775 #: theme-wizard/whizzie.php: 2062197 #: theme-wizard/whizzie.php:407 1776 2198 msgid "Enter Page Details And Save Changes" 1777 2199 msgstr "" 1778 2200 1779 #: theme-wizard/whizzie.php: 2082201 #: theme-wizard/whizzie.php:409 1780 2202 msgid "B) Add Pages To Menu" 1781 2203 msgstr "" 1782 2204 1783 #: theme-wizard/whizzie.php: 2102205 #: theme-wizard/whizzie.php:411 1784 2206 msgid "Go to Dashboard >> Appearance >> Menu" 1785 2207 msgstr "" 1786 2208 1787 #: theme-wizard/whizzie.php: 2112209 #: theme-wizard/whizzie.php:412 1788 2210 msgid "Click On The Create Menu Option" 1789 2211 msgstr "" 1790 2212 1791 #: theme-wizard/whizzie.php: 2122213 #: theme-wizard/whizzie.php:413 1792 2214 msgid "Select The Pages And Click On The Add to Menu Button" 1793 2215 msgstr "" 1794 2216 1795 #: theme-wizard/whizzie.php: 2132217 #: theme-wizard/whizzie.php:414 1796 2218 msgid "Select Primary Menu From The Menu Setting" 1797 2219 msgstr "" 1798 2220 1799 #: theme-wizard/whizzie.php: 2142221 #: theme-wizard/whizzie.php:415 1800 2222 msgid "Click On The Save Menu Button" 1801 2223 msgstr "" 1802 2224 1803 #: theme-wizard/whizzie.php: 2182225 #: theme-wizard/whizzie.php:419 1804 2226 msgid "Setup Footer Widgets" 1805 2227 msgstr "" 1806 2228 1807 #: theme-wizard/whizzie.php: 2192229 #: theme-wizard/whizzie.php:420 1808 2230 msgid "Follow the following Steps to Setup Footer Widgets" 1809 2231 msgstr "" 1810 2232 1811 #: theme-wizard/whizzie.php: 2212233 #: theme-wizard/whizzie.php:422 1812 2234 msgid "Go to Dashboard >> Appearance >> Widgets" 1813 2235 msgstr "" 1814 2236 1815 #: theme-wizard/whizzie.php: 2222237 #: theme-wizard/whizzie.php:423 1816 2238 msgid "Drag And Add The Widgets In The Footer Columns" 1817 2239 msgstr "" 1818 2240 1819 #: theme-wizard/whizzie.php: 2302241 #: theme-wizard/whizzie.php:431 1820 2242 msgid "Customize Your Demo" 1821 2243 msgstr "" 1822 2244 1823 #: theme-wizard/whizzie.php: 2332245 #: theme-wizard/whizzie.php:434 1824 2246 msgid "Dashboard" 1825 2247 msgstr "" 1826 2248 1827 #: theme-wizard/whizzie.php:265 2249 #: theme-wizard/whizzie.php:487 2250 msgid "Activating Plugin" 2251 msgstr "" 2252 2253 #: theme-wizard/whizzie.php:502 2254 msgid "Updating Plugin" 2255 msgstr "" 2256 2257 #: theme-wizard/whizzie.php:517 2258 msgid "Installing Plugin" 2259 msgstr "" 2260 2261 #: theme-wizard/whizzie.php:526 2262 msgid "Success" 2263 msgstr "" 2264 2265 #: theme-wizard/whizzie.php:559 1828 2266 msgid "About" 1829 2267 msgstr "" -
aster-travel-blog/2.5.1/readme.txt
r354840 r356445 6 6 Requires at least: 5.0 7 7 Tested up to: 7.0 8 Stable tag: 2. 4.98 Stable tag: 2.5.1 9 9 Requires PHP: 7.4 10 10 License: GNU General Public License v3 or later … … 177 177 * Updated Theme. 178 178 179 = 2.5.1 = 180 * Updated Demo import code. 181 179 182 == Images Screenshot == 180 183 -
aster-travel-blog/2.5.1/style.css
r354840 r356445 5 5 Author URI: https://asterthemes.com 6 6 Description: 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.97 Version: 2.5.1 8 8 Tested up to: 7.1 9 9 Requires PHP: 7.4 -
aster-travel-blog/2.5.1/theme-library/function-files/template-functions.php
r353516 r356445 495 495 <div class="getstrat updated notice notice-success is-dismissible notice-get-started-class"> 496 496 <div class="at-admin-content" > 497 <h2><?php e sc_html_e('Welcome to Aster Travel Blog', 'aster-travel-blog'); ?></h2>497 <h2><?php echo esc_html( ASTER_TRAVEL_BLOG_WELCOME_MESSAGE ); ?></h2> 498 498 <p><?php _e('Explore the features of our Pro Theme and take your Travel journey to the next level.', 'aster-travel-blog'); ?></p> 499 499 <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 71 71 <div class="btns-wizard"> 72 72 <?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 76 92 <?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"> 78 96 <?php esc_html_e( 'Visit Your Website', 'aster-travel-blog' ); ?> 79 97 </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 1 var Whizzie = (function($) { 2 3 var t; 4 var current_step = ''; 5 var step_pointer = ''; 6 7 // callbacks from form button clicks. 4 8 var callbacks = { 5 do_next_step: function (btn) {6 do_next_step(btn);9 do_next_step: function(btn) { 10 do_next_step(btn); 7 11 }, 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) { 9 17 var widgets = new WidgetManager(); 10 18 widgets.init(btn); 11 19 }, 12 install_content: function (btn) {20 install_content: function(btn) { 13 21 var content = new ContentManager(); 14 22 content.init(btn); 15 } ,23 } 16 24 }; 17 25 18 26 function window_loaded() { 19 27 var maxHeight = 0; 20 $('.whizzie-menu li.step').each(function () { 28 29 $('.whizzie-menu li.step').each(function(index) { 21 30 $(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 28 41 29 42 $('.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 31 46 $('.whizzie-wrap').addClass('loaded'); 32 47 33 $('.do-it').on('click', function (e) { 48 // init button clicks: 49 $('.do-it').on('click', function(e) { 34 50 e.preventDefault(); 35 51 step_pointer = $(this).data('step'); 36 current_step = $('.step-' + step_pointer);52 current_step = $('.step-' + $(this).data('step')); 37 53 $('.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; 41 62 } else { 42 63 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) { 47 69 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() { 68 121 current_step = current_step.next(); 69 122 step_pointer = current_step.data('step'); 70 current_step.fadeIn().addClass('active-step'); 123 current_step.fadeIn(); 124 current_step.addClass('active-step'); 71 125 $('.nav-step-' + step_pointer).addClass('active-step'); 72 126 $('.whizzie-wrap').removeClass('spinning'); … … 74 128 } 75 129 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 76 220 function WidgetManager() { 77 221 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 } 84 230 return { 85 init: function () { 86 complete = function () { do_next_step(); }; 231 init: function(btn) { 232 complete = function() { 233 do_next_step(); 234 } 87 235 import_widgets(); 88 236 } 89 } ;237 } 90 238 } 91 239 92 240 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 = ''; 94 247 95 248 function ajax_callback(response) { 96 if ( response && response.message) {249 if (typeof response == 'object' && typeof response.message != 'undefined') { 97 250 $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(); 103 266 } 104 267 } 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 108 292 109 293 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() { 112 298 loading_content(); 113 299 window.location.href = btn.href; … … 115 301 find_next(); 116 302 } 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 118 344 } 119 345 120 346 return { 121 init: function () { 347 init: function() { 348 t = this; 122 349 $(window_loaded); 123 } 124 }; 350 }, 351 callback: function(func) { 352 console.log(func); 353 console.log(this); 354 } 355 } 125 356 126 357 })(jQuery); … … 128 359 Whizzie.init(); 129 360 130 // Tab content functionality131 361 function 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"; 142 373 } 143 374 144 // jQuery DOM ready function for setup navigation 145 jQuery(document).ready(function () { 375 jQuery(document).ready(function() { 376 146 377 jQuery('#at-demo-setup-guid .at-setup-menu').attr("checked", "checked"); 147 378 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"); 151 383 }); 152 384 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"); 156 389 }); 157 390 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"); 161 395 }); 162 396 }); -
aster-travel-blog/2.5.1/theme-wizard/config.php
r265719 r356445 8 8 */ 9 9 10 /*** Define constants ***/ 10 /** 11 * Define constants 12 **/ 11 13 if ( ! defined( 'WHIZZIE_DIR' ) ) { 12 14 define( 'WHIZZIE_DIR', dirname( __FILE__ ) ); … … 19 21 20 22 21 /*** Make changes below ***/ 23 /** 24 * Make changes below 25 **/ 22 26 23 27 // Change the title and slug of your wizard page … … 35 39 'can_skip' => false // Show a skip button? 36 40 ), 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 ), 37 48 'widgets' => array( 38 49 'id' => 'widgets', … … 49 60 ); 50 61 51 /*** This kicks off the wizard ***/ 62 /** 63 * This kicks off the wizard 64 **/ 52 65 if( class_exists( 'Whizzie' ) ) { 53 66 $Whizzie = new Whizzie( $config ); -
aster-travel-blog/2.5.1/theme-wizard/whizzie.php
r353516 r356445 1 1 <?php 2 2 /** 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 */ 7 9 8 10 class Whizzie { 11 9 12 protected $version = '1.1.0'; 10 13 protected $theme_name = ''; … … 13 16 protected $page_title = ''; 14 17 protected $config_steps = array(); 18 public $plugin_path; 15 19 public $parent_slug; 16 20 /** 17 * Constructor 18 * @param $config Configuration parameters 21 * Relative plugin url for this plugin folder 22 * @since 1.0.0 23 * @var string 19 24 */ 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 */ 20 51 public function __construct( $config ) { 21 52 $this->set_vars( $config ); … … 24 55 25 56 /** 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 29 62 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'] ) ) { 31 67 $this->page_slug = esc_attr( $config['page_slug'] ); 32 68 } 33 if ( isset( $config['page_title'] ) ) {69 if( isset( $config['page_title'] ) ) { 34 70 $this->page_title = esc_attr( $config['page_title'] ); 35 71 } 36 if ( isset( $config['steps'] ) ) {72 if( isset( $config['steps'] ) ) { 37 73 $this->config_steps = $config['steps']; 38 74 } 39 75 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 ); 40 79 $current_theme = wp_get_theme(); 41 80 $this->theme_title = $current_theme->get( 'Name' ); … … 45 84 } 46 85 47 /*** Initialize hooks and actions ***/ 86 /** 87 * Hooks and filters 88 * @since 1.0.0 89 */ 48 90 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 } 49 95 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 50 96 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' ) ); 51 100 add_action( 'wp_ajax_setup_widgets', array( $this, 'setup_widgets' ) ); 52 101 } 53 102 54 103 public function enqueue_scripts() { 55 104 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 57 107 wp_localize_script( 58 108 'theme-wizard-script', 59 109 'aster_travel_blog_whizzie_params', 60 110 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' ) 63 113 ) 64 114 ); … … 66 116 } 67 117 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 68 153 public function menu_page() { 69 154 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' ) ); 70 155 } 71 156 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 */ ?> 74 180 <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> 134 274 </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 */ 154 285 public function get_steps() { 286 $dev_steps = $this->config_steps; 155 287 $steps = array( 156 288 '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 163 305 ), 164 306 '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 171 314 ), 172 315 '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' => '' 176 321 ) 177 322 ); 178 323 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 } 179 342 return $steps; 180 343 } … … 187 350 </div> 188 351 <?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 } 189 389 190 390 /*** Display the content for the widgets step ***/ … … 195 395 <?php } 196 396 197 /*** Display the content for the final step ***/ 397 /*** Print the content for the final step ***/ 398 198 399 public function get_step_done() { ?> 199 400 <div id="aster-demo-setup-guid"> … … 223 424 </ol> 224 425 </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"> 226 427 <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> 228 429 </div> 229 430 <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> 231 432 </div> 232 433 <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> 234 435 </div> 235 436 </div> 236 437 </div> 237 438 <?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 ----------------------------------------------****/ 238 532 239 533 … … 450 744 451 745 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 452 824 // ---------------------------------------- Travel Section --------------------------------------------------- // 453 825
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)