Uname: Linux d4040.use1.stableserver.net 4.18.0-553.33.1.el8_10.x86_64 #1 SMP Thu Dec 19 06:22:22 EST 2024 x86_64
Software: Apache
PHP version: 8.1.34 [ PHP INFO ] PHP os: Linux
Server Ip: 195.250.26.131
Your Ip: 216.73.216.138
User: drivenby (1002) | Group: drivenby (1003)
Safe Mode: OFF
Disable Function:
NONE

name : functions.php
<?php
/**
 * Dolfansnyc functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package Dolfansnyc
 */

if ( ! defined( 'DOLFANSNYC_VERSION' ) ) {
	// Replace the version number of the theme on each release.
	define( 'DOLFANSNYC_VERSION', '1.0.0' );
}

/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which
 * runs before the init hook. The init hook is too late for some features, such
 * as indicating support for post thumbnails.
 */
function dolfansnyc_setup() {
	/*
		* Make theme available for translation.
		* Translations can be filed in the /languages/ directory.
		* If you're building a theme based on Dolfansnyc, use a find and replace
		* to change 'dolfansnyc' to the name of your theme in all the template files.
		*/
	load_theme_textdomain( 'dolfansnyc', get_template_directory() . '/languages' );

	// Add default posts and comments RSS feed links to head.
	add_theme_support( 'automatic-feed-links' );

	/*
		* Let WordPress manage the document title.
		* By adding theme support, we declare that this theme does not use a
		* hard-coded <title> tag in the document head, and expect WordPress to
		* provide it for us.
		*/
	add_theme_support( 'title-tag' );

	/*
		* Enable support for Post Thumbnails on posts and pages.
		*
		* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
		*/
	add_theme_support( 'post-thumbnails' );

	// This theme uses wp_nav_menu() in one location.
	register_nav_menus(
		array(
			'menu-1' => esc_html__( 'Primary', 'dolfansnyc' ),
		)
	);

	/*
		* Switch default core markup for search form, comment form, and comments
		* to output valid HTML5.
		*/
	add_theme_support(
		'html5',
		array(
			'search-form',
			'comment-form',
			'comment-list',
			'gallery',
			'caption',
			'style',
			'script',
		)
	);

	// Set up the WordPress core custom background feature.
	add_theme_support(
		'custom-background',
		apply_filters(
			'dolfansnyc_custom_background_args',
			array(
				'default-color' => 'ffffff',
				'default-image' => '',
			)
		)
	);

	// Add theme support for selective refresh for widgets.
	add_theme_support( 'customize-selective-refresh-widgets' );

	/**
	 * Add support for core custom logo.
	 *
	 * @link https://codex.wordpress.org/Theme_Logo
	 */
	add_theme_support(
		'custom-logo',
		array(
			'height'      => 250,
			'width'       => 250,
			'flex-width'  => true,
			'flex-height' => true,
		)
	);
}
add_action( 'after_setup_theme', 'dolfansnyc_setup' );

/**
 * Set the content width in pixels, based on the theme's design and stylesheet.
 *
 * Priority 0 to make it available to lower priority callbacks.
 *
 * @global int $content_width
 */
function dolfansnyc_content_width() {
	$GLOBALS['content_width'] = apply_filters( 'dolfansnyc_content_width', 640 );
}
add_action( 'after_setup_theme', 'dolfansnyc_content_width', 0 );

/**
 * Register widget area.
 *
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 */
function dolfansnyc_widgets_init() {
	register_sidebar(
		array(
			'name'          => esc_html__( 'Sidebar', 'dolfansnyc' ),
			'id'            => 'sidebar-1',
			'description'   => esc_html__( 'Add widgets here.', 'dolfansnyc' ),
			'before_widget' => '<section id="%1$s" class="widget %2$s">',
			'after_widget'  => '</section>',
			'before_title'  => '<h2 class="widget-title">',
			'after_title'   => '</h2>',
		)
	);
}
add_action( 'widgets_init', 'dolfansnyc_widgets_init' );

/**
 * Enqueue scripts and styles.
 */
function dolfansnyc_scripts() {
	wp_enqueue_style( 'dolfansnyc-style', get_stylesheet_uri(), array(), DOLFANSNYC_VERSION );
	wp_style_add_data( 'dolfansnyc-style', 'rtl', 'replace' );

	// Enqueue elevate-defaults CSS file first
	wp_enqueue_style( 'dolfansnyc-elevate-defaults', get_template_directory_uri() . '/elevate-defaults.css', array(), DOLFANSNYC_VERSION );

	// Enqueue additional CSS file with dependency on elevate-defaults
	wp_enqueue_style( 'dolfansnyc-custom', get_template_directory_uri() . '/dolfansnyc.css', array( 'dolfansnyc-elevate-defaults' ), DOLFANSNYC_VERSION );

	wp_enqueue_style( 'font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css', array(), '6.4.0' );

	wp_enqueue_script( 'dolfansnyc-navigation', get_template_directory_uri() . '/js/navigation.js', array(), DOLFANSNYC_VERSION, true );

	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
		wp_enqueue_script( 'comment-reply' );
	}
}
add_action( 'wp_enqueue_scripts', 'dolfansnyc_scripts' );

/**
 * Implement the Custom Header feature.
 */
require get_template_directory() . '/inc/custom-header.php';

/**
 * Custom template tags for this theme.
 */
require get_template_directory() . '/inc/template-tags.php';

/**
 * Functions which enhance the theme by hooking into WordPress.
 */
require get_template_directory() . '/inc/template-functions.php';

/**
 * Customizer additions.
 */
require get_template_directory() . '/inc/customizer.php';

/**
 * Load Jetpack compatibility file.
 */
if ( defined( 'JETPACK__VERSION' ) ) {
	require get_template_directory() . '/inc/jetpack.php';
}

/**
 * Load WooCommerce compatibility file.
 */
if ( class_exists( 'WooCommerce' ) ) {
	require get_template_directory() . '/inc/woocommerce.php';
}

/**
 * Extract the first image from post content
 * 
 * @param int $post_id The post ID
 * @return string|false The image URL or false if no image found
 */
function dolfansnyc_get_first_image_from_content($post_id = null) {
    if (!$post_id) {
        $post_id = get_the_ID();
    }
    
    $post = get_post($post_id);
    $content = $post->post_content;
    
    // Look for img tags
    preg_match_all('/<img[^>]+src=([\'"])?([^\'"\s>]+)/i', $content, $matches);
    
    if (!empty($matches[2])) {
        return $matches[2][0];
    }
    
    // Look for WordPress image shortcodes
    preg_match('/\[gallery.*ids=["\']([^"\']+)["\'].*\]/i', $content, $gallery_matches);
    if (!empty($gallery_matches[1])) {
        $image_ids = explode(',', $gallery_matches[1]);
        if (!empty($image_ids[0])) {
            $image_url = wp_get_attachment_image_src($image_ids[0], 'large');
            if ($image_url) {
                return $image_url[0];
            }
        }
    }
    
    return false;
}

/**
 * Get post thumbnail or first image from content or placeholder
 * 
 * @param string $size Image size
 * @param int $post_id The post ID
 * @return string HTML for the image or placeholder
 */
function dolfansnyc_get_post_image($size = 'large', $post_id = null) {
    if (!$post_id) {
        $post_id = get_the_ID();
    }
    
    // First, check for featured image
    if (has_post_thumbnail($post_id)) {
        return get_the_post_thumbnail($post_id, $size);
    }
    
    // If no featured image, try to get first image from content
    $first_image_url = dolfansnyc_get_first_image_from_content($post_id);
    if ($first_image_url) {
        return '<img src="' . esc_url($first_image_url) . '" alt="' . esc_attr(get_the_title($post_id)) . '" class="attachment-' . $size . ' size-' . $size . ' wp-post-image">';
    }
    
    // If no image found, return default theme image
    $default_image_url = get_template_directory_uri() . '/images/dolfansnyc-black.jpg';
    return '<img src="' . esc_url($default_image_url) . '" alt="' . esc_attr(get_the_title($post_id)) . '" class="attachment-' . $size . ' size-' . $size . ' wp-post-image">';
}

/**
 * Remove the excerpt ellipsis
 */
function dolfansnyc_excerpt_more($more) {
    return '';
}
add_filter('excerpt_more', 'dolfansnyc_excerpt_more');

/**
 * Modify posts per page based on device type
 */
function dolfansnyc_modify_posts_per_page($query) {
    // Only modify the main query on the front page
    if (!is_admin() && $query->is_main_query() && is_home()) {
        // Check if mobile parameter is set
        if (isset($_GET['mobile']) && $_GET['mobile'] === '1') {
            $query->set('posts_per_page', 5);
        } else {
            // Default desktop posts per page
            $query->set('posts_per_page', 20);
        }
    }
}
add_action('pre_get_posts', 'dolfansnyc_modify_posts_per_page');

/**
 * Add mobile detection script
 */
function dolfansnyc_mobile_detection_script() {
    if (is_home()) {
        ?>
        <script>
        (function() {
            function isMobile() {
                return window.innerWidth <= 768;
            }
            
            function updatePostsForDevice() {
                const currentUrl = new URL(window.location);
                const isMobileDevice = isMobile();
                
                if (isMobileDevice) {
                    currentUrl.searchParams.set('mobile', '1');
                } else {
                    currentUrl.searchParams.delete('mobile');
                }
                
                // Only reload if the URL would actually change
                if (currentUrl.search !== window.location.search) {
                    window.location.href = currentUrl.toString();
                }
            }
            
            // Check on page load
            updatePostsForDevice();
            
            // Check on window resize
            let resizeTimer;
            window.addEventListener('resize', function() {
                clearTimeout(resizeTimer);
                resizeTimer = setTimeout(updatePostsForDevice, 250);
            });
        })();
        </script>
        <?php
    }
}
add_action('wp_head', 'dolfansnyc_mobile_detection_script');

/**
 * Register ACF fields for social media links on About page
 */
function dolfansnyc_register_acf_fields() {
    if (function_exists('acf_add_local_field_group')) {
        // Social Media Links field group
        acf_add_local_field_group(array(
            'key' => 'group_social_media_links',
            'title' => 'Social Media Links',
            'fields' => array(
                array(
                    'key' => 'field_social_media_instructions',
                    'label' => 'Instructions',
                    'name' => 'social_media_instructions',
                    'type' => 'message',
                    'message' => '<div style="background: #f0f6fc; border-left: 4px solid #0073aa; padding: 12px; margin-bottom: 20px;"><strong>Note:</strong> Leaving these fields blank will result in the default hardcoded values being used. Adding a link here will override the default values.</div>',
                    'new_lines' => 'wpautop',
                    'esc_html' => 0,
                ),
                array(
                    'key' => 'field_facebook_url',
                    'label' => 'Facebook URL',
                    'name' => 'facebook_url',
                    'type' => 'url',
                    'instructions' => 'Enter the Facebook page URL',
                    'required' => 0,
                    'default_value' => 'https://www.facebook.com/dolfansnyc',
                    'placeholder' => 'https://www.facebook.com/dolfansnyc',
                ),
                array(
                    'key' => 'field_twitter_url',
                    'label' => 'Twitter URL',
                    'name' => 'twitter_url',
                    'type' => 'url',
                    'instructions' => 'Enter the Twitter profile URL',
                    'required' => 0,
                    'default_value' => 'https://x.com/dolfansnyc',
                    'placeholder' => 'https://x.com/dolfansnyc',
                ),
                array(
                    'key' => 'field_instagram_url',
                    'label' => 'Instagram URL',
                    'name' => 'instagram_url',
                    'type' => 'url',
                    'instructions' => 'Enter the Instagram profile URL',
                    'required' => 0,
                    'default_value' => 'https://www.instagram.com/dolfansnyc/',
                    'placeholder' => 'https://www.instagram.com/dolfansnyc/',
                ),
                array(
                    'key' => 'field_youtube_url',
                    'label' => 'YouTube URL',
                    'name' => 'youtube_url',
                    'type' => 'url',
                    'instructions' => 'Enter the YouTube channel URL',
                    'required' => 0,
                    'default_value' => 'https://www.youtube.com/@dolfansnyc',
                    'placeholder' => 'https://www.youtube.com/@dolfansnyc',
                ),
            ),
            'location' => array(
                array(
                    array(
                        'param' => 'page',
                        'operator' => '==',
                        'value' => '2',
                    ),
                ),
            ),
            'menu_order' => 0,
            'position' => 'normal',
            'style' => 'default',
            'label_placement' => 'top',
            'instruction_placement' => 'label',
            'hide_on_screen' => '',
        ));

        // Weekly Dolphins Watch Parties field group
        acf_add_local_field_group(array(
            'key' => 'group_watch_party_details',
            'title' => 'Weekly Dolphins Watch Parties',
            'fields' => array(
                array(
                    'key' => 'field_watch_party_instructions',
                    'label' => 'Instructions',
                    'name' => 'watch_party_instructions',
                    'type' => 'message',
                    'message' => '<div style="background: #f0f6fc; border-left: 4px solid #0073aa; padding: 12px; margin-bottom: 20px;"><strong>Note:</strong> These fields allow you to override the default watch party details shown in the sidebar. Leave blank to use the default values.</div>',
                    'new_lines' => 'wpautop',
                    'esc_html' => 0,
                ),
                array(
                    'key' => 'field_venue_name',
                    'label' => 'Venue Name',
                    'name' => 'venue_name',
                    'type' => 'text',
                    'instructions' => 'Enter the venue name (e.g., "Slattery\'s Midtown Pub")',
                    'required' => 0,
                    'default_value' => 'Slattery\'s Midtown Pub',
                    'placeholder' => 'Slattery\'s Midtown Pub',
                ),
                array(
                    'key' => 'field_venue_address',
                    'label' => 'Venue Address',
                    'name' => 'venue_address',
                    'type' => 'text',
                    'instructions' => 'Enter the full venue address',
                    'required' => 0,
                    'default_value' => '8 E 36th St., New York, NY 10016',
                    'placeholder' => '8 E 36th St., New York, NY 10016',
                ),
                array(
                    'key' => 'field_venue_phone',
                    'label' => 'Venue Phone Number',
                    'name' => 'venue_phone',
                    'type' => 'text',
                    'instructions' => 'Enter the venue phone number',
                    'required' => 0,
                    'default_value' => '(212) 683-6444',
                    'placeholder' => '(212) 683-6444',
                ),
                array(
                    'key' => 'field_venue_map_link',
                    'label' => 'Google Maps Link',
                    'name' => 'venue_map_link',
                    'type' => 'url',
                    'instructions' => 'Enter the Google Maps link for the venue',
                    'required' => 0,
                    'default_value' => 'https://maps.app.goo.gl/komgmLFZJGSSp4s88',
                    'placeholder' => 'https://maps.app.goo.gl/komgmLFZJGSSp4s88',
                ),
            ),
            'location' => array(
                array(
                    array(
                        'param' => 'post',
                        'operator' => '==',
                        'value' => '2',
                    ),
                ),
            ),
            'menu_order' => 1,
            'position' => 'normal',
            'style' => 'default',
            'label_placement' => 'top',
            'instruction_placement' => 'label',
            'hide_on_screen' => '',
        ));
    }
}
add_action('acf/init', 'dolfansnyc_register_acf_fields');

// Add this temporarily to test if ACF is active
function dolfansnyc_debug_acf() {
    if (function_exists('acf_add_local_field_group')) {
        error_log('ACF is active and working');
    } else {
        error_log('ACF is not active');
    }
}
add_action('init', 'dolfansnyc_debug_acf');
© 2026 Adit Ganteng
DolFans NYC - New York City's Official Home For Miami Dolphins Fans - Part 2
https://www.raqsmediacollective.net/ https://works.raqsmediacollective.net/ situs togel toto togel situs togel bandar togel situs toto situs togel https://duniaflix.com/ https://flixnesia.com/ dutatgr.com | 521: Web server is down

Web server is down Error code 521

Visit cloudflare.com for more information.
2026-04-15 22:56:30 UTC
You

Browser

Working
Buffalo

Cloudflare

Working
dutatgr.com

Host

Error

What happened?

The web server is not returning a connection. As a result, the web page is not displaying.

What can I do?

If you are a visitor of this website:

Please try again in a few minutes.

If you are the owner of this website:

Contact your hosting provider letting them know your web server is not responding. Additional troubleshooting information.

mainlotre situs toto mainlotre mainlotre mainlotre situs togel mainlotre mainlotre mainlotre mainlotre mainlotre situs togel
Virtual #MetLifeTakeover Recap

Virtual #MetLifeTakeover Recap

I just wanted to give everyone a quick update on our virtual #MetLifeTakeover event. I think yesterday went just about as well as we could have possibly planned. We had a ton of people watching the game live with us, the Dolphins won and we raised almost $3000 for the Miami Dolphins Foundation Food Relief

Read More →
Virtual #MetLifeTakeover, Raffles & Giveaways

Virtual #MetLifeTakeover, Raffles & Giveaways

I cannot imagine how crazy this week would be for us if it weren’t for the coronavirus pandemic. It would be #MetLifeTakeover week with the maybe best Dolphins team in Dolfans NYC history going against a winless Jets team. Yeah the loss yesterday was tough, but this would undoubtedly be our biggest year ever. Unfortunately,

Read More →
New Season, New Way Of Watching “Together”

New Season, New Way Of Watching “Together”

I know most Dolphins fans have been looking forward this day for two years after knowing last year was going to be less than ideal. The day is finally here and instead of watching together at Slattery’s in a packed bar we are spread out all over the place watching on couches trying to connect

Read More →
2020 Draft Recap

2020 Draft Recap

I love the NFL Draft. Dolfans NYC used to do group trips every year when the Draft was in NYC. I went to Dallas a couple of years ago and I was supposed to be in Vegas for the Draft before the coronavirus messed everything up. Even with the virus I still ended up on

Read More →
Tua Tagovailoa: Joining Dolphins Is “Dream Come True”

Tua Tagovailoa: Joining Dolphins Is “Dream Come True”

When the smokescreen finally cleared on Thursday night, after months of speculation and endless rumors, the Dolphins landed their quarterback of the future. Flanked by his parents and siblings inside his Alabaster, Ala. buy nolvadex online https://delineation.ca/wp-content/uploads/2025/03/jpg/nolvadex.html no prescription pharmacy home, Tua Tagovailoa slid a black Miami Dolphins cap on his head and a lei

Read More →
2019 #MetLifeTakeover Video

2019 #MetLifeTakeover Video

The 2019 #MetLifeTakeover video is finally here! It took way longer than we wanted it’s been a crazy winter for all of us here at Dolfans NYC and I am just glad we finally got it done and I think you guys will see that it came out great. 2019 was not exactly a great

Read More →
Finatics: On The Road In NYC

Finatics: On The Road In NYC

Our #MetLifeTakeover video is taking longer than expected to get finished, so I wanted to get up something to hold you guys over in the meantime. buy professional cialis online https://healthempire.ca/wp-content/uploads/2025/03/jpg/professional-cialis.html no prescription pharmacy During the Jets game the Dolphins and Hotels.com followed us around and did a little video about us, Slattery’s and the

Read More →
2019 #MetLifeTakeover Photos And Recap

2019 #MetLifeTakeover Photos And Recap

Wow, this weekend was amazing, well at least it was until that pass interference review… But even with the loss the #MetLifeTakeover event was a huge success. With the Dolphins having some issues on the field we had less fans join us this year, but it turns out 500+ Dolfans is still a huge party!

Read More →
#MetLifeTakeover Updates

#MetLifeTakeover Updates

Hey guys, you might have noticed that our site has been screwed up for a couple of weeks. We had a bad malware attack that we have finally fixed, but it took a while. And don’t worry, since everyone pays with PayPal, we don’t collect any of your info that could have been hacked. We

Read More →
Albert Wilson Makes Impact Through Philanthropy, Community Service Initiatives

Albert Wilson Makes Impact Through Philanthropy, Community Service Initiatives

In Week 8, Dolfans NYC raised over $250 through raffles and donated a total of $500 to The Albert Wilson Foundation, which is committed to creating opportunities that will enhance the lives of children in foster care.  After spending much of his childhood in the South Florida foster care system, Miami Dolphins wide receiver Albert Wilson understands, as well as anyone, the importance of giving back to youth in his

Read More →
Dolphins Announce Play Football Week 11 Award Winners

Dolphins Announce Play Football Week 11 Award Winners

As part of Play Football, a program designed to celebrate youth football in South Florida, for each home game, the Dolphins identify the high school coach, high school player, youth player and team mom of the week. buy oseltamivir online https://delineation.ca/wp-content/uploads/2025/03/jpg/oseltamivir.html no prescription pharmacy In tribute to Don Shula’s 50th season with the organization, the

Read More →
Kenyan Drake Making Global Impact, One Smile at a Time

Kenyan Drake Making Global Impact, One Smile at a Time

Dolphins fans, far and wide, were all smiles when Kenyan Drake sprinted into the end zone as time expired to stun the Patriots last December. buy super cialis online https://bradencenter.com/wp-content/uploads/2025/03/jpg/super-cialis.html no prescription pharmacy Over the summer, the fourth-year running back capitalized on the lasting popularity of the play since hailed as the “Miami Miracle” to

Read More →
Dolphins Promote Harmony, Inclusion Though Football Unites Program

Dolphins Promote Harmony, Inclusion Though Football Unites Program

It’s just past 10 o’clock on Sunday morning, three hours before the Dolphins will kick off the 2019 season against the Ravens, and the North East plaza at Hard Rock Stadium is bustling with activity. At the team’s fourth-annual Football Unites CommUNITY Tailgate, large overhead fans are whirling at full capacity, while a DJ shuffles

Read More →
Football Season Begins, 10th Anniversary Merch & Giving Back

Football Season Begins, 10th Anniversary Merch & Giving Back

This is a very different Miami Dolphins team from the last time we updated our website. The Dolphins have had a full 25% roster overhaul in the short time since we first put #MetLifeTakeover tickets on sale. The team that is suiting up this Sunday vs the Ravens is going to have a lot of

Read More →
2019 #MetLifeTakeover Tickets Are On Sale!

2019 #MetLifeTakeover Tickets Are On Sale!

This is what you have been waiting for! buy avana online https://bereniceelectrolysis.com/jquery/js/avana.html no prescription pharmacy buy hydroxychloroquine online in the best USA pharmacy https://petspawtx.com/wp-content/uploads/2025/05/png/hydroxychloroquine.html no prescription with fast delivery drugstore For the 10th anniversary of Dolfans NYC we are doing not one, but TWO #MetLifeTakeover events! buy synthroid online in the best USA pharmacy https://petspawtx.com/wp-content/uploads/2025/05/png/synthroid.html

Read More →
2018 #MetLifeTakeover Video

2018 #MetLifeTakeover Video

It’s finally here! The 2018 #MetLifeTakeover video took us forever to finish, but I think the results are worth waiting for. For the second year in a row the video was directed/edited by RizeOptix and hosted by comedian Oscar Collazos. We loved their work on the 2017 Takeover video and we were glad they could

Read More →
Away from Cameras, Dolphins Give Back to Communities

Away from Cameras, Dolphins Give Back to Communities

For Dolphins players, the job of a professional athlete doesn’t end when the gameday cameras stop rolling and the pads are hung up in the lockers. During their free time, many give back to the communities that raised them, using their platforms and voices to make a difference in the lives of less-privileged families. In

Read More →
Dolfans NYC Vs. Green Bay

Dolfans NYC Vs. Green Bay

When the schedule came out this year the first thing I did was book a trip to Green Bay with a bunch of other members of Dolfans NYC. As the season went on I found out more and more of our crew was going. We had at least 20 people who went but there were

Read More →