core/data_migration_scripts/4_3_0_stages/EE_DMS_4_3_0_critical_page_shortcode_tracking.dmsstage.php 1 location
|
@@ 99-107 (lines=9) @@
|
96 |
|
* @access private |
97 |
|
* @return string |
98 |
|
*/ |
99 |
|
private function _get_page_for_posts() { |
100 |
|
$page_for_posts = get_option( 'page_for_posts' ); |
101 |
|
if ( ! $page_for_posts ) { |
102 |
|
return 'posts'; |
103 |
|
} |
104 |
|
global $wpdb; |
105 |
|
$SQL = 'SELECT post_name from ' . $wpdb->posts . ' WHERE post_type="posts" OR post_type="page" AND post_status="publish" AND ID=%s'; |
106 |
|
return $wpdb->get_var( $wpdb->prepare( $SQL, $page_for_posts )); |
107 |
|
} |
108 |
|
|
109 |
|
|
110 |
|
|
core/EE_Config.core.php 1 location
|
@@ 860-869 (lines=10) @@
|
857 |
|
* @access public |
858 |
|
* @return string |
859 |
|
*/ |
860 |
|
public static function get_page_for_posts() { |
861 |
|
$page_for_posts = get_option( 'page_for_posts' ); |
862 |
|
if ( ! $page_for_posts ) { |
863 |
|
return 'posts'; |
864 |
|
} |
865 |
|
/** @type WPDB $wpdb */ |
866 |
|
global $wpdb; |
867 |
|
$SQL = "SELECT post_name from $wpdb->posts WHERE post_type='posts' OR post_type='page' AND post_status='publish' AND ID=%d"; |
868 |
|
return $wpdb->get_var( $wpdb->prepare( $SQL, $page_for_posts )); |
869 |
|
} |
870 |
|
|
871 |
|
|
872 |
|
|