/var/www/html_uk/wp-content/plugins/automatewoo/admin/views/meta-box-save.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?php

namespace AutomateWoo;

defined'ABSPATH' ) || exit;

/**
 * @var Workflow $workflow
 */

global $post;
?>
<div class="submitbox" id="submitpost">

    <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
    <div style="display:none;">
        <?php submit_button__'Save''automatewoo' ), '''save' ); ?>
    </div>

    <table class="automatewoo-table">
        <tr id="automatewoo-workflow-type-field-row" class="automatewoo-table__row">
            <td class="automatewoo-table__col">
                <div class="automatewoo-input-group">
                    <label class="automatewoo-input-group__addon automatewoo-input-group__addon--pad-right automatewoo-label--weight-normal">
                        <?php esc_html_e'Type:''automatewoo' ); ?>
                    </label>
                    <div class="automatewoo-input-group__input">
                        <?php
                        
( new Fields\Selectfalse ) )
                            ->
add_classes'automatewoo-workflow-type-field' )
                            ->
set_name'type' )
                            ->
set_name_base'aw_workflow_data' )
                            ->
set_optionsWorkflows::get_types() )
                            ->
render$workflow $workflow->get_type() : 'automatic' );
                        
?>
                    </div>
                </div>
            </td>
        </tr>
        <tr id="automatewoo-workflow-status-field-row" class="automatewoo-table__row">
            <td class="automatewoo-table__col">
                <div class="automatewoo-input-group">
                    <label class="automatewoo-input-group__addon automatewoo-input-group__addon--pad-right automatewoo-label--weight-normal">
                        <?php esc_html_e'Status:''automatewoo' ); ?>
                    </label>

                    <div class="automatewoo-input-group__input">
                        <?php
                        
if ( $workflow ) {
                            
$status $workflow->is_active() ? 'active' 'disabled';
                        } else {
                            
$status 'active';
                        }

                        ( new 
Fields\Selectfalse ) )
                            ->
set_name'workflow_status' )
                            ->
set_options(
                                [
                                    
'active'   => __'Active''automatewoo' ),
                                    
'disabled' => __'Disabled''automatewoo' ),
                                ]
                            )
                            ->
render$status );
                        
?>
                    </div>
                </div>
            </td>
        </tr>

        <?php if ( $post->post_status !== 'auto-draft' ) : ?>
            <tr class="automatewoo-table__row">
                <td class="automatewoo-table__col">
                    <div>
                        <?php
                        printf
(
                            
'%1$s <b>%2$s</b>',
                            
esc_html__'Created:''automatewoo' ),
                            
esc_htmlFormat::datetime$post->post_date0false ) )
                        );
                        
?>
                    </div>
                </td>
            </tr>
        <?php endif; ?>
    </table>

    <div id="major-publishing-actions">
        <?php if ( current_user_can'delete_post'$post->ID ) ) : ?>
            <div id="delete-action">
                <?php
                $delete_text 
= ( ! EMPTY_TRASH_DAYS )
                    ? 
__'Delete Permanently''automatewoo' )
                    : 
__'Move to Trash''automatewoo' );
                
?>
                <a class="submitdelete deletion" href="<?php echo esc_urlget_delete_post_link$post->ID ) ); ?>">
                    <?php echo esc_html$delete_text ); ?>
                </a>
            </div>
        <?php endif; ?>

        <div id="publishing-action">
            <span class="spinner"></span>
            <input name="original_publish"
                type="hidden"
                id="original_publish"
                value="<?php esc_attr_e'Save''automatewoo' ); ?>" />
            <input name="save"
                type="submit"
                class="button button-primary button-large"
                id="publish"
                value="<?php esc_attr_e'Save''automatewoo' ); ?>" />

            <?php if ( $workflow ) : ?>
                <a
                        id="automatewoo-workflow-run-btn"
                        class="button button-primary button-large <?php echo 'manual' === $workflow->get_type() ? '' 'hidden'?>">
                    <?php esc_html_e'Run''automatewoo' ); ?>
                </a>
                <input name="automatewoo_redirect_to_runner" type="hidden" value="0">
            <?php endif; ?>
        </div>
        <div class="clear"></div>
    </div>
</div>