This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace GM\VirtualPages; | |
/** | |
* @author Giuseppe Mazzapica <[email protected]> | |
* @license http://opensource.org/licenses/MIT MIT | |
*/ | |
class Controller implements ControllerInterface { | |
private $pages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function irgendwasenheader(){ | |
$testrequest = wp_remote_get( 'https://www.domain.com/wp-json/wp/v2/CPT/' ); | |
if( is_wp_error( $testrequest ) ) { | |
// Keine Daten | |
return false; | |
} | |
$testbody = wp_remote_retrieve_body( $testrequest ); | |
$irgendwasengesamt = wp_remote_retrieve_header($testrequest, 'x-wp-total' ); | |
$apiseiten = wp_remote_retrieve_header($testrequest, 'x-wp-totalpages' ); | |