View functions.php
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 | |
add_filter( | |
'hivepress/v1/routes', | |
function( $routes ) { | |
$routes['listing_submit_details_page']['title'] = 'Custom title here'; | |
return $routes; | |
}, | |
1000 | |
); |
View functions.php
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 | |
add_filter( | |
'hivepress/v1/menus/user_account', | |
function ( $menu ) { | |
if ( is_user_logged_in() ) { | |
$vendor_id = HivePress\Models\Vendor::query()->filter( | |
[ | |
'user' => get_current_user_id(), | |
] | |
)->get_first_id(); |
View functions.php
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 | |
add_filter( | |
'hivepress/v1/templates/listing_view_page/blocks', | |
function( $blocks, $template ) { | |
$listing = $template->get_context( 'listing' ); | |
if ( $listing ) { | |
$blocks = hivepress()->helper->merge_trees( | |
[ 'blocks' => $blocks ], | |
[ |
View functions.php
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 | |
add_filter( | |
'hivepress/v1/forms/user_update', | |
function( $form ) { | |
$form['fields']['description']['required'] = true; | |
return $form; | |
}, | |
1000 | |
); |
View functions.php
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 | |
add_filter( | |
'hivepress/v1/models/listing/fields', | |
function( $fields, $model ) { | |
if ( isset( $fields['price'] ) ) { | |
$fields['price']['display_template'] = '%value% / day'; | |
} | |
return $fields; | |
}, |
View functions.php
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 | |
add_filter( | |
'hivepress/v1/forms/user_register/errors', | |
function( $errors, $form ) { | |
if ( ! $errors ) { | |
$domain = hivepress()->helper->get_last_array_value( explode( '@', $form->get_value( 'email' ) ) ); | |
if ( ! in_array( | |
$domain, | |
[ |
View style.css
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
.hp-page { | |
max-width: 1234px; | |
padding: 32px; | |
} |
View functions.php
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 | |
add_filter( | |
'hivepress/v1/blocks/page', | |
function( $args ) { | |
return hivepress()->helper->merge_arrays( | |
$args, | |
[ | |
'attributes' => [ | |
'class' => [ 'my-custom-wrapper' ], | |
], |
View functions.php
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 | |
add_filter( | |
'hivepress/v1/blocks/page', | |
function( $args ) { | |
return hivepress()->helper->merge_arrays( | |
$args, | |
[ | |
'blocks' => [ | |
'before' => [ | |
'type' => 'content', |
View header.php
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 | |
if ( function_exists( 'hivepress' ) ) { | |
echo hivepress()->template->render_menu(); | |
} |
NewerOlder