Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content
/
plugins
/
jetpack
/
jetpack_vendor
/
automattic
/
jetpack-wordads
/
src
:
class-helper.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * Helper class providing various static utility functions for use in Search. * * @package automattic/jetpack-wordads */ namespace Automattic\Jetpack\WordAds; /** * Various helper functions for reuse throughout the WordAds code. */ class Helper { /** * Get the current site's WordPress.com ID. * * @return int Blog ID. */ public static function get_wpcom_site_id() { // Returns local blog ID for a multi-site network. if ( defined( 'IS_WPCOM' ) && constant( 'IS_WPCOM' ) ) { return \get_current_blog_id(); } // Returns cache site ID. return \Jetpack_Options::get_option( 'id' ); } }