',
$args['next_text'],
$args['in_same_term'],
$args['excluded_terms'],
$args['taxonomy']
);
// Only add markup if there's somewhere to navigate to.
if ( $previous || $next ) {
$navigation = _navigation_markup( $previous . $next, 'post-navigation', $args['screen_reader_text'] );
}
return $navigation;
}
/* Google Font site
========================================================================== */
function atomy_custom_add_google_fonts() {
wp_enqueue_style( 'atomy-custom-google-fonts', 'https://fonts.googleapis.com/css?family=Inconsolata:200,300,400,500,600,700,800,900|Indie+Flower:200,300,400,500,600,700,800,900|Lato:200,300,400,500,600,700,800,900|Montserrat:200,300,400,500,600,700,800,900|Roboto:200,300,400,500,600,700,800,900|Text+Me+One:200,300,400,500,600,700,800,900|Titillium+Web:200,300,400,500,600,700,800,900|Ubuntu:200,300,400,500,600,700,800,900',false );
}
add_action( 'wp_enqueue_scripts', 'atomy_custom_add_google_fonts' );
/* Custom button Pause/Play
========================================================================== */
add_filter( 'header_video_settings', 'atomy_video_settings');
function atomy_video_settings( $settings ) {
$settings['l10n'] = array(
'pause' => '',
'play' => '',
);
return $settings;
}
/* Breadcrumbs
========================================================================== */
function atomy_custom_breadcrumbs() {
$sep = ' > ';
if (!is_front_page()) {
// Start the breadcrumb with a link to your homepage
echo '
';
echo '';
bloginfo('name');
echo '' . $sep;
// Check if the current page is a category, an archive or a single page. If so show the category or archive name.
if (is_category() || is_single() ){
the_category($sep);
} elseif (is_archive() || is_single()){
if ( is_day() ) {
printf( __( '%s', 'atomy' ), get_the_date() );
} elseif ( is_month() ) {
printf( __( '%s', 'atomy' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'atomy' ) ) );
} elseif ( is_year() ) {
printf( __( '%s', 'atomy' ), get_the_date( _x( 'Y', 'yearly archives date format', 'atomy' ) ) );
} else {
_e( 'Blog Archives', 'atomy' );
}
}
// If the current page is a single post, show its title with the separator
if (is_single()) {
echo $sep;
the_title();
}
// If the current page is a static page, show its title.
if (is_page()) {
echo the_title();
}
// if you have a static page assigned to be you posts list page. It will find the title of the static page and display it. i.e Home >> Blog
if (is_home()){
global $post;
$page_for_posts_id = get_option('page_for_posts');
if ( $page_for_posts_id ) {
$post = get_page($page_for_posts_id);
setup_postdata($post);
the_title();
rewind_posts();
}
}
echo '
';
}
}
/* Magnific popup - https://dimsemenov.com/plugins/magnific-popup/
========================================================================== */
add_action('wp_enqueue_scripts', 'atomy_enqueue_magnificpopup_styles');
function atomy_enqueue_magnificpopup_styles() {
wp_enqueue_style('magnific_popup_style', get_template_directory_uri().'/magnific-popup/magnific-popup.css', array());
}
add_action('wp_enqueue_scripts', 'atomy_enqueue_magnificpopup_scripts');
function atomy_enqueue_magnificpopup_scripts() {
wp_enqueue_script('magnific_popup_script', get_template_directory_uri().'/magnific-popup/jquery.magnific-popup.min.js', array('jquery'));
wp_enqueue_script('magnific_init_script', get_template_directory_uri().'/magnific-popup/jquery.magnific-popup-init.js', array('jquery'));
}
/* Include Plugin
========================================================================== */
require_once get_template_directory() . '/atomy-functionality-plugin/class-tgm-plugin-activation.php';
add_action( 'tgmpa_register', 'atomy_register_required_plugins' );
function atomy_register_required_plugins() {
/*
* Array of plugin arrays. Required keys are name and slug.
* If the source is NOT from the .org repo, then source is also required.
*/
$plugins = array(
// BubiBlock Slider
array(
'name' => __('BubiBlock Slider','atomy'),
'slug' => 'bubiblock-slider',
'required' => false,
),
// Contact Form 7
array(
'name' => __('Contact Form 7','atomy'),
'slug' => 'contact-form-7',
'required' => false,
),
// On Click Demo Import
array(
'name' => __('One Click Demo Import','atomy'),
'slug' => 'one-click-demo-import',
'required' => false,
),
// WooCommerce
array(
'name' => __('WooCommerce','atomy'),
'slug' => 'woocommerce',
'required' => false,
),
// YITH WooCommerce Quick View
array(
'name' => __('YITH WooCommerce Quick View','atomy'),
'slug' => 'yith-woocommerce-quick-view',
'required' => false,
),
// I WooCommerce Wishlist
array(
'name' => __('TI WooCommerce Wishlist','atomy'),
'slug' => 'ti-woocommerce-wishlist',
'required' => false,
),
// YITH WooCommerce Zoom Magnifier
array(
'name' => __('YITH WooCommerce Zoom Magnifier','atomy'),
'slug' => 'yith-woocommerce-zoom-magnifier',
'required' => false,
),
);
$config = array(
'id' => 'atomy', // Unique ID for hashing notices for multiple instances of TGMPA.
'default_path' => '', // Default absolute path to bundled plugins.
'menu' => 'tgmpa-install-plugins', // Menu slug.
'has_notices' => true, // Show admin notices or not.
'dismissable' => true, // If false, a user cannot dismiss the nag message.
'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
'is_automatic' => false, // Automatically activate plugins after installation or not.
'message' => '', // Message to output right before the plugins table.
'strings' => array(
'page_title' => __('Install Required Plugins','atomy'),
'menu_title' => __('Install Plugins','atomy' ),
/* translators: %s: search term */
'installing' => __('Installing Plugin: %s','atomy'),
/* translators: %s: search term */
'updating' => __('Updating Plugin: %s','atomy'),
'oops' => __('Something went wrong with the plugin API.','atomy'),
/* translators: %1: search term */
'notice_can_install_required' => _n_noop(
'This theme requires the following plugin: %1$s.',
'This theme requires the following plugins: %1$s.',
'atomy'
),
/* translators: %1: search term */
'notice_can_install_recommended' => _n_noop(
'This theme recommends the following plugin: %1$s.',
'This theme recommends the following plugins: %1$s.',
'atomy'
),
/* translators: %1: search term */
'notice_ask_to_update' => _n_noop(
'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',
'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',
'atomy'
),
/* translators: %1: search term */
'notice_ask_to_update_maybe' => _n_noop(
'There is an update available for: %1$s.',
'There are updates available for the following plugins: %1$s.',
'atomy'
),
/* translators: %1: search term */
'notice_can_activate_required' => _n_noop(
'The following required plugin is currently inactive: %1$s.',
'The following required plugins are currently inactive: %1$s.',
'atomy'
),
/* translators: %1: search term */
'notice_can_activate_recommended' => _n_noop(
'The following recommended plugin is currently inactive: %1$s.',
'The following recommended plugins are currently inactive: %1$s.',
'atomy'
),
'install_link' => _n_noop(
'Begin installing plugin',
'Begin installing plugins',
'atomy'
),
'update_link' => _n_noop(
'Begin updating plugin',
'Begin updating plugins',
'atomy'
),
'activate_link' => _n_noop(
'Begin activating plugin',
'Begin activating plugins',
'atomy'
),
'return' => __('Return to Required Plugins Installer','atomy'),
'plugin_activated' => __('Plugin activated successfully.','atomy'),
'activated_successfully' => __('The following plugin was activated successfully:','atomy'),
/* translators: %1: search term */
'plugin_already_active' => __('No action taken. Plugin %1$s was already active.','atomy'),
/* translators: %s: search term */
'plugin_needs_higher_version' => __('Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.','atomy'),
/* translators: %1: search term */
'complete' => __('All plugins installed and activated successfully. %1$s','atomy'),
'dismiss' => __('Dismiss this notice','atomy'),
'notice_cannot_install_activate' => __('There are one or more required or recommended plugins to install, update or activate.','atomy'),
'contact_admin' => __('Please contact the administrator of this site for help.','atomy'),
'nag_type' => '', // Determines admin notice type - can only be one of the typical WP notice classes, such as 'updated', 'update-nag', 'notice-warning', 'notice-info' or 'error'. Some of which may not work as expected in older WP versions.
),
);
tgmpa( $plugins, $config );
}
/* Atomy Admin Page
========================================================================== */
function atomy_page_create() {
add_theme_page('Atomy', 'ATOMY', 'edit_theme_options', 'atomy_page', 'atomy_page_display',1);
}
add_action('admin_menu', 'atomy_page_create');
require get_template_directory() . '/atomy-admin/atomy-support.php';
//Include Admin Style
function atomy_load_admin_style($hook) {
if( $hook == 'appearance_page_atomy_page' ) {
wp_enqueue_style( 'atomy-admin-css', get_template_directory_uri() . '/atomy-admin/css/atomy-admin-style.css', false, '1.0.0' );
wp_enqueue_script( 'atomy-admin-script', get_template_directory_uri() . '/atomy-admin/js/atomy-admin-script.js', false, '1.0.0' );
wp_enqueue_style( 'atomy-font-awesome-admin', get_template_directory_uri() . '/css/fontawesome-all.min.css' );
}
}
add_action( 'admin_enqueue_scripts', 'atomy_load_admin_style' );
/* Url Admin Support / Copyright
========================================================================== */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
define('atomy_url_go_pro_theme','https://www.denisfranchi.com/blog/portfolio/atomy/');// Go Pro
define('atomy_url_updates_theme','https://www.denisfranchi.com/blog/2020/03/15/atomy-free/');// Update Theme
define('atomy_url_documentation_theme','https://www.denisfranchi.com/blog/category/documentation-atomy/');// Documentation Theme
define('atomy_url_support_theme','https://wordpress.org/support/theme/atomy/');// Support Theme
define('atomy_url_faq_1_support','https://www.denisfranchi.com/blog/2021/02/19/initial-settings-atomy-free/');// Faq 1 Support
define('atomy_url_faq_2_support','https://www.denisfranchi.com/blog/2021/02/19/atomy-plugin-settings/');// Faq 2 Support
define('atomy_url_faq_3_support','https://www.denisfranchi.com/blog/2021/02/20/atomy-customize/');// Faq 3 Support
define('atomy_url_faq_4_support','https://www.denisfranchi.com/blog/2021/02/19/atomy-image-size/');// Faq 4 Support
define('atomy_url_copyright_theme','https://www.denisfranchi.com/');// Franchi Design Copyright
define('atomy_url_demos_theme','https://www.denisfranchi.com/blog/portfolio/atomy/');// Franchi Design Demo
define('atomy_url_basic_documentation','https://www.denisfranchi.com/blog/2021/02/19/initial-settings-atomy-free/');// Basic Documentation
define('atomy_review_theme','https://wordpress.org/support/theme/atomy/reviews/');// Review Theme
define('franchi_design_url','https://www.denisfranchi.com/');// Franchi Design
define('atomy_bubiblock','https://bubiblock.com/'); // BubiBlock Site
define('atomy_bubiblock_slider','https://wordpress.org/plugins/bubiblock-slider/'); // BubiBlock Slider
/* Notice Admin Area
-------------------------------------------------------- */
class atomy_screen {
public function __construct() {
/* notice Lines*/
add_action( 'load-themes.php', array( $this, 'atomy_activation_admin_notice' ) );
}
public function atomy_activation_admin_notice() {
global $pagenow;
if ( is_admin() && ('themes.php' == $pagenow) && isset( $_GET['activated'] ) ) {
add_action( 'admin_notices', array( $this, 'atomy_admin_notice' ), 99 );
}
}
/* Display an admin notice linking to the welcome screen */
public function atomy_admin_notice() {
?>
'.__('*Important','atomy').' '.__('Before importing the demo install all the recommended plugins! Download the available demos via the link below "Atomy Starter Demos". Download the demo via the link "Free Demo". Unzip the .zip file on your desktop. Inside you will find 3 files (.dat / .xml / .wie).
Upload the files using the appropriate buttons below (Import Content / Import Widget / Import Customizer). Done! ','atomy').'