array( 'type' => 'str', 'restricted' => array_keys( self::placement_positions() ), ), 'disable_consent' => array( 'type' => 'bool', ), 'within_content_position' => array( 'type' => 'int', 'default' => 10, 'restricted' => array( 10, 20, 30, 40, 50, 60, 70, 80, 90 ), ), 'paragraph_number' => array( 'type' => 'int', 'default' => 2, ), 'post_list_position' => array( 'type' => 'int', 'default' => 1, ), 'placement_items' => array( 'type' => 'str', ), 'order' => array( 'type' => 'int', 'default' => 1, ), ), TargetingMeta::post_meta_keys(), ); } /** * Placement position key/value array for use in admin and elsewhere. * * @return array */ public static function placement_positions() { return array( 'before_content' => __( 'Before Content', 'ad-commander' ), 'after_content' => __( 'After Content', 'ad-commander' ), 'within_content' => __( 'Within Content', 'ad-commander' ), 'after_p_tag' => __( 'After Paragraph #', 'ad-commander' ), // 'above_title' => __( 'Above Title', 'ad-commander' ), 'post_list' => __( 'Post Lists (Home, Archives, etc)', 'ad-commander' ), 'head_close_tag' => __( 'Before ', 'ad-commander' ), 'body_close_tag' => __( 'Before ', 'ad-commander' ), ); } }