Skip to content

Instantly share code, notes, and snippets.

View awsm-support's full-sized avatar

Awsm Innovations Support awsm-support

View GitHub Profile
@awsm-support
awsm-support / job-functions.php
Created August 30, 2021 09:58
WP Job Openings - Reset Job Views Count
<?php
/**
* NOTE: Please execute this function only once. After resetting the views, remove the whole code snippet.
*/
function awsm_jobs_reset_views_count() {
$args = array(
'post_type' => 'awsm_job_openings',
'post_status' => array( 'publish', 'expired', 'future', 'draft', 'pending' ),
'posts_per_page' => -1,
@awsm-support
awsm-support / custom-functions.php
Created October 7, 2021 09:02
Team Pro - Add Custom Icons with Popular Brand Icons Plugin
<?php
function awsm_team_member_custom_social_info( $social_info, $social ) {
if ( isset( $social['link'] ) && ! wp_http_validate_url( $social['link'] ) && substr_count( $social['link'], '#' ) >= 2 && substr( $social['link'], 0, 1 ) === '#' ) {
$link_arr = explode( '#', $social['link'] );
$icon = $link_arr[1];
$link = $link_arr[2];
$is_framework_color = false; // change this to true if you want the default icon color.
$shortcode = sprintf( '[simple_icon name="%1$s" size="16px"%2$s]', esc_attr( $icon ), ! $is_framework_color ? ' color="black"' : '' );
@awsm-support
awsm-support / job-functions.php
Last active April 11, 2022 07:01
WP Job Openings - Custom Application Status (Pro)
<?php
function awsm_jobs_pro_custom_application_status( $status ) {
$status['interviewed'] = array(
'label' => _x( 'Interviewed', 'post status', 'pro-pack-for-wp-job-openings' ),
'label_count' => _n_noop( 'Interviewed <span>(%s)</span>', 'Interviewed <span>(%s)</span>', 'pro-pack-for-wp-job-openings' ),
);
$status['offered'] = array(
'label' => _x( 'Offered', 'post status', 'pro-pack-for-wp-job-openings' ),
'label_count' => _n_noop( 'Offered <span>(%s)</span>', 'Offered <span>(%s)</span>', 'pro-pack-for-wp-job-openings' ),