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 | |
/** | |
* Properties Post Type General Class | |
* @author Aamer | |
* | |
*/ | |
class properties_cpt { | |
function properties_cpt() { | |
add_action( 'init', array( $this, 'create_property_cpt' ) ); |
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 | |
/** | |
* widgets_init action hook. | |
* used to register, widgets or widget areas in a theme. | |
*/ | |
add_action( 'widgets_init', 'oopthemes_widgets_init' ); | |
function oopthemes_widgets_init() { | |
register_sidebar( array( | |
'name' => __( 'Primary Sidebar', 'theme-slug' ), | |
'id' => 'sidebar-primary', |
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 | |
/** | |
* list of sidebars to be generated | |
* @var array : array of sidebars | |
*/ | |
$sidebars = array( | |
'footer one sidebar', | |
'footer two sidebar', | |
'footer three sidebar', | |
'footer four sidebar', |
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 | |
/** | |
* theme widgets and widget areas | |
*/ | |
add_action ( 'widgets_init', 'oopthemes_register_sidebar' ); | |
function oopthemes_register_sidebar( $sidebars = array() ) { | |
foreach ( $sidebars as $name ) { | |
/** | |
* sidebar name, make the words uppercase | |
* @var string : each name of the sidebar in the array |
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 | |
/* | |
* call the oopthemes_after_setup function when theme is initialized. | |
*/ | |
add_action( 'after_setup_theme', 'oopthemes_after_setup' ); | |
function oopthemes_after_setup() { | |
/** | |
* Add support for the <title> tags. | |
* @since WordPress 4.1 |
NewerOlder