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 a Field to the Job Submission Form: | |
*/ | |
add_filter( 'submit_job_form_fields', 'custom_job_submission_fields' ); | |
function custom_job_submission_fields( $fields ) { | |
$fields['job']['custom_field'] = array( | |
'label' => __( 'Custom Field', 'text-domain' ), | |
'type' => 'text', | |
'required' => false, |
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 | |
/** | |
* | |
*Setup tab under Account Setting. | |
*/ | |
function custom_settings_tab() { | |
bp_core_new_subnav_item( array( | |
'name' => __( 'BB Member Info', 'buddyboss' ), | |
'slug' => 'bb-member-info', |
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 | |
$access_token = 'Your access token'; | |
if (!$access_token) { | |
return 'Error: Unable to retrieve access token'; | |
} | |
$api_url = 'https://yourdomain.my.salesforce.com/services/data/v55.0/sobjects/Contact/' . $contact_id; | |
$response = wp_remote_get($api_url, array( | |
'headers' => 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 | |
$access_token = 'your_access_token'; | |
if (!$access_token) { | |
return 'Error: Unable to authenticate with Salesforce'; | |
} | |
$instance_url = 'https://youraccount.salesforce.com'; // Replace with your instance URL | |
$endpoint = $instance_url . '/services/data/v55.0/sobjects/Account'; | |
$account_data = array( | |
'Name' => $first_name, |
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 | |
function bbtest_the_content( $content ) { | |
$search = array( '<pre>' ); | |
$replace = array( '<pre class="wp-block-syntaxhighlighter-code">' ); | |
$content = str_replace( $search, $replace, $content ); | |
$syntax_obj = new SyntaxHighlighter(); |
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 | |
function bbtest_render_app_page_data( $app_page_data, $block_data ) { | |
if ( isset( $app_page_data['type'] ) && 'bbapp/notifications' === $app_page_data['type'] ) { | |
$app_page_data['data']['data_source']['route'] = '/buddyboss-app/v1/notifications?&sort_order=DESC&order_by=date_notified'; | |
} | |
return $app_page_data; |
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
document.addEventListener('DOMContentLoaded', function() { | |
const video = document.getElementById('video-22_html5_api'); // SET your Video tag ID | |
let previewStarted = false; | |
function isElementInViewport(el) { | |
const rect = el.getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && |
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 | |
/** | |
* Get rid of BBApp block compatibility error. | |
* | |
* @param [type] $allow_blocks_for_editor_to_app_editor | |
* @return void | |
*/ | |
function bb_allow_blocks_for_editor_to_app_editor( $allow_blocks_for_editor_to_app_editor ) { |
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 | |
// Enable WYSWING editor. | |
function bbp_enable_visual_editor( $r = array() ) { | |
$r['tinymce'] = true; | |
$r['media_buttons'] = true; | |
// Load WHYSWING. |
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 | |
/** | |
* We have to pass "is_new:0" and apply following filter. | |
*/ | |
function modify_where( $where_sql, $table_prefix, $r ) { | |
$where_sql = str_replace( 'AND is_new = 0', '', $where_sql ); |
NewerOlder