This file contains hidden or 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
jQuery( document ).ready( function () { | |
var stepProcess = ""; | |
//------main function------------- | |
function load_setting() { | |
var allowed_post_types = jQuery.parseJSON( owf_submit_workflow_vars.allowedPostTypes ); | |
var current_post_type = jQuery( '#post_type' ).val(); | |
// check if role is applicable to submit to workflow | |
if ( current_post_type !== undefined ) { | |
var check_is_role_applicable = { |
This file contains hidden or 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
/** | |
* A) Regenerate Elementor CSS for a specific post. | |
* | |
* Safe on Elementor 3.31.x. Only runs if the post is built with Elementor. | |
*/ | |
function ml_el_regenerate_post_css( $post_id ) { | |
if ( empty( $post_id ) || wp_is_post_revision( $post_id ) ) return; | |
if ( ! class_exists( '\Elementor\Plugin' ) ) return; | |
$run = function() use ( $post_id ) { |
This file contains hidden or 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 | |
/** | |
* Run the Elementor media reconciliation AFTER One Click Demo Import finishes. | |
* | |
* Why priority 30? | |
* - Ensures your own after-import tasks (menus, front/blog pages, Replace URL, etc.) | |
* have already completed, so media IDs/URLs are normalized last. | |
* | |
* Hook names: |
This file contains hidden or 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
/** | |
* Get the team_id for a user from the {prefix}fc_team_members table. | |
* | |
* @param int $user_id User ID. | |
* @return int|false Team ID or false if none. | |
*/ | |
function owf_helmy_get_user_team_id( $user_id ) { | |
global $wpdb; | |
$table = $wpdb->prefix . 'fc_team_members'; |
This file contains hidden or 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
/** | |
* Oasis Workflow: Per-Team Post Visibility & Admin Columns | |
* --------------------------------------------------------- | |
* - Restricts admin post list to show only posts for user's team (editors/authors) | |
* - Sets _team_id meta on new posts for configured post types | |
* - Shows "Team" column (with name) in admin for each Oasis-enabled post type | |
* | |
* @author Your Name | |
* @license GPL-2.0+ |
This file contains hidden or 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
/** | |
* Action hook triggered when a user submits a post/page to workflow or completes a step. | |
* | |
* Updates the due date of the action history record to the global default due date set in | |
* the Workflow Settings tab, if the default due date is set. | |
* | |
* @param int $post_id The ID of the post/page being submitted. | |
* @param int $action_history_id The ID of the action history record being updated. | |
*/ | |
function custom_modify_due_date_on_submit($post_id, $action_history_id) { |
This file contains hidden or 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
/** | |
* Enable support for post tags on pages. | |
*/ | |
function owf_add_tags_to_pages() { | |
register_taxonomy_for_object_type( 'post_tag', 'page' ); | |
} | |
add_action( 'init', 'owf_add_tags_to_pages' ); | |
// Add action to both front-end and admin to conditionally hide the Beaver Builder publish button. | |
add_action( 'admin_head', 'owf_hide_bb_publish_button' ); |
This file contains hidden or 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
/** | |
* Duplicate custom permalink structure from original post to its revision post. | |
* | |
* @param int $new_post_id The ID of the new revision post. | |
* @param WP_Post $post The original post object. | |
* | |
* @since 3.2.0 | |
*/ |
NewerOlder